.setArchetypeArtifactId(archetypeArtifactId) .setArchetypeVersion(archetypeVersion) .setOutputDirectory(basedir.getAbsolutePath())
.setArchetypeArtifactId( archetypeArtifactId ) .setArchetypeVersion( archetypeVersion ) .setOutputDirectory( basedir.getAbsolutePath() )
public void updateRequest( ArchetypeGenerationRequest request ) { request.setArchetypeGroupId( getGroupId() ); request.setArchetypeArtifactId( getArtifactId() ); request.setArchetypeVersion( getVersion() ); request.setArchetypeGoals( getGoals() ); request.setArchetypeName( getName() ); if ( StringUtils.isNotEmpty( getRepository() ) ) { request.setArchetypeRepository( getRepository() ); } } }
.setArchetypeArtifactId( archetypeArtifactId ) .setArchetypeVersion( archetypeVersion ) .setOutputDirectory( basedir.getAbsolutePath() )
private ArchetypeGenerationRequest generate( String archetypeGroupId, String archetypeArtifactId, String archetypeVersion, File archetypeFile, Properties properties, String basedir ) throws IntegrationTestFailure { //@formatter:off ArchetypeGenerationRequest request = new ArchetypeGenerationRequest().setArchetypeGroupId( archetypeGroupId ).setArchetypeArtifactId( archetypeArtifactId ).setArchetypeVersion( archetypeVersion ).setGroupId( properties.getProperty( Constants.GROUP_ID ) ).setArtifactId( properties.getProperty( Constants.ARTIFACT_ID ) ).setVersion( properties.getProperty( Constants.VERSION ) ).setPackage( properties.getProperty( Constants.PACKAGE ) ).setOutputDirectory( basedir ).setProperties( properties ); //@formatter:on 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() ); } return request; }
private ArchetypeGenerationRequest generate( String archetypeGroupId, String archetypeArtifactId, String archetypeVersion, File archetypeFile, Properties properties, String basedir ) throws IntegrationTestFailure { //@formatter:off ArchetypeGenerationRequest request = new ArchetypeGenerationRequest().setArchetypeGroupId( archetypeGroupId ).setArchetypeArtifactId( archetypeArtifactId ).setArchetypeVersion( archetypeVersion ).setGroupId( properties.getProperty( Constants.GROUP_ID ) ).setArtifactId( properties.getProperty( Constants.ARTIFACT_ID ) ).setVersion( properties.getProperty( Constants.VERSION ) ).setPackage( properties.getProperty( Constants.PACKAGE ) ).setOutputDirectory( basedir ).setProperties( properties ); //@formatter:on 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() ); } return request; }
public void updateRequest( ArchetypeGenerationRequest request ) { request.setArchetypeGroupId( getGroupId() ); request.setArchetypeArtifactId( getArtifactId() ); request.setArchetypeVersion( getVersion() ); request.setArchetypeGoals( getGoals() ); request.setArchetypeName( getName() ); if ( StringUtils.isNotEmpty( getRepository() ) ) { request.setArchetypeRepository( getRepository() ); } } }
.setArchetypeArtifactId(items[1]) .setArchetypeVersion(items[2]);
request.setArchetypeArtifactId(definition.getArtifactId()); request.setArchetypeVersion(definition.getVersion()); request.setArchetypeGoals(definition.getGoals());