Package org.apache.maven.embedder

Examples of org.apache.maven.embedder.PlexusLoggerAdapter


   
    protected void testArchetype(String groupId, String artifactId, String version) throws Exception {
        File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
        FileUtils.deleteDirectory(targetDir);
        targetDir.mkdirs();
        EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(
                        new MavenEmbedderConsoleLogger()));

        Properties props = new Properties();
        props.setProperty("archetypeGroupId", groupId);
        props.setProperty("archetypeArtifactId", artifactId);
View Full Code Here


        File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
        FileUtils.deleteDirectory(targetDir);
        targetDir.mkdirs();
        MavenEmbedderConsoleLogger logger = new MavenEmbedderConsoleLogger();
//        logger.setThreshold(MavenEmbedderConsoleLogger.LEVEL_DEBUG);
        EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(logger));

        String catalog = "file://" + new File(maven.getLocalRepositoryDirectory().getParent(), "archetype-catalog.xml").getAbsolutePath();
        System.err.println("Catalog: " + catalog);

        Properties props = new Properties();
View Full Code Here

    protected void testArchetype(String groupId, String artifactId, String version, Properties archetypeRequiredParameters) throws Exception {
        File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
        FileUtils.deleteDirectory(targetDir);
        targetDir.mkdirs();
        EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(
                new MavenEmbedderConsoleLogger()));

        Properties props = new Properties();
        props.setProperty("archetypeGroupId", groupId);
        props.setProperty("archetypeArtifactId", artifactId);
View Full Code Here

   
    protected void testArchetype(String groupId, String artifactId, String version) throws Exception {
        File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
        FileUtils.deleteDirectory(targetDir);
        targetDir.mkdirs();
        EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(
                        new MavenEmbedderConsoleLogger()));
        Properties props = new Properties();
        props.setProperty("archetypeGroupId", groupId);
        props.setProperty("archetypeArtifactId", artifactId);
        props.setProperty("archetypeVersion", version);
View Full Code Here

   
    protected void testArchetype(String groupId, String artifactId, String version) throws Exception {
        File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
        FileUtils.deleteDirectory(targetDir);
        targetDir.mkdirs();
        EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(
                        new MavenEmbedderConsoleLogger()));

        Properties props = new Properties();
        props.setProperty("archetypeGroupId", groupId);
        props.setProperty("archetypeArtifactId", artifactId);
View Full Code Here

    protected void testArchetype(String groupId, String artifactId, String version, Properties archetypeRequiredParameters) throws Exception {
        File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
        FileUtils.deleteDirectory(targetDir);
        targetDir.mkdirs();
        MavenEmbedderConsoleLogger logger = new MavenEmbedderConsoleLogger();
        EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(logger));

        String catalog = "file://" + new File(maven.getLocalRepositoryDirectory().getParent(), "archetype-catalog.xml").getAbsolutePath();
        System.err.println("Catalog: " + catalog);

        Properties props = new Properties();
View Full Code Here

    protected void testArchetype(String groupId, String artifactId, String version, Properties archetypeRequiredParameters) throws Exception {
        File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
        FileUtils.deleteDirectory(targetDir);
        targetDir.mkdirs();
        EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(
                new MavenEmbedderConsoleLogger()));

        Properties props = new Properties();
        props.setProperty("archetypeGroupId", groupId);
        props.setProperty("archetypeArtifactId", artifactId);
View Full Code Here

   
    protected void testArchetype(String groupId, String artifactId, String version) throws Exception {
        File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
        FileUtils.deleteDirectory(targetDir);
        targetDir.mkdirs();
        EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(
                        new MavenEmbedderConsoleLogger()));
        Properties props = new Properties();
        props.setProperty("archetypeGroupId", groupId);
        props.setProperty("archetypeArtifactId", artifactId);
        props.setProperty("archetypeVersion", version);
View Full Code Here

      getLog().warn("can not stop the maven embedder", e);
    }
  }

  protected void executeGoals() throws MojoExecutionException {
    EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(maven.getLogger()));
    boolean hasJavaSources = PomUtils.getJavaSourceFiles( executedProject ).size()>0;
    boolean hasJavaTests = PomUtils.getJavaTestFiles( executedProject ).size()>0;

    for (Report report : Report.getReports()) {
      ReportHandler reportHandler = report.getReportHandler();
View Full Code Here

          embedder.setClassLoader(Thread.currentThread()
              .getContextClassLoader());
          embedder.start();
          embedder.execute(reactorProjects, Collections
              .singletonList(qualifiedGoal), new DefaultEventMonitor(
              new PlexusLoggerAdapter(embedder.getLogger())),
              new ConsoleDownloadMonitor(), properties,
              ((MavenProject) reactorProjects.get(0)).getBasedir());
          embedderWorked = true;
        }
        catch ( Exception ex)
View Full Code Here

TOP

Related Classes of org.apache.maven.embedder.PlexusLoggerAdapter

Copyright © 2018 www.massapicom. 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.