public MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException { ProjectBuilderConfiguration configuration = new DefaultProjectBuilderConfiguration(); configuration.setLocalRepository( localRepository ); configuration.setGlobalProfileManager( profileManager ); return buildStandaloneSuperProject( configuration ); }
public Object getValue( String expression ) { return config.getExecutionProperties().getProperty( "env." + expression ); } } );
request.setResolveDependencies( false ); request.setLocalRepository( configuration.getLocalRepository() ); request.setBuildStartTime( configuration.getBuildStartTime() ); request.setUserProperties( configuration.getUserProperties() ); request.setSystemProperties( configuration.getExecutionProperties() ); ProfileManager profileManager = configuration.getGlobalProfileManager(); if ( profileManager != null )
valueSources.add( new BuildTimestampValueSource( config.getBuildStartTime(), timestampFormat ) ); valueSources.add( modelValueSource1 ); valueSources.add( new MapBasedValueSource( config.getUserProperties() ) ); valueSources.add( new MapBasedValueSource( modelProperties ) ); valueSources.add( new MapBasedValueSource( config.getExecutionProperties() ) ); valueSources.add( new AbstractValueSource( false )
ProfileManager externalProfileManager = config.getGlobalProfileManager(); ProfileManager profileManager; if ( externalProfileManager != null ) model = findModelFromRepository( parentArtifact, remoteRepositories, config.getLocalRepository(), false );
/** * Create a project builder configuration to be used when initializing the maven project. * * @return */ private ProjectBuilderConfiguration createProjectBuilderConfig( ArtifactRepository localArtifactRepository ) { ProjectBuilderConfiguration builderConfig = new DefaultProjectBuilderConfiguration(); builderConfig.setLocalRepository( localArtifactRepository ); builderConfig.setGlobalProfileManager( this.getActivatedProfiles() ); builderConfig.setUserProperties( getAntProjectProperties() ); builderConfig.setExecutionProperties( getAntProjectProperties() ); return builderConfig; }
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 ); }
@SuppressWarnings("deprecation") private ArtifactRepository getArtifactRepositoryMaven21(MavenProject pom) { ProjectBuilderConfiguration projectBuilderConfiguration; try { // Since maven-plugin is compiled against maven-core-3x, we need to retrieve // this maven 2 object via reflection Method method = MavenProject.class.getMethod("getProjectBuilderConfiguration"); projectBuilderConfiguration = (ProjectBuilderConfiguration) method.invoke(pom); if (projectBuilderConfiguration == null) { return null; } return projectBuilderConfiguration.getLocalRepository(); } catch (Exception e) { LOGGER.log(Level.WARNING, "Could not retrieve BuilderConfigration", e); return null; } }
ProfileManager externalProfileManager = config.getGlobalProfileManager(); ProfileManager superProjectProfileManager; if ( externalProfileManager != null )
public MavenProject buildFromRepository( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository, boolean allowStubModel ) throws ProjectBuildingException { ProjectBuilderConfiguration configuration = new DefaultProjectBuilderConfiguration(); configuration.setLocalRepository( localRepository ); return buildFromRepository( artifact, remoteRepositories, configuration, allowStubModel ); }
valueSources.add( new BuildTimestampValueSource( config.getBuildStartTime(), timestampFormat ) ); valueSources.add( modelValueSource1 ); valueSources.add( new MapBasedValueSource( config.getUserProperties() ) ); valueSources.add( new MapBasedValueSource( modelProperties ) ); valueSources.add( new MapBasedValueSource( config.getExecutionProperties() ) ); valueSources.add( new AbstractValueSource( false )
ProfileManager profileMgr = config == null ? null : config.getGlobalProfileManager(); mergeManagedDependencies( model, config.getLocalRepository(), remoteRepositories );
public MavenProject build( File projectDescriptor, ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException { ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ).setGlobalProfileManager( profileManager ); return buildFromSourceFileInternal( projectDescriptor, config, true ); }
/** * Builds a dependency tree. * * @param project MavenProject for which ot build the dependency tree. * @return DependencyNode containing the dependency tree for the project. * @throws DependencyTreeBuilderException if the dependency tree could not be built. */ public DependencyNode buildDependencyTree( MavenProject project ) throws DependencyTreeBuilderException { return buildDependencyTree( project, project.getProjectBuilderConfiguration().getLocalRepository(), factory, metadataSource, null, collector ); }
ProfileManager profileManager = config.getGlobalProfileManager();
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 buildStandaloneSuperProject( ArtifactRepository localRepository, ProfileManager profileManager ) throws ProjectBuildingException { return buildStandaloneSuperProject( new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ) .setGlobalProfileManager( profileManager ) ); }
public Object getValue( String expression ) { return config.getExecutionProperties().getProperty( "env." + expression ); }
public MavenProject buildWithDependencies( File pom, ArtifactRepository localRepository, ProfileManager profileManager, TransferListener transferListener ) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException { ProjectBuilderConfiguration configuration = new DefaultProjectBuilderConfiguration(); configuration.setLocalRepository( localRepository ); configuration.setGlobalProfileManager( profileManager ); ProjectBuildingRequest request = injectSession( toRequest( configuration ) ); request.setResolveDependencies( true ); try { return projectBuilder.build( pom, request ).getProject(); } catch ( ProjectBuildingException e ) { throw transformError( e ); } }
public MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository ) throws ProjectBuildingException { //TODO mkleint - use the (Container, Properties) constructor to make system properties embeddable ProfileManager profileManager = new DefaultProfileManager( container ); return buildStandaloneSuperProject( new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ) .setGlobalProfileManager( profileManager ) ); }