Examples of ArchetypeGenerationResult


Examples of org.apache.maven.archetype.ArchetypeGenerationResult

                return;
            }

            configurator.configureArchetype( request, interactiveMode, executionProperties );

            ArchetypeGenerationResult generationResult = manager.generateProjectFromArchetype( request );

            if ( generationResult.getCause() != null )
            {
                throw new MojoFailureException( generationResult.getCause(), generationResult.getCause().getMessage(),
                                                generationResult.getCause().getMessage() );
            }
        }
        catch ( MojoFailureException ex )
        {
            throw ex;
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationResult

                    properties.getProperty( Constants.ARTIFACT_ID ) ).setVersion(
                    properties.getProperty( Constants.VERSION ) ).setPackage(
                    properties.getProperty( Constants.PACKAGE ) ).setOutputDirectory( basedir ).setProperties(
                    properties );

            ArchetypeGenerationResult result = new ArchetypeGenerationResult();

            archetypeGenerator.generateArchetype( request, archetypeFile, result );

            if ( result.getCause() != null )
            {
                if ( result.getCause() instanceof ArchetypeNotConfigured )
                {
                    ArchetypeNotConfigured anc = (ArchetypeNotConfigured) result.getCause();

                    throw new IntegrationTestFailure(
                        "Missing required properties in archetype.properties: " + StringUtils.join(
                            anc.getMissingProperties().iterator(), ", " ), anc );
                }

                throw new IntegrationTestFailure( result.getCause().getMessage(), result.getCause() );
            }

            File reference = new File( goalFile.getParentFile(), "reference" );

            if ( reference.exists() )
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationResult

        ArchetypeGenerationConfigurator configurator = plexus.lookup(ArchetypeGenerationConfigurator.class);
        configurator.configureArchetype(request, !batch, props);

        ArchetypeManager archetypeManager = plexus.lookup(ArchetypeManager.class);
        ArchetypeGenerationResult generationResult = archetypeManager.generateProjectFromArchetype(request);
        if (generationResult.getCause() != null) {
            throw generationResult.getCause();
        }

        return Result.SUCCESS;
    }
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.