Search in sources :

Example 1 with DefaultProfileManager

use of org.apache.maven.profiles.DefaultProfileManager in project intellij-community by JetBrains.

the class MavenEmbedder method createProfileManager.

private ProfileManager createProfileManager(List<String> activeProfiles, List<String> inactiveProfiles, Properties executionProperties) {
    ProfileManager profileManager = new DefaultProfileManager(getContainer(), executionProperties);
    profileManager.explicitlyActivate(activeProfiles);
    profileManager.explicitlyDeactivate(inactiveProfiles);
    return profileManager;
}
Also used : DefaultProfileManager(org.apache.maven.profiles.DefaultProfileManager) ProfileManager(org.apache.maven.profiles.ProfileManager) DefaultProfileManager(org.apache.maven.profiles.DefaultProfileManager)

Example 2 with DefaultProfileManager

use of org.apache.maven.profiles.DefaultProfileManager in project maven-plugins by apache.

the class AbstractProjectInfoTestCase method generateReport.

protected File generateReport(AbstractProjectInfoReport mojo, File pluginXmlFile) throws Exception {
    mojo.execute();
    MavenProjectBuilder builder = (MavenProjectBuilder) lookup(MavenProjectBuilder.ROLE);
    ProfileManager profileManager = new DefaultProfileManager(getContainer(), null, null);
    assertNotNull("Local repository", mojo.localRepository);
    testMavenProject = builder.buildWithDependencies(pluginXmlFile, mojo.localRepository, profileManager);
    File outputDir = mojo.getReportOutputDirectory();
    String filename = mojo.getOutputName() + ".html";
    return new File(outputDir, filename);
}
Also used : ProfileManager(org.apache.maven.profiles.ProfileManager) DefaultProfileManager(org.apache.maven.profiles.DefaultProfileManager) MavenProjectBuilder(org.apache.maven.project.MavenProjectBuilder) DefaultProfileManager(org.apache.maven.profiles.DefaultProfileManager) File(java.io.File)

Aggregations

DefaultProfileManager (org.apache.maven.profiles.DefaultProfileManager)2 ProfileManager (org.apache.maven.profiles.ProfileManager)2 File (java.io.File)1 MavenProjectBuilder (org.apache.maven.project.MavenProjectBuilder)1