MNG-2147 make sure it's not required to set activated or inactivaed profiles.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@400269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Milos Kleint 2006-05-06 08:47:15 +00:00
parent a1b2df1fd1
commit f930fac38a

View File

@ -159,11 +159,19 @@ public List getEventMonitors()
public List getActiveProfiles()
{
if ( activeProfiles == null )
{
activeProfiles = new ArrayList();
}
return activeProfiles;
}
public List getInactiveProfiles()
{
if ( inactiveProfiles == null )
{
inactiveProfiles = new ArrayList();
}
return inactiveProfiles;
}
@ -285,48 +293,28 @@ public MavenExecutionRequest setSession( MavenSession session )
public MavenExecutionRequest addActiveProfile( String profile )
{
if ( activeProfiles == null )
{
activeProfiles = new ArrayList();
}
activeProfiles.add( profile );
getActiveProfiles().add( profile );
return this;
}
public MavenExecutionRequest addInactiveProfile( String profile )
{
if ( inactiveProfiles == null )
{
inactiveProfiles = new ArrayList();
}
inactiveProfiles.add( profile );
getInactiveProfiles().add( profile );
return this;
}
public MavenExecutionRequest addActiveProfiles( List profiles )
{
if ( activeProfiles == null )
{
activeProfiles = new ArrayList();
}
activeProfiles.addAll( profiles );
getActiveProfiles().addAll( profiles );
return this;
}
public MavenExecutionRequest addInactiveProfiles( List profiles )
{
if ( inactiveProfiles == null )
{
inactiveProfiles = new ArrayList();
}
inactiveProfiles.addAll( profiles );
getInactiveProfiles().addAll( profiles );
return this;
}