public MavenProject buildFromRepository( Artifact artifact, List remoteArtifactRepositories, ArtifactRepository localRepository ) throws ProjectBuildingException { return buildFromRepository( artifact, remoteArtifactRepositories, localRepository, true ); }
public MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository ) throws ProjectBuildingException { return buildStandaloneSuperProject( localRepository, null ); }
public MavenProject buildWithDependencies( File projectDescriptor, ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException { return buildWithDependencies( projectDescriptor, localRepository, profileManager, null ); }
public MavenProject buildFromRepository( Artifact artifact, List remoteArtifactRepositories, ArtifactRepository localRepository, boolean allowStubModel ) throws ProjectBuildingException { String cacheKey = createCacheKey( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() ); MavenProject project = (MavenProject) processedProjectCache.get( cacheKey ); if ( project != null ) { return project; } Model model = findModelFromRepository( artifact, remoteArtifactRepositories, localRepository, allowStubModel ); ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ); return buildInternal( "Artifact [" + artifact + "]", model, config, remoteArtifactRepositories, null, false ); }
Model superModel = getSuperModel(); activeProfiles = injectActiveProfiles( superProjectProfileManager, superModel ); String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() ); try project = assembleLineage( model, lineage, config, projectDescriptor, parentSearchRepositories, aggregatedRemoteWagonRepositories, strict ); getLogger().debug( "Cannot determine whether " + currentProject.getId() + " is a module of " + previousProject.getId() + ". Reason: " + e.getMessage(), e ); List superRepositories = buildArtifactRepositories( superModel ); project = processProjectLogic( pomLocation, project, config, projectDir, repositories, strict, false ); createCacheKey( project.getGroupId(), project.getArtifactId(), project.getVersion() ), project ); project.setManagedVersionMap( createManagedVersionMap( projectId, project.getDependencyManagement(), project.getParent() ) );
loadProjectExternalProfiles( profileManager, projectDir ); activeProfiles = injectActiveProfiles( profileManager, model ); String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() ); List respositories = buildArtifactRepositories( model ); MavenProject project = new MavenProject( model, getLogger() ); String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() ); createCacheKey( parentModel.getGroupId(), parentModel.getArtifactId(), parentModel.getVersion() ); MavenProject parentProject = (MavenProject) rawProjectCache.get( parentKey ); if ( getLogger().isDebugEnabled() ) getLogger().debug( "Searching for parent-POM: " + parentModel.getId() + " of project: " + project.getId() + " in relative path: " + parentRelativePath ); if ( getLogger().isDebugEnabled() ) getLogger().debug( "Path specified in <relativePath/> (" + parentRelativePath + ") is a directory. Searching for 'pom.xml' within this directory." ); if ( getLogger().isDebugEnabled() ) getLogger().debug( "Parent-POM: " + parentModel.getId() + " for project: " + project.getId() + " cannot be loaded from relative path: " + parentDescriptor +
throws ProjectBuildingException String projectId = safeVersionlessKey( artifact.getGroupId(), artifact.getArtifactId() ); normalizeToArtifactRepositories( remoteArtifactRepositories, projectId ); getLogger().debug( "Attempting to build MavenProject instance for Artifact (" + artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion() + ") of type: " + artifact.getType() + "; constructing POM artifact instead." ); model = readModel( projectId, file, false ); checkStatusAndUpdate( projectArtifact, status, file, remoteArtifactRepositories, localRepository ); getLogger().debug( "Artifact not found - using stub model: " + e.getMessage() ); model = createStubModel( projectArtifact );
restoreDynamicStateInternal( project, config, processProjectReferences, processProjectReferences ? new HashSet( processedProjects ) : null ); calculateConcreteStateInternal( project.getParent(), config, processProjectReferences, processedProjects ); initResourceMergeIds( build.getResources() ); initResourceMergeIds( build.getTestResources() ); model = modelInterpolator.interpolate( model, project.getBasedir(), config, getLogger().isDebugEnabled() ); List originalInterpolatedCompileSourceRoots = interpolateListOfStrings( project.getCompileSourceRoots(), model, project.getBasedir(), config, getLogger().isDebugEnabled() ); : translateListOfPaths( originalInterpolatedCompileSourceRoots, basedir ) ); List originalInterpolatedTestCompileSourceRoots = interpolateListOfStrings( project.getTestCompileSourceRoots(), model, project.getBasedir(), config, getLogger().isDebugEnabled() ); : translateListOfPaths( originalInterpolatedTestCompileSourceRoots, basedir ) ); List originalInterpolatedScriptSourceRoots = interpolateListOfStrings( project.getScriptSourceRoots(), model, project.getBasedir(), config,
private MavenProject buildFromSourceFileInternal( File projectDescriptor, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus ) throws ProjectBuildingException { Model model = readModel( "unknown", projectDescriptor, true ); MavenProject project = buildInternal( projectDescriptor.getAbsolutePath(), model, config, buildArtifactRepositories( getSuperModel() ), projectDescriptor, true ); if ( checkDistributionManagementStatus ) { if ( ( project.getDistributionManagement() != null ) && ( project.getDistributionManagement().getStatus() != null ) ) { String projectId = safeVersionlessKey( project.getGroupId(), project.getArtifactId() ); throw new ProjectBuildingException( projectId, "Invalid project file: distribution status must not be specified for a project outside of the repository" ); } } return project; }
public MavenProject buildFromRepository( Artifact artifact, List<ArtifactRepository> remoteRepositories, ProjectBuilderConfiguration configuration, boolean allowStubModel ) throws ProjectBuildingException { ProjectBuildingRequest request = injectSession( toRequest( configuration ) ); request.setRemoteRepositories( normalizeToArtifactRepositories( remoteRepositories, request ) ); request.setProcessPlugins( false ); request.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL ); try { return projectBuilder.build( artifact, allowStubModel, request ).getProject(); } catch ( ProjectBuildingException e ) { throw transformError( e ); } }
throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException MavenProject project = build( projectDescriptor, localRepository, profileManager, false ); String projectId = safeVersionlessKey( project.getGroupId(), project.getArtifactId() ); ensureMetadataSourceIsInitialized();
MavenProject project = buildFromRepository(artifact, parentSearchRepositories, localRepository, false); if ( getLogger().isDebugEnabled() ) getLogger().debug( "Importing managed dependencies for " + dep.toString() );
public MavenProject build( File pom, ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException { ProjectBuilderConfiguration configuration = new DefaultProjectBuilderConfiguration(); configuration.setLocalRepository( localRepository ); configuration.setGlobalProfileManager( profileManager ); return build( pom, configuration ); }
public MavenProject build( File pom, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus ) throws ProjectBuildingException { return buildFromSourceFileInternal( pom, config, checkDistributionManagementStatus ); }
public MavenProject build( File projectDescriptor, ArtifactRepository localRepository, ProfileManager profileManager, boolean checkDistributionManagementStatus ) throws ProjectBuildingException { ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ).setGlobalProfileManager( profileManager ); return buildFromSourceFileInternal( projectDescriptor, config, checkDistributionManagementStatus ); }
public MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException { return buildStandaloneSuperProject( new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ) .setGlobalProfileManager( profileManager ) ); }
public MavenProject buildFromRepository( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository ) throws ProjectBuildingException { return buildFromRepository( artifact, remoteRepositories, localRepository, true ); }
public MavenProject buildWithDependencies( File pom, ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException { return buildWithDependencies( pom, localRepository, profileManager, null ); }
public MavenProject build( File projectDescriptor, ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException { ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ).setGlobalProfileManager( profileManager ); return buildFromSourceFileInternal( projectDescriptor, config, true ); }
public MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException { ProjectBuilderConfiguration configuration = new DefaultProjectBuilderConfiguration(); configuration.setLocalRepository( localRepository ); configuration.setGlobalProfileManager( profileManager ); return buildStandaloneSuperProject( configuration ); }