Tabnine Logo
AbstractMojoTestCase.extractPluginConfiguration
Code IndexAdd Tabnine to your IDE (free)

How to use
extractPluginConfiguration
method
in
org.apache.maven.plugin.testing.AbstractMojoTestCase

Best Java code snippets using org.apache.maven.plugin.testing.AbstractMojoTestCase.extractPluginConfiguration (Showing top 10 results out of 315)

origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

public PlexusConfiguration extractPluginConfiguration( String artifactId, File pom )
  throws Exception
{
  return testCase.extractPluginConfiguration( artifactId, pom );
}
origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

public PlexusConfiguration extractPluginConfiguration( String artifactId, Xpp3Dom pomDom )
  throws Exception
{
  return testCase.extractPluginConfiguration( artifactId, pomDom );
}
origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * @param artifactId
 * @param pom
 * @return the plexus configuration
 * @throws Exception
 */
protected PlexusConfiguration extractPluginConfiguration( String artifactId, File pom )
  throws Exception
{
  Reader reader = ReaderFactory.newXmlReader( pom );
  Xpp3Dom pomDom = Xpp3DomBuilder.build( reader );
  return extractPluginConfiguration( artifactId, pomDom );
}
origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Configure the mojo
 *
 * @param mojo
 * @param artifactId
 * @param pom
 * @return a Mojo instance
 * @throws Exception
 */
protected Mojo configureMojo( Mojo mojo, String artifactId, File pom )
  throws Exception
{
  validateContainerStatus();
  PlexusConfiguration pluginConfiguration = extractPluginConfiguration( artifactId, pom );
  ExpressionEvaluator evaluator = new ResolverExpressionEvaluatorStub();
  configurator.configureComponent( mojo, pluginConfiguration, evaluator, getContainer().getContainerRealm() );
  return mojo;
}
origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Lookup the mojo leveraging the actual subprojects pom
 *
 * @param goal
 * @param pom
 * @return a Mojo instance
 * @throws Exception
 */
protected Mojo lookupMojo( String goal, File pom )
  throws Exception
{
  File pluginPom = new File( getBasedir(), "pom.xml" );
  Xpp3Dom pluginPomDom = Xpp3DomBuilder.build( ReaderFactory.newXmlReader( pluginPom ) );
  String artifactId = pluginPomDom.getChild( "artifactId" ).getValue();
  String groupId = resolveFromRootThenParent( pluginPomDom, "groupId" );
  String version = resolveFromRootThenParent( pluginPomDom, "version" );
  PlexusConfiguration pluginConfiguration = extractPluginConfiguration( artifactId, pom );
  return lookupMojo( groupId, artifactId, version, goal, pluginConfiguration );
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

public PlexusConfiguration extractPluginConfiguration( String artifactId, Xpp3Dom pomDom )
  throws Exception
{
  return testCase.extractPluginConfiguration( artifactId, pomDom );
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

public PlexusConfiguration extractPluginConfiguration( String artifactId, File pom )
  throws Exception
{
  return testCase.extractPluginConfiguration( artifactId, pom );
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * @param artifactId
 * @param pom
 * @return the plexus configuration
 * @throws Exception
 */
protected PlexusConfiguration extractPluginConfiguration( String artifactId, File pom )
  throws Exception
{
  Reader reader = ReaderFactory.newXmlReader( pom );
  Xpp3Dom pomDom = Xpp3DomBuilder.build( reader );
  return extractPluginConfiguration( artifactId, pomDom );
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Configure the mojo
 *
 * @param mojo
 * @param artifactId
 * @param pom
 * @return a Mojo instance
 * @throws Exception
 */
protected Mojo configureMojo( Mojo mojo, String artifactId, File pom )
  throws Exception
{
  validateContainerStatus();
  PlexusConfiguration pluginConfiguration = extractPluginConfiguration( artifactId, pom );
  ExpressionEvaluator evaluator = new ResolverExpressionEvaluatorStub();
  configurator.configureComponent( mojo, pluginConfiguration, evaluator, getContainer().getContainerRealm() );
  return mojo;
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Lookup the mojo leveraging the actual subprojects pom
 *
 * @param goal
 * @param pom
 * @return a Mojo instance
 * @throws Exception
 */
protected Mojo lookupMojo( String goal, File pom )
  throws Exception
{
  File pluginPom = new File( getBasedir(), "pom.xml" );
  Xpp3Dom pluginPomDom = Xpp3DomBuilder.build( ReaderFactory.newXmlReader( pluginPom ) );
  String artifactId = pluginPomDom.getChild( "artifactId" ).getValue();
  String groupId = resolveFromRootThenParent( pluginPomDom, "groupId" );
  String version = resolveFromRootThenParent( pluginPomDom, "version" );
  PlexusConfiguration pluginConfiguration = extractPluginConfiguration( artifactId, pom );
  return lookupMojo( groupId, artifactId, version, goal, pluginConfiguration );
}
org.apache.maven.plugin.testingAbstractMojoTestCaseextractPluginConfiguration

Popular methods of AbstractMojoTestCase

  • setUp
  • tearDown
  • getContainer
  • lookupMojo
    lookup the mojo while we have all of the relavent information
  • assertNotNull
  • configureMojo
    Configure the mojo with the given plexus configuration
  • fail
  • finalizeMojoConfiguration
  • getBasedir
  • getPluginDescriptorLocation
  • getPluginDescriptorPath
  • getPublicDescriptorStream
  • getPluginDescriptorPath,
  • getPublicDescriptorStream,
  • getVariableValueFromObject,
  • getVariablesAndValuesFromObject,
  • lookup,
  • lookupConfiguredMojo,
  • lookupEmptyMojo,
  • newMavenSession,
  • newMojoExecution

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • putExtra (Intent)
  • getContentResolver (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ImageIO (javax.imageio)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now