Examples of MavenEmbedder


Examples of org.apache.maven.embedder.MavenEmbedder

    public void testGetMavenJavadocPluginConfiguration()
        throws Exception
    {
        File testPom = new File( getBasedir(), "src/test/resources/unit/ant-javadoc-test/pom.xml" );

        MavenEmbedder maven = new MavenEmbedder();
        maven.setClassLoader( Thread.currentThread().getContextClassLoader() );
        maven.setLogger( new MavenEmbedderConsoleLogger() );
        maven.setLocalRepositoryDirectory( getTestFile( "target/local-repo" ) );
        maven.setOffline( true );
        maven.start();

        MavenProject project = maven.readProject( testPom );

        assertEquals( AntBuildWriterUtil.getMavenJavadocPluginBasicOption( project, "doclet", null ),
                      "gr.spinellis.umlgraph.doclet.UmlGraphDoc" );

        assertNotNull( AntBuildWriterUtil.getMavenJavadocPluginOptions( project, "links", null ) );
        assertEquals( AntBuildWriterUtil.getMavenJavadocPluginOptions( project, "links", null ).length, 2 );

        assertNotNull( AntBuildWriterUtil.getMavenJavadocPluginOptions( project, "docletArtifacts", null ) );
        assertEquals( AntBuildWriterUtil.getMavenJavadocPluginOptions( project, "docletArtifacts", null ).length, 2 );

        Map[] options = AntBuildWriterUtil.getMavenJavadocPluginOptions( project, "tags", null );
        assertNotNull( options );
        assertEquals( options.length, 1 );
        assertEquals( 1, options[0].size() );
        Map properties = (Map) options[0].get( "tag" );
        assertNotNull( properties );
        assertEquals( "requirement", properties.get( "name" ) );
        assertEquals( "a", properties.get( "placement" ) );
        assertEquals( "Software Requirement:", properties.get( "head" ) );

        maven.stop();
    }
View Full Code Here

Examples of org.apache.maven.embedder.MavenEmbedder

    finalizeMavenEmbedder();
  }

  protected void initMavenEmbedder() throws MojoExecutionException {
    try {
      this.maven = new MavenEmbedder();
      maven.setClassLoader(Thread.currentThread().getContextClassLoader());
      maven.setLogger(new MavenEmbedderConsoleLogger());
      maven.setAlignWithUserInstallation(true);
      maven.start();
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.maven.embedder.MavenEmbedder

    finalizeMavenEmbedder();
  }

  protected void initMavenEmbedder() throws MojoExecutionException {
    try {
      this.maven = new MavenEmbedder();
      maven.setClassLoader(Thread.currentThread().getContextClassLoader());
      maven.setLogger(new MavenEmbedderConsoleLogger());
      maven.setAlignWithUserInstallation(true);
      maven.start();
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.maven.embedder.MavenEmbedder

    finalizeMavenEmbedder();
  }

  protected void initMavenEmbedder() throws MojoExecutionException {
    try {
      this.maven = new MavenEmbedder();
      maven.setClassLoader(Thread.currentThread().getContextClassLoader());
      maven.setLogger(new MavenEmbedderConsoleLogger());
      maven.setAlignWithUserInstallation(true);
      maven.start();
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.maven.embedder.MavenEmbedder

    public MockPlugin()
        throws Exception
    {
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        maven = new MavenEmbedder();

        maven.setClassLoader( classLoader );

        maven.start();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.