archetypes.put("internal", archetypeManager.getInternalCatalog().getArchetypes()); archetypes.put("local", archetypeManager.getDefaultLocalCatalog().getArchetypes()); List<Archetype> archetypesFromRemote = archetypeManager.getRemoteCatalog().getArchetypes(); if (archetypesFromRemote.size() > 0) { archetypes.put("remote", archetypesFromRemote); archetypes.put("internal", archetypeManager.getInternalCatalog().getArchetypes()); archetypes.put(catalog, archetypeManager.getLocalCatalog(path).getArchetypes()); archetypes.put(catalog, archetypeManager.getRemoteCatalog(catalog).getArchetypes()); archetypes.put("internal", archetypeManager.getInternalCatalog().getArchetypes());
public void execute() throws MojoExecutionException, MojoFailureException { try { getLog().info( "Building archetype jar: " + new File( outputDirectory, finalName ) ); File jarFile = manager.archiveArchetype( archetypeDirectory, outputDirectory, finalName ); checkArchetypeFile( jarFile ); project.getArtifact().setFile( jarFile ); } catch ( DependencyResolutionRequiredException ex ) { throw new MojoExecutionException( ex.getMessage(), ex ); } catch ( IOException ex ) { throw new MojoExecutionException( ex.getMessage(), ex ); } }
archetypes.put( "internal", archetypeManager.getInternalCatalog().getArchetypes() ); archetypes.put( "local", archetypeManager.getLocalCatalog( buildingRequest ).getArchetypes() ); archetypeManager.getRemoteCatalog( buildingRequest ).getArchetypes(); archetypes.put( "internal", archetypeManager.getInternalCatalog().getArchetypes() ); archetypes.put( "internal", archetypeManager.getInternalCatalog().getArchetypes() );
ArchetypeGenerationResult generationResult = manager.generateProjectFromArchetype(request);
public void execute() throws MojoExecutionException { Archetype archetype = new Archetype(); archetype.setGroupId( project.getGroupId() ); archetype.setArtifactId( project.getArtifactId() ); archetype.setVersion( project.getVersion() ); if ( StringUtils.isNotEmpty( project.getDescription() ) ) { archetype.setDescription( project.getDescription() ); } else { archetype.setDescription( project.getName() ); } manager.updateLocalCatalog( session.getProjectBuildingRequest(), archetype ); } }
ArchetypeCreationResult result = manager.createArchetypeFromProject( request );
archetypes.put( "internal", archetypeManager.getInternalCatalog().getArchetypes() ); archetypes.put( "local", archetypeManager.getLocalCatalog( buildingRequest ).getArchetypes() ); archetypeManager.getRemoteCatalog( buildingRequest ).getArchetypes(); archetypes.put( "internal", archetypeManager.getInternalCatalog().getArchetypes() ); archetypes.put( "internal", archetypeManager.getInternalCatalog().getArchetypes() );
ArchetypeGenerationResult generationResult = manager.generateProjectFromArchetype( request );
public void execute() throws MojoExecutionException { Archetype archetype = new Archetype(); archetype.setGroupId( project.getGroupId() ); archetype.setArtifactId( project.getArtifactId() ); archetype.setVersion( project.getVersion() ); if ( StringUtils.isNotEmpty( project.getDescription() ) ) { archetype.setDescription( project.getDescription() ); } else { archetype.setDescription( project.getName() ); } manager.updateLocalCatalog( session.getProjectBuildingRequest(), archetype ); } }
ArchetypeCreationResult result = manager.createArchetypeFromProject( request );
ArchetypeGenerationResult generationResult = manager.generateProjectFromArchetype( request );
org.apache.maven.archetype.ArchetypeManager archetyper = MavenPluginActivator.getDefault() .getArchetypeManager().getArchetyper(); archetyper.updateLocalCatalog(archetype);
ArchetypeCreationResult result = archetypeManager.createArchetypeFromProject(request);
public void execute() throws MojoExecutionException, MojoFailureException { try { getLog().info( "Building archetype jar: " + new File( outputDirectory, finalName ) ); File jarFile = manager.archiveArchetype( archetypeDirectory, outputDirectory, finalName ); checkArchetypeFile( jarFile ); project.getArtifact().setFile( jarFile ); } catch ( DependencyResolutionRequiredException ex ) { throw new MojoExecutionException( ex.getMessage(), ex ); } catch ( IOException ex ) { throw new MojoExecutionException( ex.getMessage(), ex ); } }
ArchetypeGenerationResult generationResult = archetypeManager.generateProjectFromArchetype(request); if (generationResult.getCause() != null) { throw generationResult.getCause();