Examples of ArchetypeCreationResult


Examples of org.apache.maven.archetype.ArchetypeCreationResult

        Properties properties = new Properties();
        properties.setProperty( "someProperty", "someValue" );
        ArchetypeCreationRequest acr = new ArchetypeCreationRequest().setProject( project ).
            setLocalRepository( localRepository ).setProperties( properties ).setPostPhase( "package" );

        ArchetypeCreationResult creationResult = archetype.createArchetypeFromProject( acr );

        if ( creationResult.getCause() != null )
        {
            throw creationResult.getCause();
        }

        // (3) create our own archetype catalog properties in memory
        File catalogDirectory = new File( getBasedir(), "target" + File.separator + "catalog" );
        catalogDirectory.mkdirs();
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeCreationResult

        MavenProject project = projectBuilder.build( pom, localRepository, null );

        ArchetypeCreationRequest acr = new ArchetypeCreationRequest().setProject( project ).
            setLocalRepository( localRepository ).setPostPhase( "package" );

        ArchetypeCreationResult creationResult = archetype.createArchetypeFromProject( acr );

        if ( creationResult.getCause() != null )
        {
            throw creationResult.getCause();
        }

        // (3) create our own archetype catalog properties in memory
        File catalogDirectory = new File( getBasedir(), "target" + File.separator + "catalog" );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeCreationResult

            .setPartialArchetype( false )
            .setPreserveCData( false )
            .setKeepParent( false )
            .setPostPhase( "verify" );

        ArchetypeCreationResult result = new ArchetypeCreationResult();

        instance.createArchetype( request, result );

        if ( result.getCause() != null )
        {
            throw result.getCause();
        }

        System.out.println( "<<<<<< testCreateFilesetArchetype( \"" + project + "\" )" );
    }
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeCreationResult

        ArchetypeCreationRequest acr =
            new ArchetypeCreationRequest().setProject( project ).setLocalRepository( localRepository ).setFiltereds(
                Constants.DEFAULT_FILTERED_EXTENSIONS ).setLanguages( Constants.DEFAULT_LANGUAGES ).setPostPhase(
                "package" );

        ArchetypeCreationResult creationResult = archetype.createArchetypeFromProject( acr );

        if ( creationResult.getCause() != null )
        {
            throw creationResult.getCause();
        }
        else
        {
            assertArchetypeCreated( workingProject );
        }
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeCreationResult

                /* this should be resolved and asked for user to verify */
                .setPackageName( packageName )
                .setPostPhase( archetypePostPhase )
                .setOutputDirectory( outputDirectory );

            ArchetypeCreationResult result = manager.createArchetypeFromProject( request );

            if ( result.getCause() != null )
            {
                throw new MojoFailureException( result.getCause(), result.getCause().getMessage(),
                                                result.getCause().getMessage() );
            }

            getLog().info( "Archetype created in " + outputDirectory );

            if ( testMode )
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeCreationResult

            System.setProperty("user.dir", vars.get(SHELL_USER_DIR, File.class).getAbsolutePath());
        }

        log.debug("Creating archetype");
        ArchetypeManager archetypeManager = plexus.lookup(ArchetypeManager.class);
        ArchetypeCreationResult result = archetypeManager.createArchetypeFromProject(request);

        if (result.getCause() != null) {
            throw result.getCause();
        }

        // HACK: Prompter has some issues, so add a newline
        io.out.println();
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.