mirror of https://github.com/apache/maven.git
PR: MNG-457
add support to select a set of profiles git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@189530 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b1ed3d90a6
commit
53942a2d24
|
@ -24,6 +24,7 @@ import org.apache.maven.settings.Server;
|
|||
import org.apache.maven.settings.Settings;
|
||||
import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
|
||||
import org.apache.maven.project.MavenProjectBuilder;
|
||||
import org.apache.maven.profile.activation.ProfileActivationUtils;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.Task;
|
||||
|
@ -287,4 +288,13 @@ public abstract class AbstractArtifactTask
|
|||
{
|
||||
this.localRepository = localRepository;
|
||||
}
|
||||
|
||||
public void setProfiles( String profiles )
|
||||
{
|
||||
if ( profiles != null )
|
||||
{
|
||||
// TODO: not sure this is the best way to do this...
|
||||
System.setProperty( ProfileActivationUtils.ACTIVE_PROFILE_IDS, profiles );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,8 +225,60 @@
|
|||
<requirement>
|
||||
<role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.apache.maven.profile.activation.ProfileActivationCalculator</role>
|
||||
</requirement>
|
||||
</requirements>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profile.activation.ProfileActivationCalculator</role>
|
||||
<implementation>org.apache.maven.profile.activation.ProfileActivationCalculator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profile.activation.ProfileActivator</role>
|
||||
<role-hint>always-on</role-hint>
|
||||
<implementation>org.apache.maven.profile.activation.AlwaysOnProfileActivator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profile.activation.ProfileActivator</role>
|
||||
<role-hint>jdk-prefix</role-hint>
|
||||
<implementation>org.apache.maven.profile.activation.JdkPrefixProfileActivator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profile.activation.ProfileActivator</role>
|
||||
<role-hint>system-property</role-hint>
|
||||
<implementation>org.apache.maven.profile.activation.SystemPropertyProfileActivator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.profile.activation.ProfileActivator</role>
|
||||
<role-hint>explicit-listing</role-hint>
|
||||
<implementation>org.apache.maven.profile.activation.ExplicitListingProfileActivator</implementation>
|
||||
</component>
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
Loading…
Reference in New Issue