mirror of https://github.com/apache/maven.git
reformat and optimize imports
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191627 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
40a257ff11
commit
b138c8d378
|
@ -56,13 +56,13 @@
|
|||
<required>true</required>
|
||||
<version>1.0.0</version>
|
||||
<type>String</type>
|
||||
<description>The ID of this build profile, for activation
|
||||
<description>The ID of this build profile, for activation
|
||||
purposes.</description>
|
||||
</field>
|
||||
<field>
|
||||
<name>activation</name>
|
||||
<version>1.0.0</version>
|
||||
<description><![CDATA[The conditional logic which will automatically
|
||||
<description><![CDATA[The conditional logic which will automatically
|
||||
trigger the inclusion of this profile.]]></description>
|
||||
<association>
|
||||
<type>Activation</type>
|
||||
|
@ -70,7 +70,7 @@
|
|||
</field>
|
||||
<field>
|
||||
<name>properties</name>
|
||||
<description>Extended configuration specific to this profile goes
|
||||
<description>Extended configuration specific to this profile goes
|
||||
here.</description>
|
||||
<type>Properties</type>
|
||||
<association xml.mapStyle="inline">
|
||||
|
@ -82,7 +82,7 @@
|
|||
<name>repositories</name>
|
||||
<version>1.0.0</version>
|
||||
<description><![CDATA[The lists of the remote repositories]]>
|
||||
</description>
|
||||
</description>
|
||||
<association>
|
||||
<type>Repository</type>
|
||||
<multiplicity>*</multiplicity>
|
||||
|
@ -98,8 +98,8 @@
|
|||
<type>Repository</type>
|
||||
<multiplicity>*</multiplicity>
|
||||
</association>
|
||||
<comment><![CDATA[ This may be removed or relocated in the near
|
||||
future. It is undecided whether plugins really need a remote
|
||||
<comment><![CDATA[ This may be removed or relocated in the near
|
||||
future. It is undecided whether plugins really need a remote
|
||||
repository set of their own. ]]></comment>
|
||||
</field>
|
||||
</fields>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<name>Activation</name>
|
||||
<version>1.0.0</version>
|
||||
<description><![CDATA[
|
||||
The conditions within the build runtime environment which will trigger
|
||||
The conditions within the build runtime environment which will trigger
|
||||
the automatic inclusion of the parent build profile.
|
||||
]]></description>
|
||||
<fields>
|
||||
|
@ -167,16 +167,16 @@
|
|||
<field>
|
||||
<name>snapshotPolicy</name>
|
||||
<version>1.0.0</version>
|
||||
<description> The policy for downloading snapshots - can be "always",
|
||||
"daily" (default), "interval:XXX" (in minutes) or "never".
|
||||
</description>
|
||||
<description>The policy for downloading snapshots - can be "always",
|
||||
"daily" (default), "interval:XXX" (in minutes) or "never".
|
||||
</description>
|
||||
<type>String</type>
|
||||
<defaultValue>daily</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>layout</name>
|
||||
<version>1.0.0</version>
|
||||
<description>The type of layout this repository uses for locating and
|
||||
<description>The type of layout this repository uses for locating and
|
||||
storing artifacts - can be "legacy" or "default".</description>
|
||||
<type>String</type>
|
||||
<defaultValue>default</defaultValue>
|
||||
|
@ -184,7 +184,8 @@
|
|||
<field>
|
||||
<name>checksumPolicy</name>
|
||||
<version>1.0.0</version>
|
||||
<description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn"</description>
|
||||
<description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are
|
||||
"fail" or "warn"</description>
|
||||
<type>String</type>
|
||||
<defaultValue>warn</defaultValue>
|
||||
</field>
|
||||
|
|
|
@ -27,24 +27,23 @@ import java.io.IOException;
|
|||
public class DefaultMavenProfilesBuilder
|
||||
implements MavenProfilesBuilder
|
||||
{
|
||||
|
||||
private static final String PROFILES_XML_FILE = "profiles.xml";
|
||||
|
||||
public ProfilesRoot buildProfiles( File basedir )
|
||||
throws IOException, XmlPullParserException
|
||||
{
|
||||
File profilesXml = new File( basedir, PROFILES_XML_FILE );
|
||||
|
||||
|
||||
ProfilesRoot profilesRoot = null;
|
||||
|
||||
if( profilesXml.exists() )
|
||||
|
||||
if ( profilesXml.exists() )
|
||||
{
|
||||
ProfilesXpp3Reader reader = new ProfilesXpp3Reader();
|
||||
FileReader fileReader = null;
|
||||
try
|
||||
{
|
||||
fileReader = new FileReader( profilesXml );
|
||||
|
||||
|
||||
profilesRoot = reader.read( fileReader );
|
||||
}
|
||||
finally
|
||||
|
@ -52,7 +51,7 @@ public class DefaultMavenProfilesBuilder
|
|||
IOUtil.close( fileReader );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return profilesRoot;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ package org.apache.maven.profiles;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.profiles.ProfilesRoot;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
import java.io.File;
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
package org.apache.maven.profiles;
|
||||
|
||||
import org.apache.maven.model.Activation;
|
||||
import org.apache.maven.model.ActivationProperty;
|
||||
import org.apache.maven.model.Profile;
|
||||
import org.apache.maven.model.Repository;
|
||||
import org.apache.maven.profiles.AlwaysOnActivation;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
|
@ -25,9 +16,16 @@ import java.util.List;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.model.Activation;
|
||||
import org.apache.maven.model.ActivationProperty;
|
||||
import org.apache.maven.model.Profile;
|
||||
import org.apache.maven.model.Repository;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class ProfilesConversionUtils
|
||||
{
|
||||
|
||||
private ProfilesConversionUtils()
|
||||
{
|
||||
}
|
||||
|
@ -35,9 +33,9 @@ public class ProfilesConversionUtils
|
|||
public static Profile convertFromProfileXmlProfile( org.apache.maven.profiles.Profile profileXmlProfile )
|
||||
{
|
||||
Profile profile = new Profile();
|
||||
|
||||
|
||||
profile.setId( profileXmlProfile.getId() );
|
||||
|
||||
|
||||
profile.setSource( "profiles.xml" );
|
||||
|
||||
org.apache.maven.profiles.Activation profileActivation = profileXmlProfile.getActivation();
|
||||
|
@ -59,14 +57,14 @@ public class ProfilesConversionUtils
|
|||
|
||||
activation.setProperty( prop );
|
||||
}
|
||||
|
||||
|
||||
profile.setActivation( activation );
|
||||
}
|
||||
else
|
||||
{
|
||||
profile.setActivation( new AlwaysOnActivation() );
|
||||
}
|
||||
|
||||
|
||||
profile.setProperties( profileXmlProfile.getProperties() );
|
||||
|
||||
List repos = profileXmlProfile.getRepositories();
|
||||
|
@ -75,7 +73,8 @@ public class ProfilesConversionUtils
|
|||
for ( Iterator it = repos.iterator(); it.hasNext(); )
|
||||
{
|
||||
profile
|
||||
.addRepository( convertFromProfileXmlRepository( (org.apache.maven.profiles.Repository) it.next() ) );
|
||||
.addRepository(
|
||||
convertFromProfileXmlRepository( (org.apache.maven.profiles.Repository) it.next() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<component-set>
|
||||
<components>
|
||||
<!--
|
||||
<!--
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
Loading…
Reference in New Issue