Author: jdcasey
Date: Mon May 4 22:33:20 2009
New Revision: 771478
URL: http://svn.apache.org/viewvc?rev=771478&view=rev
Log:
Revert r771294 and r770570 to try again with generic conversion, this time
taking more time to review any automated code changes by Eclipse.
Modified:
maven/components/branches/maven-2.2.0-RC/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java
maven/components/branches/maven-2.2.0-RC/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
Modified:
maven/components/branches/maven-2.2.0-RC/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java
URL:
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.0-RC/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java?rev=771478&r1=771477&r2=771478&view=diff
==============================================================================
---
maven/components/branches/maven-2.2.0-RC/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java
(original)
+++
maven/components/branches/maven-2.2.0-RC/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java
Mon May 4 22:33:20 2009
@@ -86,13 +86,13 @@
baseVersion;
}
- public static Map<String, Artifact> artifactMapByVersionlessId(
Collection<Artifact> artifacts )
+ public static Map artifactMapByVersionlessId( Collection artifacts )
{
- Map<String, Artifact> artifactMap = new LinkedHashMap<String,
Artifact>();
+ Map artifactMap = new LinkedHashMap();
if ( artifacts != null )
{
- for ( Iterator<Artifact> it = artifacts.iterator(); it.hasNext(); )
+ for ( Iterator it = artifacts.iterator(); it.hasNext(); )
{
Artifact artifact = (Artifact) it.next();
Modified:
maven/components/branches/maven-2.2.0-RC/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
URL:
http://svn.apache.org/viewvc/maven/components/branches/maven-2.2.0-RC/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=771478&r1=771477&r2=771478&view=diff
==============================================================================
---
maven/components/branches/maven-2.2.0-RC/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
(original)
+++
maven/components/branches/maven-2.2.0-RC/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
Mon May 4 22:33:20 2009
@@ -36,10 +36,10 @@
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.ArtifactUtils;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
+import org.apache.maven.artifact.versioning.ManagedVersionMap;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.versioning.ManagedVersionMap;
import org.apache.maven.model.Build;
import org.apache.maven.model.CiManagement;
import org.apache.maven.model.Contributor;
@@ -47,7 +47,6 @@
import org.apache.maven.model.DependencyManagement;
import org.apache.maven.model.Developer;
import org.apache.maven.model.DistributionManagement;
-import org.apache.maven.model.Extension;
import org.apache.maven.model.IssueManagement;
import org.apache.maven.model.License;
import org.apache.maven.model.MailingList;
@@ -57,11 +56,9 @@
import org.apache.maven.model.PluginExecution;
import org.apache.maven.model.PluginManagement;
import org.apache.maven.model.Prerequisites;
-import org.apache.maven.model.Profile;
import org.apache.maven.model.ReportPlugin;
import org.apache.maven.model.ReportSet;
import org.apache.maven.model.Reporting;
-import org.apache.maven.model.Repository;
import org.apache.maven.model.Resource;
import org.apache.maven.model.Scm;
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
@@ -88,86 +85,86 @@
implements Cloneable
{
public static final String EMPTY_PROJECT_GROUP_ID = "unknown";
-
+
public static final String EMPTY_PROJECT_ARTIFACT_ID = "empty-project";
-
+
public static final String EMPTY_PROJECT_VERSION = "0";
-
+
private Model model;
private MavenProject parent;
private File file;
- private Set<Artifact> artifacts;
+ private Set artifacts;
private Artifact parentArtifact;
- private Set<Artifact> pluginArtifacts;
+ private Set pluginArtifacts;
- private List<ArtifactRepository> remoteArtifactRepositories;
+ private List remoteArtifactRepositories;
- private List<MavenProject> collectedProjects = Collections.<MavenProject>
emptyList();
+ private List collectedProjects = Collections.EMPTY_LIST;
- private List<Artifact> attachedArtifacts;
+ private List attachedArtifacts;
private MavenProject executionProject;
- private List<String> compileSourceRoots = new ArrayList<String>();
+ private List compileSourceRoots = new ArrayList();
- private List<String> testCompileSourceRoots = new ArrayList<String>();
+ private List testCompileSourceRoots = new ArrayList();
- private List<String> scriptSourceRoots = new ArrayList<String>();
+ private List scriptSourceRoots = new ArrayList();
- private List<ArtifactRepository> pluginArtifactRepositories;
+ private List pluginArtifactRepositories;
private ArtifactRepository releaseArtifactRepository;
private ArtifactRepository snapshotArtifactRepository;
- private List<Profile> activeProfiles = new ArrayList<Profile>();
+ private List activeProfiles = new ArrayList();
- private Set<Artifact> dependencyArtifacts;
+ private Set dependencyArtifacts;
private Artifact artifact;
// calculated.
- private Map<String, Artifact> artifactMap;
+ private Map artifactMap;
private Model originalModel;
- private Map<String, Artifact> pluginArtifactMap;
+ private Map pluginArtifactMap;
- private Set<Artifact> reportArtifacts;
+ private Set reportArtifacts;
- private Map<String, Artifact> reportArtifactMap;
+ private Map reportArtifactMap;
- private Set<Artifact> extensionArtifacts;
+ private Set extensionArtifacts;
- private Map<String, Artifact> extensionArtifactMap;
+ private Map extensionArtifactMap;
- private Map<String, Artifact> managedVersionMap;
+ private Map managedVersionMap;
- private Map<String, MavenProject> projectReferences = new HashMap<String,
MavenProject>();
+ private Map projectReferences = new HashMap();
private boolean executionRoot;
-
- private Map<String, String> moduleAdjustments;
+
+ private Map moduleAdjustments;
private File basedir;
-
+
private Logger logger;
-
+
private ProjectBuilderConfiguration projectBuilderConfiguration;
-
+
public MavenProject()
{
Model model = new Model();
-
+
model.setGroupId( EMPTY_PROJECT_GROUP_ID );
model.setArtifactId( EMPTY_PROJECT_ARTIFACT_ID );
model.setVersion( EMPTY_PROJECT_VERSION );
-
+
this.setModel( model );
}
@@ -248,23 +245,23 @@
if ( project.getAttachedArtifacts() != null )
{
// clone properties modifyable by plugins in a forked lifecycle
- setAttachedArtifacts( new ArrayList<Artifact>(
project.getAttachedArtifacts() ) );
+ setAttachedArtifacts( new ArrayList(
project.getAttachedArtifacts() ) );
}
if ( project.getCompileSourceRoots() != null )
{
// clone source roots
- setCompileSourceRoots( ( new ArrayList<String>(
project.getCompileSourceRoots() ) ) );
+ setCompileSourceRoots( ( new ArrayList(
project.getCompileSourceRoots() ) ) );
}
if ( project.getTestCompileSourceRoots() != null )
{
- setTestCompileSourceRoots( ( new ArrayList<String>(
project.getTestCompileSourceRoots() ) ) );
+ setTestCompileSourceRoots( ( new ArrayList(
project.getTestCompileSourceRoots() ) ) );
}
if ( project.getScriptSourceRoots() != null )
{
- setScriptSourceRoots( ( new ArrayList<String>(
project.getScriptSourceRoots() ) ) );
+ setScriptSourceRoots( ( new ArrayList(
project.getScriptSourceRoots() ) ) );
}
setModel( ( ModelUtils.cloneModel( project.getModel() ) ) );
@@ -285,12 +282,12 @@
{
setManagedVersionMap( new ManagedVersionMap(
project.getManagedVersionMap() ) );
}
-
+
if ( project.getReleaseArtifactRepository() != null )
{
setReleaseArtifactRepository(
project.getReleaseArtifactRepository() );
}
-
+
if ( project.getSnapshotArtifactRepository() != null )
{
setSnapshotArtifactRepository(
project.getSnapshotArtifactRepository() );
@@ -301,25 +298,25 @@
setDynamicBuild( ModelUtils.cloneBuild( project.getDynamicBuild()
) );
setOriginalInterpolatedBuild( ModelUtils.cloneBuild(
project.getOriginalInterpolatedBuild() ) );
- List<String> dynamicRoots = project.getDynamicCompileSourceRoots();
+ List dynamicRoots = project.getDynamicCompileSourceRoots();
if ( dynamicRoots != null )
{
- setDynamicCompileSourceRoots( new ArrayList<String>(
dynamicRoots ) );
- setOriginalInterpolatedCompileSourceRoots( new
ArrayList<String>( project.getOriginalInterpolatedCompileSourceRoots() ) );
+ setDynamicCompileSourceRoots( new ArrayList( dynamicRoots ) );
+ setOriginalInterpolatedCompileSourceRoots( new ArrayList(
project.getOriginalInterpolatedCompileSourceRoots() ) );
}
dynamicRoots = project.getDynamicTestCompileSourceRoots();
if ( dynamicRoots != null )
{
- setDynamicTestCompileSourceRoots( new ArrayList<String>(
dynamicRoots ) );
- setOriginalInterpolatedTestCompileSourceRoots( new
ArrayList<String>( project.getOriginalInterpolatedTestCompileSourceRoots() ) );
+ setDynamicTestCompileSourceRoots( new ArrayList( dynamicRoots
) );
+ setOriginalInterpolatedTestCompileSourceRoots( new ArrayList(
project.getOriginalInterpolatedTestCompileSourceRoots() ) );
}
dynamicRoots = project.getDynamicScriptSourceRoots();
if ( dynamicRoots != null )
{
- setDynamicScriptSourceRoots( new ArrayList<String>(
dynamicRoots ) );
- setOriginalInterpolatedScriptSourceRoots( new
ArrayList<String>( project.getOriginalInterpolatedScriptSourceRoots() ) );
+ setDynamicScriptSourceRoots( new ArrayList( dynamicRoots ) );
+ setOriginalInterpolatedScriptSourceRoots( new ArrayList(
project.getOriginalInterpolatedScriptSourceRoots() ) );
}
}
@@ -327,53 +324,53 @@
preservedBasedir = project.preservedBasedir;
setConcrete( project.isConcrete() );
}
-
+
public String getModulePathAdjustment( MavenProject moduleProject ) throws
IOException
{
// FIXME: This is hacky. What if module directory doesn't match
artifactid, and parent
// is coming from the repository??
-
- // FIXME: If there is a hierarchy of three projects, with the url
specified at the top,
+
+ // FIXME: If there is a hierarchy of three projects, with the url
specified at the top,
// and the top two projects are referenced from copies that are in the
repository, the
// middle-level POM doesn't have a File associated with it (or the
file's directory is
// of an unexpected name), and module path adjustments fail.
String module = moduleProject.getArtifactId();
-
+
File moduleFile = moduleProject.getFile();
-
+
if ( moduleFile != null )
{
File moduleDir = moduleFile.getCanonicalFile().getParentFile();
-
+
module = moduleDir.getName();
}
-
+
if ( moduleAdjustments == null )
{
- moduleAdjustments = new HashMap<String, String>();
-
- List<String> modules = getModules();
+ moduleAdjustments = new HashMap();
+
+ List modules = getModules();
if ( modules != null )
{
- for ( Iterator<String> it = modules.iterator(); it.hasNext(); )
+ for ( Iterator it = modules.iterator(); it.hasNext(); )
{
String modulePath = (String) it.next();
String moduleName = modulePath;
-
+
if ( moduleName.endsWith( "/" ) || moduleName.endsWith(
"\\" ) )
{
moduleName = moduleName.substring( 0,
moduleName.length() - 1 );
}
-
+
int lastSlash = moduleName.lastIndexOf( '/' );
-
+
if ( lastSlash < 0 )
{
lastSlash = moduleName.lastIndexOf( '\\' );
}
-
+
String adjustment = null;
-
+
if ( lastSlash > -1 )
{
moduleName = moduleName.substring( lastSlash + 1 );
@@ -384,7 +381,7 @@
}
}
}
-
+
return (String) moduleAdjustments.get( module );
}
@@ -418,12 +415,12 @@
this.parent = parent;
}
- public void setRemoteArtifactRepositories( List<ArtifactRepository>
remoteArtifactRepositories )
+ public void setRemoteArtifactRepositories( List remoteArtifactRepositories
)
{
this.remoteArtifactRepositories = remoteArtifactRepositories;
}
- public List<ArtifactRepository> getRemoteArtifactRepositories()
+ public List getRemoteArtifactRepositories()
{
return remoteArtifactRepositories;
}
@@ -444,15 +441,15 @@
{
return;
}
-
+
if ( basedir == null )
{
basedir = file.getParentFile();
}
-
+
this.file = file;
}
-
+
public void setBasedir( File basedir )
{
this.basedir = basedir;
@@ -463,12 +460,12 @@
return basedir;
}
- public void setDependencies( List<Dependency> dependencies )
+ public void setDependencies( List dependencies )
{
getModel().setDependencies( dependencies );
}
- public List<Dependency> getDependencies()
+ public List getDependencies()
{
return getModel().getDependencies();
}
@@ -527,29 +524,29 @@
}
}
- public List<String> getCompileSourceRoots()
+ public List getCompileSourceRoots()
{
return compileSourceRoots;
}
- public List<String> getScriptSourceRoots()
+ public List getScriptSourceRoots()
{
return scriptSourceRoots;
}
- public List<String> getTestCompileSourceRoots()
+ public List getTestCompileSourceRoots()
{
return testCompileSourceRoots;
}
- public List<String> getCompileClasspathElements()
+ public List getCompileClasspathElements()
throws DependencyResolutionRequiredException
{
- List<String> list = new ArrayList<String>( getArtifacts().size() );
+ List list = new ArrayList( getArtifacts().size() );
list.add( getBuild().getOutputDirectory() );
- for ( Iterator<?> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -566,11 +563,11 @@
return list;
}
- public List<Artifact> getCompileArtifacts()
+ public List getCompileArtifacts()
{
- List<Artifact> list = new ArrayList<Artifact>( getArtifacts().size() );
+ List list = new ArrayList( getArtifacts().size() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -588,18 +585,18 @@
return list;
}
- public List<Dependency> getCompileDependencies()
+ public List getCompileDependencies()
{
- Set<Artifact> artifacts = getArtifacts();
+ Set artifacts = getArtifacts();
if ( artifacts == null || artifacts.isEmpty() )
{
- return Collections.<Dependency> emptyList();
+ return Collections.EMPTY_LIST;
}
- List<Dependency> list = new ArrayList<Dependency>( artifacts.size() );
+ List list = new ArrayList( artifacts.size() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -622,16 +619,16 @@
return list;
}
- public List<String> getTestClasspathElements()
+ public List getTestClasspathElements()
throws DependencyResolutionRequiredException
{
- List<String> list = new ArrayList<String>( getArtifacts().size() + 1 );
+ List list = new ArrayList( getArtifacts().size() + 1 );
list.add( getBuild().getTestOutputDirectory() );
list.add( getBuild().getOutputDirectory() );
-
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -655,11 +652,11 @@
return list;
}
- public List<Artifact> getTestArtifacts()
+ public List getTestArtifacts()
{
- List<Artifact> list = new ArrayList<Artifact>( getArtifacts().size() );
+ List list = new ArrayList( getArtifacts().size() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -681,18 +678,18 @@
return list;
}
- public List<Dependency> getTestDependencies()
+ public List getTestDependencies()
{
- Set<Artifact> artifacts = getArtifacts();
+ Set artifacts = getArtifacts();
if ( artifacts == null || artifacts.isEmpty() )
{
- return Collections.emptyList();
+ return Collections.EMPTY_LIST;
}
- List<Dependency> list = new ArrayList<Dependency>( artifacts.size() );
+ List list = new ArrayList( artifacts.size() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -718,14 +715,14 @@
return list;
}
- public List<String> getRuntimeClasspathElements()
+ public List getRuntimeClasspathElements()
throws DependencyResolutionRequiredException
{
- List<String> list = new ArrayList<String>( getArtifacts().size() + 1 );
+ List list = new ArrayList( getArtifacts().size() + 1 );
list.add( getBuild().getOutputDirectory() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -746,11 +743,11 @@
return list;
}
- public List<Artifact> getRuntimeArtifacts()
+ public List getRuntimeArtifacts()
{
- List<Artifact> list = new ArrayList<Artifact>( getArtifacts().size() );
+ List list = new ArrayList( getArtifacts().size() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -767,18 +764,18 @@
return list;
}
- public List<Dependency> getRuntimeDependencies()
+ public List getRuntimeDependencies()
{
- Set<Artifact> artifacts = getArtifacts();
+ Set artifacts = getArtifacts();
if ( artifacts == null || artifacts.isEmpty() )
{
- return Collections.<Dependency> emptyList();
+ return Collections.EMPTY_LIST;
}
- List<Dependency> list = new ArrayList<Dependency>( artifacts.size() );
+ List list = new ArrayList( artifacts.size() );
- for ( Iterator<Artifact> i = artifacts.iterator(); i.hasNext(); )
+ for ( Iterator i = artifacts.iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -800,14 +797,14 @@
return list;
}
- public List<String> getSystemClasspathElements()
+ public List getSystemClasspathElements()
throws DependencyResolutionRequiredException
{
- List<String> list = new ArrayList<String>( getArtifacts().size() );
+ List list = new ArrayList( getArtifacts().size() );
list.add( getBuild().getOutputDirectory() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -823,11 +820,11 @@
return list;
}
- public List<Artifact> getSystemArtifacts()
+ public List getSystemArtifacts()
{
- List<Artifact> list = new ArrayList<Artifact>( getArtifacts().size() );
+ List list = new ArrayList( getArtifacts().size() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -844,18 +841,18 @@
return list;
}
- public List<Dependency> getSystemDependencies()
+ public List getSystemDependencies()
{
- Set<Artifact> artifacts = getArtifacts();
+ Set artifacts = getArtifacts();
if ( artifacts == null || artifacts.isEmpty() )
{
- return Collections.<Dependency> emptyList();
+ return Collections.EMPTY_LIST;
}
- List<Dependency> list = new ArrayList<Dependency>( artifacts.size() );
+ List list = new ArrayList( artifacts.size() );
- for ( Iterator<Artifact> i = getArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
@@ -909,7 +906,7 @@
{
groupId = getModel().getParent().getGroupId();
}
-
+
return groupId;
}
@@ -954,7 +951,7 @@
{
version = getModel().getParent().getVersion();
}
-
+
return version;
}
@@ -1053,12 +1050,12 @@
return getModel().getScm();
}
- public void setMailingLists( List<MailingList> mailingLists )
+ public void setMailingLists( List mailingLists )
{
getModel().setMailingLists( mailingLists );
}
- public List<?> getMailingLists()
+ public List getMailingLists()
{
return getModel().getMailingLists();
}
@@ -1068,12 +1065,12 @@
getModel().addMailingList( mailingList );
}
- public void setDevelopers( List<Developer> developers )
+ public void setDevelopers( List developers )
{
getModel().setDevelopers( developers );
}
- public List<Developer> getDevelopers()
+ public List getDevelopers()
{
return getModel().getDevelopers();
}
@@ -1083,12 +1080,12 @@
getModel().addDeveloper( developer );
}
- public void setContributors( List<Contributor> contributors )
+ public void setContributors( List contributors )
{
getModel().setContributors( contributors );
}
- public List<Contributor> getContributors()
+ public List getContributors()
{
return getModel().getContributors();
}
@@ -1108,12 +1105,12 @@
return getModelBuild();
}
- public List<Resource> getResources()
+ public List getResources()
{
return getBuild().getResources();
}
- public List<Resource> getTestResources()
+ public List getTestResources()
{
return getBuild().getTestResources();
}
@@ -1138,12 +1135,12 @@
return getModel().getReporting();
}
- public void setLicenses( List<License> licenses )
+ public void setLicenses( List licenses )
{
getModel().setLicenses( licenses );
}
- public List<License> getLicenses()
+ public List getLicenses()
{
return getModel().getLicenses();
}
@@ -1153,7 +1150,7 @@
getModel().addLicense( license );
}
- public void setArtifacts( Set<Artifact> artifacts )
+ public void setArtifacts( Set artifacts )
{
this.artifacts = artifacts;
@@ -1162,19 +1159,18 @@
}
/**
- * All dependencies that this project has, including transitive ones.
Contents are lazily populated, so depending on
- * what phases have run dependencies in some scopes won't be included. eg.
if only compile phase has run,
- * dependencies with scope test won't be included.
- *
+ * All dependencies that this project has, including transitive ones.
+ * Contents are lazily populated, so depending on what phases have run
dependencies in some scopes won't be included.
+ * eg. if only compile phase has run, dependencies with scope test won't
be included.
* @return {...@link Set} < {...@link Artifact} >
* @see #getDependencyArtifacts() to get only direct dependencies
*/
- public Set<Artifact> getArtifacts()
+ public Set getArtifacts()
{
- return artifacts == null ? Collections.<Artifact> emptySet() :
artifacts;
+ return artifacts == null ? Collections.EMPTY_SET : artifacts;
}
- public Map<String, Artifact> getArtifactMap()
+ public Map getArtifactMap()
{
if ( artifactMap == null )
{
@@ -1184,19 +1180,19 @@
return artifactMap;
}
- public void setPluginArtifacts( Set<Artifact> pluginArtifacts )
+ public void setPluginArtifacts( Set pluginArtifacts )
{
this.pluginArtifacts = pluginArtifacts;
this.pluginArtifactMap = null;
}
- public Set<Artifact> getPluginArtifacts()
+ public Set getPluginArtifacts()
{
return pluginArtifacts;
}
- public Map<String, Artifact> getPluginArtifactMap()
+ public Map getPluginArtifactMap()
{
if ( pluginArtifactMap == null )
{
@@ -1206,19 +1202,19 @@
return pluginArtifactMap;
}
- public void setReportArtifacts( Set<Artifact> reportArtifacts )
+ public void setReportArtifacts( Set reportArtifacts )
{
this.reportArtifacts = reportArtifacts;
this.reportArtifactMap = null;
}
- public Set<Artifact> getReportArtifacts()
+ public Set getReportArtifacts()
{
return reportArtifacts;
}
- public Map<String, Artifact> getReportArtifactMap()
+ public Map getReportArtifactMap()
{
if ( reportArtifactMap == null )
{
@@ -1228,19 +1224,19 @@
return reportArtifactMap;
}
- public void setExtensionArtifacts( Set<Artifact> extensionArtifacts )
+ public void setExtensionArtifacts( Set extensionArtifacts )
{
this.extensionArtifacts = extensionArtifacts;
this.extensionArtifactMap = null;
}
- public Set<Artifact> getExtensionArtifacts()
+ public Set getExtensionArtifacts()
{
return this.extensionArtifacts;
}
- public Map<String, Artifact> getExtensionArtifactMap()
+ public Map getExtensionArtifactMap()
{
if ( extensionArtifactMap == null )
{
@@ -1260,7 +1256,7 @@
return parentArtifact;
}
- public List<Repository> getRepositories()
+ public List getRepositories()
{
return getModel().getRepositories();
}
@@ -1269,7 +1265,7 @@
// Plugins
// ----------------------------------------------------------------------
- public List<ReportPlugin> getReportPlugins()
+ public List getReportPlugins()
{
if ( getModel().getReporting() == null )
{
@@ -1279,7 +1275,7 @@
}
- public List<Plugin> getBuildPlugins()
+ public List getBuildPlugins()
{
if ( getModel().getBuild() == null )
{
@@ -1288,7 +1284,7 @@
return getModel().getBuild().getPlugins();
}
- public List<String> getModules()
+ public List getModules()
{
return getModel().getModules();
}
@@ -1305,7 +1301,7 @@
return pluginMgmt;
}
-
+
private Build getModelBuild()
{
Build build = getModel().getBuild();
@@ -1316,7 +1312,7 @@
getModel().setBuild( build );
}
-
+
return build;
}
@@ -1332,14 +1328,14 @@
build.flushPluginMap();
}
}
-
+
public void injectPluginManagementInfo( Plugin plugin )
{
PluginManagement pm = getModelBuild().getPluginManagement();
if ( pm != null )
{
- Map<String, Plugin> pmByKey = pm.getPluginsAsMap();
+ Map pmByKey = pm.getPluginsAsMap();
String pluginKey = plugin.getKey();
@@ -1352,17 +1348,17 @@
}
}
- public List<MavenProject> getCollectedProjects()
+ public List getCollectedProjects()
{
return collectedProjects;
}
- public void setCollectedProjects( List<MavenProject> collectedProjects )
+ public void setCollectedProjects( List collectedProjects )
{
this.collectedProjects = collectedProjects;
}
- public void setPluginArtifactRepositories( List<ArtifactRepository>
pluginArtifactRepositories )
+ public void setPluginArtifactRepositories( List pluginArtifactRepositories
)
{
this.pluginArtifactRepositories = pluginArtifactRepositories;
}
@@ -1371,7 +1367,7 @@
* @return a list of ArtifactRepository objects constructed
* from the Repository objects returned by getPluginRepositories.
*/
- public List<ArtifactRepository> getPluginArtifactRepositories()
+ public List getPluginArtifactRepositories()
{
return pluginArtifactRepositories;
}
@@ -1382,17 +1378,17 @@
: getReleaseArtifactRepository();
}
- public List<Repository> getPluginRepositories()
+ public List getPluginRepositories()
{
return getModel().getPluginRepositories();
}
- public void setActiveProfiles( List<Profile> activeProfiles )
+ public void setActiveProfiles( List activeProfiles )
{
this.activeProfiles.addAll( activeProfiles );
}
- public List<Profile> getActiveProfiles()
+ public List getActiveProfiles()
{
return activeProfiles;
}
@@ -1402,11 +1398,11 @@
getAttachedArtifacts().add( artifact );
}
- public List<Artifact> getAttachedArtifacts()
+ public List getAttachedArtifacts()
{
if ( attachedArtifacts == null )
{
- attachedArtifacts = new ArrayList<Artifact>();
+ attachedArtifacts = new ArrayList();
}
return attachedArtifacts;
}
@@ -1424,7 +1420,7 @@
if ( getBuildPlugins() != null )
{
- for ( Iterator<Plugin> iterator = getBuildPlugins().iterator();
iterator.hasNext(); )
+ for ( Iterator iterator = getBuildPlugins().iterator();
iterator.hasNext(); )
{
Plugin plugin = (Plugin) iterator.next();
@@ -1449,7 +1445,7 @@
}
}
}
-
+
// PluginManagement pluginManagement = getBuild().getPluginManagement();
// if ( pluginManagement != null && pluginManagement.getPlugins() !=
null )
// {
@@ -1474,7 +1470,7 @@
// }
// }
// }
- //
+//
// dom = Xpp3Dom.mergeXpp3Dom( dom, managedDom );
// break;
// }
@@ -1502,7 +1498,7 @@
if ( getReportPlugins() != null )
{
- for ( Iterator<ReportPlugin> iterator =
getReportPlugins().iterator(); iterator.hasNext(); )
+ for ( Iterator iterator = getReportPlugins().iterator();
iterator.hasNext(); )
{
ReportPlugin plugin = (ReportPlugin) iterator.next();
@@ -1568,12 +1564,12 @@
* @return {...@link Set} < {...@link Artifact} >
* @see #getArtifacts() to get all transitive dependencies
*/
- public Set<Artifact> getDependencyArtifacts()
+ public Set getDependencyArtifacts()
{
return dependencyArtifacts;
}
- public void setDependencyArtifacts( Set<Artifact> dependencyArtifacts )
+ public void setDependencyArtifacts( Set dependencyArtifacts )
{
this.dependencyArtifacts = dependencyArtifacts;
}
@@ -1598,12 +1594,12 @@
return originalModel;
}
- public void setManagedVersionMap( Map<String, Artifact> map )
+ public void setManagedVersionMap( Map map )
{
this.managedVersionMap = map;
}
- public Map<String, Artifact> getManagedVersionMap()
+ public Map getManagedVersionMap()
{
return this.managedVersionMap;
}
@@ -1631,12 +1627,12 @@
return getId().hashCode();
}
- public List<Extension> getBuildExtensions()
+ public List getBuildExtensions()
{
Build build = getBuild();
if ( build == null || build.getExtensions() == null )
{
- return Collections.<Extension> emptyList();
+ return Collections.EMPTY_LIST;
}
else
{
@@ -1648,7 +1644,7 @@
* @todo the lazy initialisation of this makes me uneasy.
* @return {...@link Set} < {...@link Artifact} >
*/
- public Set<Artifact> createArtifacts( ArtifactFactory artifactFactory,
String inheritedScope,
+ public Set createArtifacts( ArtifactFactory artifactFactory, String
inheritedScope,
ArtifactFilter dependencyFilter )
throws InvalidDependencyVersionException
{
@@ -1678,12 +1674,12 @@
return getModel().getProperties();
}
- public List<String> getFilters()
+ public List getFilters()
{
return getBuild().getFilters();
}
- public Map<String, MavenProject> getProjectReferences()
+ public Map getProjectReferences()
{
return projectReferences;
}
@@ -1709,22 +1705,22 @@
this.model = model;
}
- protected void setAttachedArtifacts( List<Artifact> attachedArtifacts )
+ protected void setAttachedArtifacts( List attachedArtifacts )
{
this.attachedArtifacts = attachedArtifacts;
}
- protected void setCompileSourceRoots( List<String> compileSourceRoots )
+ protected void setCompileSourceRoots( List compileSourceRoots )
{
this.compileSourceRoots = compileSourceRoots;
}
- protected void setTestCompileSourceRoots( List<String>
testCompileSourceRoots )
+ protected void setTestCompileSourceRoots( List testCompileSourceRoots )
{
this.testCompileSourceRoots = testCompileSourceRoots;
}
- protected void setScriptSourceRoots( List<String> scriptSourceRoots )
+ protected void setScriptSourceRoots( List scriptSourceRoots )
{
this.scriptSourceRoots = scriptSourceRoots;
}
@@ -1738,31 +1734,31 @@
{
return snapshotArtifactRepository;
}
-
+
public void resolveActiveArtifacts()
{
- Set<Artifact> depArtifacts = getDependencyArtifacts();
+ Set depArtifacts = getDependencyArtifacts();
if ( depArtifacts == null )
{
return;
}
-
- Set<Artifact> updated = new LinkedHashSet<Artifact>(
depArtifacts.size() );
+
+ Set updated = new LinkedHashSet( depArtifacts.size() );
int updatedCount = 0;
-
- for ( Iterator<Artifact> it = depArtifacts.iterator(); it.hasNext(); )
+
+ for ( Iterator it = depArtifacts.iterator(); it.hasNext(); )
{
Artifact depArtifact = (Artifact) it.next();
Artifact replaced = replaceWithActiveArtifact( depArtifact );
-
+
if ( depArtifact != replaced )
{
updatedCount++;
}
-
+
updated.add( replaced );
}
-
+
if ( updatedCount > 0 )
{
setDependencyArtifacts( updated );
@@ -1819,13 +1815,13 @@
* @param requestedArtifact The artifact to resolve, must not be
<code>null</code>.
* @return The matching artifact or <code>null</code> if not found.
*/
- private Artifact findMatchingArtifact( List<Artifact> artifacts, Artifact
requestedArtifact )
+ private Artifact findMatchingArtifact( List artifacts, Artifact
requestedArtifact )
{
if ( artifacts != null && !artifacts.isEmpty() )
{
// first try matching by dependency conflict id
String requestedId = requestedArtifact.getDependencyConflictId();
- for ( Iterator<Artifact> it = artifacts.iterator(); it.hasNext(); )
+ for ( Iterator it = artifacts.iterator(); it.hasNext(); )
{
Artifact artifact = (Artifact) it.next();
if ( requestedId.equals( artifact.getDependencyConflictId() ) )
@@ -1836,7 +1832,7 @@
// next try matching by repository conflict id
requestedId = getRepositoryConflictId( requestedArtifact );
- for ( Iterator<Artifact> it = artifacts.iterator(); it.hasNext(); )
+ for ( Iterator it = artifacts.iterator(); it.hasNext(); )
{
Artifact artifact = (Artifact) it.next();
if ( requestedId.equals( getRepositoryConflictId( artifact ) )
)
@@ -1883,7 +1879,7 @@
{
return;
}
-
+
if ( logger.isDebugEnabled() )
{
StringBuffer message = new StringBuffer();
@@ -1893,7 +1889,7 @@
message.append( "\nRequested Dependency: " ).append(
artifact.getId() );
message.append( "\n\nNOTE: You may need to run this build to the
'compile' lifecycle phase, or farther, in order to build the dependency
artifact." );
message.append( "\n" );
-
+
logger.debug( message.toString() );
}
else
@@ -1902,7 +1898,7 @@
}
}
- private void addArtifactPath(Artifact a, List<String> list) throws
DependencyResolutionRequiredException
+ private void addArtifactPath(Artifact a, List list) throws
DependencyResolutionRequiredException
{
File file = a.getFile();
if ( file == null )
@@ -1911,7 +1907,7 @@
}
list.add( file.getPath() );
}
-
+
/**
* Default toString
*/
@@ -1925,8 +1921,8 @@
sb.append( ":" );
sb.append( this.getVersion() );
sb.append( " @ " );
-
- try
+
+ try
{
sb.append( this.getFile().getPath() );
}
@@ -1934,10 +1930,10 @@
{
//don't log it.
}
-
- return sb.toString();
+
+ return sb.toString();
}
-
+
/**
* @throws CloneNotSupportedException
* @since 2.0.9
@@ -1953,22 +1949,22 @@
// ----------------------------------------------------------------------------
// CODE BELOW IS USED TO PRESERVE DYNAMISM IN THE BUILD SECTION OF THE POM.
// ----------------------------------------------------------------------------
-
+
private Build dynamicBuild;
private Build originalInterpolatedBuild;
- private List<String> dynamicCompileSourceRoots;
+ private List dynamicCompileSourceRoots;
- private List<String> originalInterpolatedCompileSourceRoots;
+ private List originalInterpolatedCompileSourceRoots;
- private List<String> dynamicTestCompileSourceRoots;
+ private List dynamicTestCompileSourceRoots;
- private List<String> originalInterpolatedTestCompileSourceRoots;
+ private List originalInterpolatedTestCompileSourceRoots;
- private List<String> dynamicScriptSourceRoots;
+ private List dynamicScriptSourceRoots;
- private List<String> originalInterpolatedScriptSourceRoots;
+ private List originalInterpolatedScriptSourceRoots;
private boolean isConcrete = false;
@@ -1992,32 +1988,32 @@
return originalInterpolatedBuild;
}
- public List<String> getDynamicCompileSourceRoots()
+ public List getDynamicCompileSourceRoots()
{
return dynamicCompileSourceRoots;
}
- public List<String> getOriginalInterpolatedCompileSourceRoots()
+ public List getOriginalInterpolatedCompileSourceRoots()
{
return originalInterpolatedCompileSourceRoots;
}
- public List<String> getDynamicTestCompileSourceRoots()
+ public List getDynamicTestCompileSourceRoots()
{
return dynamicTestCompileSourceRoots;
}
- public List<String> getOriginalInterpolatedTestCompileSourceRoots()
+ public List getOriginalInterpolatedTestCompileSourceRoots()
{
return originalInterpolatedTestCompileSourceRoots;
}
- public List<String> getDynamicScriptSourceRoots()
+ public List getDynamicScriptSourceRoots()
{
return dynamicScriptSourceRoots;
}
- public List<String> getOriginalInterpolatedScriptSourceRoots()
+ public List getOriginalInterpolatedScriptSourceRoots()
{
return originalInterpolatedScriptSourceRoots;
}
@@ -2038,19 +2034,19 @@
originalInterpolatedBuild = null;
}
- public void preserveCompileSourceRoots( List<String>
originalInterpolatedCompileSourceRoots )
+ public void preserveCompileSourceRoots( List
originalInterpolatedCompileSourceRoots )
{
dynamicCompileSourceRoots = getCompileSourceRoots();
this.originalInterpolatedCompileSourceRoots =
originalInterpolatedCompileSourceRoots;
}
- public void preserveTestCompileSourceRoots( List<String>
originalInterpolatedTestCompileSourceRoots )
+ public void preserveTestCompileSourceRoots( List
originalInterpolatedTestCompileSourceRoots )
{
dynamicTestCompileSourceRoots = getTestCompileSourceRoots();
this.originalInterpolatedTestCompileSourceRoots =
originalInterpolatedTestCompileSourceRoots;
}
- public void preserveScriptSourceRoots( List<String>
originalInterpolatedScriptSourceRoots )
+ public void preserveScriptSourceRoots( List
originalInterpolatedScriptSourceRoots )
{
dynamicScriptSourceRoots = getScriptSourceRoots();
this.originalInterpolatedScriptSourceRoots =
originalInterpolatedScriptSourceRoots;
@@ -2075,38 +2071,38 @@
this.originalInterpolatedBuild = originalInterpolatedBuild;
}
- protected void setDynamicCompileSourceRoots( List<String>
dynamicCompileSourceRoots )
+ protected void setDynamicCompileSourceRoots( List
dynamicCompileSourceRoots )
{
this.dynamicCompileSourceRoots = dynamicCompileSourceRoots;
}
- protected void setOriginalInterpolatedCompileSourceRoots( List<String>
originalInterpolatedCompileSourceRoots )
+ protected void setOriginalInterpolatedCompileSourceRoots( List
originalInterpolatedCompileSourceRoots )
{
this.originalInterpolatedCompileSourceRoots =
originalInterpolatedCompileSourceRoots;
}
- protected void setDynamicTestCompileSourceRoots( List<String>
dynamicTestCompileSourceRoots )
+ protected void setDynamicTestCompileSourceRoots( List
dynamicTestCompileSourceRoots )
{
this.dynamicTestCompileSourceRoots = dynamicTestCompileSourceRoots;
}
- protected void setOriginalInterpolatedTestCompileSourceRoots( List<String>
originalInterpolatedTestCompileSourceRoots )
+ protected void setOriginalInterpolatedTestCompileSourceRoots( List
originalInterpolatedTestCompileSourceRoots )
{
this.originalInterpolatedTestCompileSourceRoots =
originalInterpolatedTestCompileSourceRoots;
}
- protected void setDynamicScriptSourceRoots( List<String>
dynamicScriptSourceRoots )
+ protected void setDynamicScriptSourceRoots( List dynamicScriptSourceRoots )
{
this.dynamicScriptSourceRoots = dynamicScriptSourceRoots;
}
- protected void setOriginalInterpolatedScriptSourceRoots( List<String>
originalInterpolatedScriptSourceRoots )
+ protected void setOriginalInterpolatedScriptSourceRoots( List
originalInterpolatedScriptSourceRoots )
{
this.originalInterpolatedScriptSourceRoots =
originalInterpolatedScriptSourceRoots;
}
-
+
private Properties preservedProperties;
-
+
public Properties getPreservedProperties()
{
return preservedProperties;
@@ -2118,16 +2114,16 @@
if ( p != null )
{
preservedProperties = new Properties();
- for( Enumeration<?> e = p.propertyNames(); e.hasMoreElements(); )
+ for( Enumeration e = p.propertyNames(); e.hasMoreElements(); )
{
String key = (String) e.nextElement();
preservedProperties.setProperty( key, p.getProperty( key ) );
}
}
}
-
+
private File preservedBasedir;
-
+
public File getPreservedBasedir()
{
return preservedBasedir;