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 ) ); }
if ( externalProfileManager != null ) superProjectProfileManager = new DefaultProfileManager( container, externalProfileManager.getRequestProperties() ); superProjectProfileManager = new DefaultProfileManager( container );
if ( externalProfileManager != null ) profileManager = new DefaultProfileManager( container, externalProfileManager.getRequestProperties() ); profileManager = new DefaultProfileManager( container );
profileManager = new DefaultProfileManager( container );
private ProfileManager getProfileManager( Settings settings ) { if ( profileManager == null ) { profileManager = new DefaultProfileManager( container, settings ); } return profileManager; }
private ProfileManager getProfileManager( Settings settings ) { Properties props = new Properties(); return new DefaultProfileManager( container, settings, props ); }
private ProfileManager getProfileManager() { if ( profileManager == null ) { profileManager = new DefaultProfileManager( container, getSettings() ); } return profileManager; }
private ProfileManager getProfileManager() { if ( profileManager == null ) { profileManager = new DefaultProfileManager( container, getSettings() ); } return profileManager; }
protected ProfileManager getProfileManager() { if ( profileManager == null ) { profileManager = new DefaultProfileManager( getContainer(), getSettings(), System.getProperties() ); } return profileManager; }
/** * Default constructor. * * @param log the logger provided by the Maven client that is the client to * this context. * @param container the plexus container with further information to be set. * @param localRepositoryDirName the path to the local repository. * @throws ComponentLookupException if a required component cannot be found. */ public DefaultMavenContext(final Log log, final PlexusContainer container, final String localRepositoryDirName) throws ComponentLookupException { this.log = log; this.container = container; projectBuilder = (MavenProjectBuilder) container.lookup(MavenProjectBuilder.ROLE); repositoryLayout = (ArtifactRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE, "default"); initLocalRepository(localRepositoryDirName); profileManager = new DefaultProfileManager(container, (Properties) null); }
/** * Execute the dependency calculator. * @return List of dependency files. * @throws Exception If anything goes wrong. */ public Set<File> execute() throws Exception { ProfileManager profileManager = new DefaultProfileManager(container); fixupProjectArtifact(); // Calculate the new deps Artifact art = mavenProject.getArtifact(); Artifact art2 = artifactFactory.createArtifactWithClassifier(art .getGroupId() + ".cargodeps", art.getArtifactId(), art.getVersion(), "pom", null); resolver.resolve(art2, remoteRepositories, localRepository); MavenProject mavenProject = mavenProjectBuilder.buildWithDependencies( art2.getFile(), localRepository, profileManager); Set<File> filesToAdd = new HashSet<File>(); for (Object artifact : mavenProject.getArtifacts()) { Artifact artdep = (Artifact) artifact; if (artdep.getType().equals("jar")) { resolver.resolve(artdep, remoteRepositories, localRepository); filesToAdd.add(artdep.getFile()); } } return filesToAdd; }
new DefaultProfileManager(session.getContainer())); projectCache.put(pom, project);
/** * creates model lineage for the given pom file. * Useful to be able to locate where certain elements are defined. * * @param pom * @param embedder * @param allowStubs * @return */ public static ModelLineage createModelLineage(File pom, MavenEmbedder embedder, boolean allowStubs) throws ProjectBuildingException { try { ModelLineageBuilder bldr = (ModelLineageBuilder) embedder.getPlexusContainer().lookup(ModelLineageBuilder.class); ProfileActivationContext context = new DefaultProfileActivationContext(new Properties(), true); //TODO shall we pass some execution props in here? ProfileManager manager = new DefaultProfileManager(embedder.getPlexusContainer(), context); DefaultProjectBuilderConfiguration conf = new DefaultProjectBuilderConfiguration(); conf.setGlobalProfileManager(manager); conf.setExecutionProperties(new Properties()); conf.setLocalRepository(embedder.getLocalRepository()); conf.setUserProperties(new Properties()); return bldr.buildModelLineage(pom, conf, new ArrayList(), allowStubs, true); } catch (ComponentLookupException ex) { Exceptions.printStackTrace(ex); } return new DefaultModelLineage(); }
/** * creates model lineage for the given pom file. * Useful to be able to locate where certain elements are defined. * * @param pom * @param embedder * @param allowStubs * @return */ public static ModelLineage createModelLineage(File pom, MavenEmbedder embedder, boolean allowStubs) throws ProjectBuildingException { try { ModelLineageBuilder bldr = (ModelLineageBuilder) embedder.getPlexusContainer().lookup(ModelLineageBuilder.class); ProfileActivationContext context = new DefaultProfileActivationContext(new Properties(), true); //TODO shall we pass some execution props in here? ProfileManager manager = new DefaultProfileManager(embedder.getPlexusContainer(), context); DefaultProjectBuilderConfiguration conf = new DefaultProjectBuilderConfiguration(); conf.setGlobalProfileManager(manager); conf.setExecutionProperties(new Properties()); conf.setLocalRepository(embedder.getLocalRepository()); conf.setUserProperties(new Properties()); return bldr.buildModelLineage(pom, conf, new ArrayList(), allowStubs, true); } catch (ComponentLookupException ex) { Exceptions.printStackTrace(ex); } return new DefaultModelLineage(); }
ProfileManager profileManager = new DefaultProfileManager( container, settings );
ProfileManager profileManager = new DefaultProfileManager( container, settings );
ProfileManager profileManager = new DefaultProfileManager(session.getContainer(), phaseCall.getProperties());
ProfileManager profileManager = new DefaultProfileManager( container, settings );
profileManager = new DefaultProfileManager( embedder.getContainer(), systemProperties ); activeProfiles();