maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r656493 [2/3] - in /maven/sandbox/branches/MNG-3536/maven-project/src: main/java/org/apache/maven/project/ main/java/org/apache/maven/project/interpolation/ main/java/org/apache/maven/project/interpolation/policies/ test/java/org/apache/mav...
Date Thu, 15 May 2008 02:53:13 GMT

Modified: maven/sandbox/branches/MNG-3536/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/MNG-3536/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=656493&r1=656492&r2=656493&view=diff
==============================================================================
--- maven/sandbox/branches/MNG-3536/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java (original)
+++ maven/sandbox/branches/MNG-3536/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java Wed May 14 19:53:13 2008
@@ -62,9 +62,11 @@
 import org.apache.maven.project.injection.ProfileInjector;
 import org.apache.maven.project.interpolation.ModelInterpolationException;
 import org.apache.maven.project.interpolation.ModelInterpolator;
+import org.apache.maven.project.interpolation.DefaultModelPropertyInterpolator;
 import org.apache.maven.project.path.PathTranslator;
 import org.apache.maven.project.validation.ModelValidationResult;
 import org.apache.maven.project.validation.ModelValidator;
+import org.apache.maven.project.interpolation.policies.*;
 import org.apache.maven.wagon.events.TransferListener;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
@@ -77,6 +79,7 @@
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
@@ -85,19 +88,7 @@
 import java.io.Reader;
 import java.io.StringReader;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeMap;
+import java.util.*;
 
 /*:apt
 
@@ -137,9 +128,8 @@
  * @version $Id$
  */
 public class DefaultMavenProjectBuilder
-    extends AbstractLogEnabled
-    implements MavenProjectBuilder, Initializable, Contextualizable
-{
+        extends AbstractLogEnabled
+        implements MavenProjectBuilder, Initializable, Contextualizable {
     // TODO: remove
     private PlexusContainer container;
 
@@ -182,8 +172,7 @@
 
     public static final String MAVEN_MODEL_VERSION = "4.0.0";
 
-    public void initialize()
-    {
+    public void initialize() {
         modelReader = new MavenXpp3Reader();
     }
 
@@ -191,38 +180,34 @@
     // MavenProjectBuilder Implementation
     // ----------------------------------------------------------------------
 
-    public MavenProject build( File pom,
-                               ProjectBuilderConfiguration config )
-        throws ProjectBuildingException
-    {
-        return buildFromSourceFileInternal( pom, config, true );
-    }
-
-    public MavenProject build( File pom,
-                               ProjectBuilderConfiguration config,
-                               boolean checkDistributionManagementStatus )
-        throws ProjectBuildingException
-    {
-        return buildFromSourceFileInternal( pom, config, checkDistributionManagementStatus );
-    }
-
-    public MavenProject build( File projectDescriptor,
-                               ArtifactRepository localRepository,
-                               ProfileManager profileManager )
-        throws ProjectBuildingException
-    {
-        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ).setGlobalProfileManager( profileManager );
-        return buildFromSourceFileInternal( projectDescriptor, config, true );
-    }
-
-    public MavenProject build( File projectDescriptor,
-                               ArtifactRepository localRepository,
-                               ProfileManager profileManager,
-                               boolean checkDistributionManagementStatus )
-        throws ProjectBuildingException
-    {
-        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository ).setGlobalProfileManager( profileManager );
-        return buildFromSourceFileInternal( projectDescriptor, config, checkDistributionManagementStatus );
+    public MavenProject build(File pom,
+                              ProjectBuilderConfiguration config)
+            throws ProjectBuildingException {
+        return buildFromSourceFileInternal(pom, config, true);
+    }
+
+    public MavenProject build(File pom,
+                              ProjectBuilderConfiguration config,
+                              boolean checkDistributionManagementStatus)
+            throws ProjectBuildingException {
+        return buildFromSourceFileInternal(pom, config, checkDistributionManagementStatus);
+    }
+
+    public MavenProject build(File projectDescriptor,
+                              ArtifactRepository localRepository,
+                              ProfileManager profileManager)
+            throws ProjectBuildingException {
+        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository(localRepository).setGlobalProfileManager(profileManager);
+        return buildFromSourceFileInternal(projectDescriptor, config, true);
+    }
+
+    public MavenProject build(File projectDescriptor,
+                              ArtifactRepository localRepository,
+                              ProfileManager profileManager,
+                              boolean checkDistributionManagementStatus)
+            throws ProjectBuildingException {
+        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository(localRepository).setGlobalProfileManager(profileManager);
+        return buildFromSourceFileInternal(projectDescriptor, config, checkDistributionManagementStatus);
     }
 
     // jvz:note
@@ -231,128 +216,118 @@
     // which means the projects in the reactor are required for finding classes in <project>/target/classes. Not
     // sure this is ideal. I remove all caching from the builder and all reactor related ITs which assume
     // access to simbling project resources failed.
-    public MavenProject buildFromRepository( Artifact artifact,
-                                             List remoteArtifactRepositories,
-                                             ArtifactRepository localRepository,
-                                             boolean allowStubModel )
-        throws ProjectBuildingException
-    {
-        String cacheKey = createCacheKey( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );
+    public MavenProject buildFromRepository(Artifact artifact,
+                                            List remoteArtifactRepositories,
+                                            ArtifactRepository localRepository,
+                                            boolean allowStubModel)
+            throws ProjectBuildingException {
+        String cacheKey = createCacheKey(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion());
 
-        MavenProject project = (MavenProject) processedProjectCache.get( cacheKey );
+        MavenProject project = (MavenProject) processedProjectCache.get(cacheKey);
 
-        if ( project != null )
-        {
+        if (project != null) {
             return project;
         }
 
-        Model model = findModelFromRepository( artifact, remoteArtifactRepositories, localRepository, allowStubModel );
+        Model model = findModelFromRepository(artifact, remoteArtifactRepositories, localRepository, allowStubModel);
 
-        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository );
+        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository(localRepository);
 
-        return buildInternal( "Artifact [" + artifact + "]", model, config, remoteArtifactRepositories,
-                              null, false );
+        return buildInternal("Artifact [" + artifact + "]", model, config, remoteArtifactRepositories,
+                null, false);
     }
 
-    public MavenProject buildFromRepository( Artifact artifact,
-                                             List remoteArtifactRepositories,
-                                             ArtifactRepository localRepository )
-        throws ProjectBuildingException
-    {
-        return buildFromRepository( artifact, remoteArtifactRepositories, localRepository, true );
+    public MavenProject buildFromRepository(Artifact artifact,
+                                            List remoteArtifactRepositories,
+                                            ArtifactRepository localRepository)
+            throws ProjectBuildingException {
+        return buildFromRepository(artifact, remoteArtifactRepositories, localRepository, true);
     }
 
     // what is using this externally? jvz.
-    public MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository )
-        throws ProjectBuildingException
-    {
+    public MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository)
+            throws ProjectBuildingException {
         //TODO mkleint - use the (Container, Properties) constructor to make system properties embeddable
-        ProfileManager profileManager = new DefaultProfileManager( container );
+        ProfileManager profileManager = new DefaultProfileManager(container);
 
-        return buildStandaloneSuperProject( new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository )
-                                                                                    .setGlobalProfileManager( profileManager ) );
+        return buildStandaloneSuperProject(new DefaultProjectBuilderConfiguration().setLocalRepository(localRepository)
+                .setGlobalProfileManager(profileManager));
     }
 
-    public MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository,
-                                                     ProfileManager profileManager )
-        throws ProjectBuildingException
-    {
-        return buildStandaloneSuperProject( new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository )
-                                                                                    .setGlobalProfileManager( profileManager ) );
+    public MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository,
+                                                    ProfileManager profileManager)
+            throws ProjectBuildingException {
+        return buildStandaloneSuperProject(new DefaultProjectBuilderConfiguration().setLocalRepository(localRepository)
+                .setGlobalProfileManager(profileManager));
     }
 
-    public MavenProject buildStandaloneSuperProject( ProjectBuilderConfiguration config )
-        throws ProjectBuildingException
-    {
+    public MavenProject buildStandaloneSuperProject(ProjectBuilderConfiguration config)
+            throws ProjectBuildingException {
         Model superModel = getSuperModel();
 
-        superModel.setGroupId( STANDALONE_SUPERPOM_GROUPID );
+        superModel.setGroupId(STANDALONE_SUPERPOM_GROUPID);
 
-        superModel.setArtifactId( STANDALONE_SUPERPOM_ARTIFACTID );
+        superModel.setArtifactId(STANDALONE_SUPERPOM_ARTIFACTID);
 
-        superModel.setVersion( STANDALONE_SUPERPOM_VERSION );
+        superModel.setVersion(STANDALONE_SUPERPOM_VERSION);
 
 
         List activeProfiles;
 
         ProfileManager profileManager = config.getGlobalProfileManager();
 
-        if ( profileManager == null )
-        {
-            profileManager = new DefaultProfileManager( container );
+        if (profileManager == null) {
+            profileManager = new DefaultProfileManager(container);
         }
 
-        profileManager.addProfiles( superModel.getProfiles() );
+        profileManager.addProfiles(superModel.getProfiles());
 
-        String projectId = safeVersionlessKey( STANDALONE_SUPERPOM_GROUPID, STANDALONE_SUPERPOM_ARTIFACTID );
+        String projectId = safeVersionlessKey(STANDALONE_SUPERPOM_GROUPID, STANDALONE_SUPERPOM_ARTIFACTID);
 
-        activeProfiles = injectActiveProfiles( profileManager, superModel );
+        activeProfiles = injectActiveProfiles(profileManager, superModel);
 
-        MavenProject project = new MavenProject( superModel );
+        MavenProject project = new MavenProject(superModel);
 
         project.setManagedVersionMap(
-            createManagedVersionMap( projectId, superModel.getDependencyManagement(), null ) );
+                createManagedVersionMap(projectId, superModel.getDependencyManagement(), null));
 
-        project.setActiveProfiles( activeProfiles );
+        project.setActiveProfiles(activeProfiles);
 
-        project.setOriginalModel( superModel );
+        project.setOriginalModel(superModel);
 
-        try
-        {
-            project = processProjectLogic( "<Super-POM>", project, config, null, null, true, true );
+        try {
+            project = processProjectLogic("<Super-POM>", project, config, null, null, true, true);
 
-            project.setExecutionRoot( true );
+            project.setExecutionRoot(true);
 
             return project;
         }
-        catch ( ModelInterpolationException e )
-        {
-            throw new ProjectBuildingException( projectId, e.getMessage(), e );
+        catch (ModelInterpolationException e) {
+            throw new ProjectBuildingException(projectId, e.getMessage(), e);
         }
-        catch ( InvalidRepositoryException e )
-        {
-            throw new ProjectBuildingException( projectId, e.getMessage(), e );
+        catch (InvalidRepositoryException e) {
+            throw new ProjectBuildingException(projectId, e.getMessage(), e);
         }
     }
 
-    public MavenProject buildWithDependencies( File projectDescriptor,
-                                               ArtifactRepository localRepository,
-                                               ProfileManager profileManager )
-        throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException
-    {
-        return buildWithDependencies( projectDescriptor, localRepository, profileManager, null );
+    public MavenProject buildWithDependencies(File projectDescriptor,
+                                              ArtifactRepository localRepository,
+                                              ProfileManager profileManager)
+            throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException {
+        return buildWithDependencies(projectDescriptor, localRepository, profileManager, null);
     }
 
     // note:jvz This was added for the embedder.
 
-    /** @todo move to metadatasource itself? */
-    public MavenProject buildWithDependencies( File projectDescriptor,
-                                               ArtifactRepository localRepository,
-                                               ProfileManager profileManager,
-                                               TransferListener transferListener )
-        throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException
-    {
-        MavenProject project = build( projectDescriptor, localRepository, profileManager, false );
+    /**
+     * @todo move to metadatasource itself?
+     */
+    public MavenProject buildWithDependencies(File projectDescriptor,
+                                              ArtifactRepository localRepository,
+                                              ProfileManager profileManager,
+                                              TransferListener transferListener)
+            throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException {
+        MavenProject project = build(projectDescriptor, localRepository, profileManager, false);
 
         // ----------------------------------------------------------------------
         // Typically when the project builder is being used from maven proper
@@ -369,36 +344,33 @@
         // TODO: such a call in MavenMetadataSource too - packaging not really the intention of type
         Artifact projectArtifact = project.getArtifact();
 
-        String projectId = safeVersionlessKey( project.getGroupId(), project.getArtifactId() );
+        String projectId = safeVersionlessKey(project.getGroupId(), project.getArtifactId());
 
         // Map managedVersions = createManagedVersionMap( projectId, project.getDependencyManagement() );
         Map managedVersions = project.getManagedVersionMap();
 
         ensureMetadataSourceIsInitialized();
 
-        try
-        {
-            project.setDependencyArtifacts( project.createArtifacts( artifactFactory, null, null ) );
+        try {
+            project.setDependencyArtifacts(project.createArtifacts(artifactFactory, null, null));
         }
-        catch ( InvalidDependencyVersionException e )
-        {
-            throw new ProjectBuildingException( projectId,
-                                                "Unable to build project due to an invalid dependency version: " +
-                                                    e.getMessage(), e );
+        catch (InvalidDependencyVersionException e) {
+            throw new ProjectBuildingException(projectId,
+                    "Unable to build project due to an invalid dependency version: " +
+                            e.getMessage(), e);
         }
 
-        if ( transferListener != null )
-        {
-            wagonManager.setDownloadMonitor( transferListener );
+        if (transferListener != null) {
+            wagonManager.setDownloadMonitor(transferListener);
         }
 
-        ArtifactResolutionResult result = artifactResolver.resolveTransitively( project.getDependencyArtifacts(),
-                                                                                projectArtifact, managedVersions,
-                                                                                localRepository,
-                                                                                project.getRemoteArtifactRepositories(),
-                                                                                artifactMetadataSource );
+        ArtifactResolutionResult result = artifactResolver.resolveTransitively(project.getDependencyArtifacts(),
+                projectArtifact, managedVersions,
+                localRepository,
+                project.getRemoteArtifactRepositories(),
+                artifactMetadataSource);
 
-        project.setArtifacts( result.getArtifacts() );
+        project.setArtifacts(result.getArtifacts());
 
         return project;
     }
@@ -408,156 +380,131 @@
     // ----------------------------------------------------------------------
 
     private void ensureMetadataSourceIsInitialized()
-        throws ProjectBuildingException
-    {
-        if ( artifactMetadataSource == null )
-        {
-            try
-            {
-                artifactMetadataSource = (ArtifactMetadataSource) container.lookup( ArtifactMetadataSource.ROLE );
+            throws ProjectBuildingException {
+        if (artifactMetadataSource == null) {
+            try {
+                artifactMetadataSource = (ArtifactMetadataSource) container.lookup(ArtifactMetadataSource.ROLE);
             }
-            catch ( ComponentLookupException e )
-            {
-                throw new ProjectBuildingException( "all", "Cannot lookup metadata source for building the project.",
-                                                    e );
+            catch (ComponentLookupException e) {
+                throw new ProjectBuildingException("all", "Cannot lookup metadata source for building the project.",
+                        e);
             }
         }
     }
 
-    private Map createManagedVersionMap( String projectId,
-                                         DependencyManagement dependencyManagement,
-                                         MavenProject parent )
-        throws ProjectBuildingException
-    {
+    private Map createManagedVersionMap(String projectId,
+                                        DependencyManagement dependencyManagement,
+                                        MavenProject parent)
+            throws ProjectBuildingException {
         Map map = null;
         List deps;
-        if ( ( dependencyManagement != null ) && ( ( deps = dependencyManagement.getDependencies() ) != null ) &&
-            ( deps.size() > 0 ) )
-        {
-            map = new ManagedVersionMap( map );
+        if ((dependencyManagement != null) && ((deps = dependencyManagement.getDependencies()) != null) &&
+                (deps.size() > 0)) {
+            map = new ManagedVersionMap(map);
 
-            if ( getLogger().isDebugEnabled() )
-            {
-                getLogger().debug( "Adding managed dependencies for " + projectId );
+            if (getLogger().isDebugEnabled()) {
+                getLogger().debug("Adding managed dependencies for " + projectId);
             }
 
-            for ( Iterator i = dependencyManagement.getDependencies().iterator(); i.hasNext(); )
-            {
+            for (Iterator i = dependencyManagement.getDependencies().iterator(); i.hasNext();) {
                 Dependency d = (Dependency) i.next();
 
-                try
-                {
-                    VersionRange versionRange = VersionRange.createFromVersionSpec( d.getVersion() );
-
-                    Artifact artifact = artifactFactory.createDependencyArtifact( d.getGroupId(), d.getArtifactId(),
-                                                                                  versionRange, d.getType(),
-                                                                                  d.getClassifier(), d.getScope(),
-                                                                                  d.isOptional() );
-                    if ( getLogger().isDebugEnabled() )
-                    {
-                        getLogger().debug( "  " + artifact );
+                try {
+                    VersionRange versionRange = VersionRange.createFromVersionSpec(d.getVersion());
+
+                    Artifact artifact = artifactFactory.createDependencyArtifact(d.getGroupId(), d.getArtifactId(),
+                            versionRange, d.getType(),
+                            d.getClassifier(), d.getScope(),
+                            d.isOptional());
+                    if (getLogger().isDebugEnabled()) {
+                        getLogger().debug("  " + artifact);
                     }
 
                     // If the dependencyManagement section listed exclusions,
                     // add them to the managed artifacts here so that transitive
                     // dependencies will be excluded if necessary.
-                    if ( ( null != d.getExclusions() ) && !d.getExclusions().isEmpty() )
-                    {
+                    if ((null != d.getExclusions()) && !d.getExclusions().isEmpty()) {
                         List exclusions = new ArrayList();
 
                         Iterator exclItr = d.getExclusions().iterator();
 
-                        while ( exclItr.hasNext() )
-                        {
+                        while (exclItr.hasNext()) {
                             Exclusion e = (Exclusion) exclItr.next();
-                            exclusions.add( e.getGroupId() + ":" + e.getArtifactId() );
+                            exclusions.add(e.getGroupId() + ":" + e.getArtifactId());
                         }
-                        ExcludesArtifactFilter eaf = new ExcludesArtifactFilter( exclusions );
-                        artifact.setDependencyFilter( eaf );
+                        ExcludesArtifactFilter eaf = new ExcludesArtifactFilter(exclusions);
+                        artifact.setDependencyFilter(eaf);
+                    } else {
+                        artifact.setDependencyFilter(null);
                     }
-                    else
-                    {
-                        artifact.setDependencyFilter( null );
-                    }
-                    map.put( d.getManagementKey(), artifact );
+                    map.put(d.getManagementKey(), artifact);
                 }
-                catch ( InvalidVersionSpecificationException e )
-                {
-                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + d.getVersion() +
-                        "' for dependency '" + d.getManagementKey() + "': " + e.getMessage(), e );
+                catch (InvalidVersionSpecificationException e) {
+                    throw new ProjectBuildingException(projectId, "Unable to parse version '" + d.getVersion() +
+                            "' for dependency '" + d.getManagementKey() + "': " + e.getMessage(), e);
                 }
             }
-        }
-        else if ( map == null )
-        {
+        } else if (map == null) {
             map = Collections.EMPTY_MAP;
         }
 
         return map;
     }
 
-    private MavenProject buildFromSourceFileInternal( File projectDescriptor,
-                                                      ProjectBuilderConfiguration config,
-                                                      boolean checkDistributionManagementStatus )
-        throws ProjectBuildingException
-    {
-        Model model = readModel( "unknown", projectDescriptor, true );
-
-        MavenProject project = buildInternal( projectDescriptor.getAbsolutePath(), model, config,
-                                              buildArtifactRepositories( getSuperModel() ), projectDescriptor,
-                                              true );
+    private MavenProject buildFromSourceFileInternal(File projectDescriptor,
+                                                     ProjectBuilderConfiguration config,
+                                                     boolean checkDistributionManagementStatus)
+            throws ProjectBuildingException {
+        Model model = readModel("unknown", projectDescriptor, true);
+
+        MavenProject project = buildInternal(projectDescriptor.getAbsolutePath(), model, config,
+                buildArtifactRepositories(getSuperModel()), projectDescriptor,
+                true);
+
+        if (checkDistributionManagementStatus) {
+            if ((project.getDistributionManagement() != null) &&
+                    (project.getDistributionManagement().getStatus() != null)) {
+                String projectId = safeVersionlessKey(project.getGroupId(), project.getArtifactId());
 
-        if ( checkDistributionManagementStatus )
-        {
-            if ( ( project.getDistributionManagement() != null ) &&
-                ( project.getDistributionManagement().getStatus() != null ) )
-            {
-                String projectId = safeVersionlessKey( project.getGroupId(), project.getArtifactId() );
-
-                throw new ProjectBuildingException( projectId,
-                                                    "Invalid project file: distribution status must not be specified for a project outside of the repository" );
+                throw new ProjectBuildingException(projectId,
+                        "Invalid project file: distribution status must not be specified for a project outside of the repository");
             }
         }
 
         return project;
     }
 
-    private Model findModelFromRepository( Artifact artifact,
-                                           List remoteArtifactRepositories,
-                                           ArtifactRepository localRepository,
-                                           boolean allowStubModel )
-        throws ProjectBuildingException
-    {
-        String projectId = safeVersionlessKey( artifact.getGroupId(), artifact.getArtifactId() );
+    private Model findModelFromRepository(Artifact artifact,
+                                          List remoteArtifactRepositories,
+                                          ArtifactRepository localRepository,
+                                          boolean allowStubModel)
+            throws ProjectBuildingException {
+        String projectId = safeVersionlessKey(artifact.getGroupId(), artifact.getArtifactId());
 
-        normalizeToArtifactRepositories( remoteArtifactRepositories, projectId );
+        normalizeToArtifactRepositories(remoteArtifactRepositories, projectId);
 
         Artifact projectArtifact;
 
         // if the artifact is not a POM, we need to construct a POM artifact based on the artifact parameter given.
-        if ( "pom".equals( artifact.getType() ) )
-        {
+        if ("pom".equals(artifact.getType())) {
             projectArtifact = artifact;
-        }
-        else
-        {
-            getLogger().warn( "Attempting to build MavenProject instance for Artifact (" + artifact.getGroupId() + ":"
-                                  + artifact.getArtifactId() + ":" + artifact.getVersion() + ") of type: "
-                                  + artifact.getType() + "; constructing POM artifact instead." );
+        } else {
+            getLogger().warn("Attempting to build MavenProject instance for Artifact (" + artifact.getGroupId() + ":"
+                    + artifact.getArtifactId() + ":" + artifact.getVersion() + ") of type: "
+                    + artifact.getType() + "; constructing POM artifact instead.");
 
-            projectArtifact = artifactFactory.createProjectArtifact( artifact.getGroupId(), artifact.getArtifactId(),
-                                                                     artifact.getVersion(), artifact.getScope() );
+            projectArtifact = artifactFactory.createProjectArtifact(artifact.getGroupId(), artifact.getArtifactId(),
+                    artifact.getVersion(), artifact.getScope());
         }
 
         Model model;
 
-        try
-        {
-            artifactResolver.resolve( projectArtifact, remoteArtifactRepositories, localRepository );
+        try {
+            artifactResolver.resolve(projectArtifact, remoteArtifactRepositories, localRepository);
 
             File file = projectArtifact.getFile();
 
-            model = readModel( projectId, file, false );
+            model = readModel(projectId, file, false);
 
             String downloadUrl = null;
 
@@ -565,128 +512,101 @@
 
             DistributionManagement distributionManagement = model.getDistributionManagement();
 
-            if ( distributionManagement != null )
-            {
+            if (distributionManagement != null) {
                 downloadUrl = distributionManagement.getDownloadUrl();
 
-                status = ArtifactStatus.valueOf( distributionManagement.getStatus() );
+                status = ArtifactStatus.valueOf(distributionManagement.getStatus());
             }
 
-            checkStatusAndUpdate( projectArtifact, status, file, remoteArtifactRepositories, localRepository );
+            checkStatusAndUpdate(projectArtifact, status, file, remoteArtifactRepositories, localRepository);
 
             // TODO: this is gross. Would like to give it the whole model, but maven-artifact shouldn't depend on that
             // Can a maven-core implementation of the Artifact interface store it, and be used in the exceptions?
-            if ( downloadUrl != null )
-            {
-                projectArtifact.setDownloadUrl( downloadUrl );
-            }
-            else
-            {
-                projectArtifact.setDownloadUrl( model.getUrl() );
-            }
-        }
-        catch ( ArtifactResolutionException e )
-        {
-            throw new ProjectBuildingException( projectId, "Error getting POM for '" + projectId +
-                "' from the repository: " + e.getMessage(), e );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
-            if ( allowStubModel )
-            {
-                getLogger().debug( "Artifact not found - using stub model: " + e.getMessage() );
-
-                model = createStubModel( projectArtifact );
-            }
-            else
-            {
-                throw new ProjectBuildingException( projectId, "POM '" + projectId + "' not found in repository: " +
-                    e.getMessage(), e );
+            if (downloadUrl != null) {
+                projectArtifact.setDownloadUrl(downloadUrl);
+            } else {
+                projectArtifact.setDownloadUrl(model.getUrl());
+            }
+        }
+        catch (ArtifactResolutionException e) {
+            throw new ProjectBuildingException(projectId, "Error getting POM for '" + projectId +
+                    "' from the repository: " + e.getMessage(), e);
+        }
+        catch (ArtifactNotFoundException e) {
+            if (allowStubModel) {
+                getLogger().debug("Artifact not found - using stub model: " + e.getMessage());
+
+                model = createStubModel(projectArtifact);
+            } else {
+                throw new ProjectBuildingException(projectId, "POM '" + projectId + "' not found in repository: " +
+                        e.getMessage(), e);
             }
         }
 
         return model;
     }
 
-    private List normalizeToArtifactRepositories( List remoteArtifactRepositories,
-                                                  String projectId )
-        throws ProjectBuildingException
-    {
-        List normalized = new ArrayList( remoteArtifactRepositories.size() );
+    private List normalizeToArtifactRepositories(List remoteArtifactRepositories,
+                                                 String projectId)
+            throws ProjectBuildingException {
+        List normalized = new ArrayList(remoteArtifactRepositories.size());
 
         boolean normalizationNeeded = false;
-        for ( Iterator it = remoteArtifactRepositories.iterator(); it.hasNext(); )
-        {
+        for (Iterator it = remoteArtifactRepositories.iterator(); it.hasNext();) {
             Object item = it.next();
 
-            if ( item instanceof ArtifactRepository )
-            {
-                normalized.add( item );
-            }
-            else if ( item instanceof Repository )
-            {
+            if (item instanceof ArtifactRepository) {
+                normalized.add(item);
+            } else if (item instanceof Repository) {
                 Repository repo = (Repository) item;
-                try
-                {
-                    item = ProjectUtils.buildArtifactRepository( repo, artifactRepositoryFactory, container );
+                try {
+                    item = ProjectUtils.buildArtifactRepository(repo, artifactRepositoryFactory, container);
 
-                    normalized.add( item );
+                    normalized.add(item);
                     normalizationNeeded = true;
                 }
-                catch ( InvalidRepositoryException e )
-                {
-                    throw new ProjectBuildingException( projectId, "Error building artifact repository for id: " + repo.getId(), e );
+                catch (InvalidRepositoryException e) {
+                    throw new ProjectBuildingException(projectId, "Error building artifact repository for id: " + repo.getId(), e);
                 }
-            }
-            else
-            {
-                throw new ProjectBuildingException( projectId, "Error building artifact repository from non-repository information item: " + item );
+            } else {
+                throw new ProjectBuildingException(projectId, "Error building artifact repository from non-repository information item: " + item);
             }
         }
 
-        if ( normalizationNeeded )
-        {
+        if (normalizationNeeded) {
             return normalized;
-        }
-        else
-        {
+        } else {
             return remoteArtifactRepositories;
         }
     }
 
-    private void checkStatusAndUpdate( Artifact projectArtifact,
-                                       ArtifactStatus status,
-                                       File file,
-                                       List remoteArtifactRepositories,
-                                       ArtifactRepository localRepository )
-        throws ArtifactNotFoundException
-    {
+    private void checkStatusAndUpdate(Artifact projectArtifact,
+                                      ArtifactStatus status,
+                                      File file,
+                                      List remoteArtifactRepositories,
+                                      ArtifactRepository localRepository)
+            throws ArtifactNotFoundException {
         // TODO: configurable actions dependant on status
-        if ( !projectArtifact.isSnapshot() && ( status.compareTo( ArtifactStatus.DEPLOYED ) < 0 ) )
-        {
+        if (!projectArtifact.isSnapshot() && (status.compareTo(ArtifactStatus.DEPLOYED) < 0)) {
             // use default policy (enabled, daily update, warn on bad checksum)
             ArtifactRepositoryPolicy policy = new ArtifactRepositoryPolicy();
             // TODO: re-enable [MNG-798/865]
-            policy.setUpdatePolicy( ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER );
+            policy.setUpdatePolicy(ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER);
 
-            if ( policy.checkOutOfDate( new Date( file.lastModified() ) ) )
-            {
+            if (policy.checkOutOfDate(new Date(file.lastModified()))) {
                 getLogger().info(
-                    projectArtifact.getArtifactId() + ": updating metadata due to status of '" + status + "'" );
-                try
-                {
-                    projectArtifact.setResolved( false );
-                    artifactResolver.resolveAlways( projectArtifact, remoteArtifactRepositories, localRepository );
-                }
-                catch ( ArtifactResolutionException e )
-                {
-                    getLogger().warn( "Error updating POM - using existing version" );
-                    getLogger().debug( "Cause", e );
-                }
-                catch ( ArtifactNotFoundException e )
-                {
-                    getLogger().warn( "Error updating POM - not found. Removing local copy." );
-                    getLogger().debug( "Cause", e );
+                        projectArtifact.getArtifactId() + ": updating metadata due to status of '" + status + "'");
+                try {
+                    projectArtifact.setResolved(false);
+                    artifactResolver.resolveAlways(projectArtifact, remoteArtifactRepositories, localRepository);
+                }
+                catch (ArtifactResolutionException e) {
+                    getLogger().warn("Error updating POM - using existing version");
+                    getLogger().debug("Cause", e);
+                }
+                catch (ArtifactNotFoundException e) {
+                    getLogger().warn("Error updating POM - not found. Removing local copy.");
+                    getLogger().debug("Cause", e);
                     file.delete();
                     throw e;
                 }
@@ -697,26 +617,25 @@
     // jvz:note
     // This is used when requested artifacts do not have an associated POM. This is for the case where we are
     // using an m1 repo where the only thing required to be present are the JAR files.
-    private Model createStubModel( Artifact projectArtifact )
-    {
-        getLogger().debug( "Using defaults for missing POM " + projectArtifact );
+    private Model createStubModel(Artifact projectArtifact) {
+        getLogger().debug("Using defaults for missing POM " + projectArtifact);
 
         Model model = new Model();
 
-        model.setModelVersion( "4.0.0" );
+        model.setModelVersion("4.0.0");
 
-        model.setArtifactId( projectArtifact.getArtifactId() );
+        model.setArtifactId(projectArtifact.getArtifactId());
 
-        model.setGroupId( projectArtifact.getGroupId() );
+        model.setGroupId(projectArtifact.getGroupId());
 
-        model.setVersion( projectArtifact.getVersion() );
+        model.setVersion(projectArtifact.getVersion());
 
         // TODO: not correct in some instances
-        model.setPackaging( projectArtifact.getType() );
+        model.setPackaging(projectArtifact.getType());
 
-        model.setDistributionManagement( new DistributionManagement() );
+        model.setDistributionManagement(new DistributionManagement());
 
-        model.getDistributionManagement().setStatus( ArtifactStatus.GENERATED.toString() );
+        model.getDistributionManagement().setStatus(ArtifactStatus.GENERATED.toString());
 
         return model;
     }
@@ -724,18 +643,16 @@
     // jvz:note
     // We've got a mixture of things going in the USD and from the repository, sometimes the descriptor
     // is a real file and sometimes null which makes things confusing.
-    private MavenProject buildInternal( String pomLocation,
-                                        Model model,
-                                        ProjectBuilderConfiguration config,
-                                        List parentSearchRepositories,
-                                        File projectDescriptor,
-                                        boolean strict )
-        throws ProjectBuildingException
-    {
+    private MavenProject buildInternal(String pomLocation,
+                                       Model model,
+                                       ProjectBuilderConfiguration config,
+                                       List parentSearchRepositories,
+                                       File projectDescriptor,
+                                       boolean strict)
+            throws ProjectBuildingException {
         File projectDir = null;
 
-        if ( projectDescriptor != null )
-        {
+        if (projectDescriptor != null) {
             projectDir = projectDescriptor.getAbsoluteFile().getParentFile();
         }
 
@@ -743,26 +660,23 @@
 
         ProfileManager externalProfileManager = config.getGlobalProfileManager();
         ProfileManager superProjectProfileManager;
-        if ( externalProfileManager != null )
-        {
+        if (externalProfileManager != null) {
             superProjectProfileManager = new DefaultProfileManager(
-                                                                    container,
-                                                                    externalProfileManager.getRequestProperties() );
-        }
-        else
-        {
-            superProjectProfileManager = new DefaultProfileManager( container );
+                    container,
+                    externalProfileManager.getRequestProperties());
+        } else {
+            superProjectProfileManager = new DefaultProfileManager(container);
         }
 
         List activeProfiles;
 
-        superProjectProfileManager.addProfiles( superModel.getProfiles() );
+        superProjectProfileManager.addProfiles(superModel.getProfiles());
 
-        activeProfiles = injectActiveProfiles( superProjectProfileManager, superModel );
+        activeProfiles = injectActiveProfiles(superProjectProfileManager, superModel);
 
-        MavenProject superProject = new MavenProject( superModel );
+        MavenProject superProject = new MavenProject(superModel);
 
-        superProject.setActiveProfiles( activeProfiles );
+        superProject.setActiveProfiles(activeProfiles);
 
         //noinspection CollectionDeclaredAsConcreteClass
         LinkedList lineage = new LinkedList();
@@ -773,57 +687,46 @@
         // Use a TreeSet to ensure ordering is retained
         Set aggregatedRemoteWagonRepositories = new LinkedHashSet();
 
-        String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
+        String projectId = safeVersionlessKey(model.getGroupId(), model.getArtifactId());
 
         List activeExternalProfiles;
-        try
-        {
-            if ( externalProfileManager != null )
-            {
+        try {
+            if (externalProfileManager != null) {
                 activeExternalProfiles = externalProfileManager.getActiveProfiles();
-            }
-            else
-            {
+            } else {
                 activeExternalProfiles = Collections.EMPTY_LIST;
             }
         }
-        catch ( ProfileActivationException e )
-        {
-            throw new ProjectBuildingException( projectId, "Failed to calculate active external profiles.", e );
+        catch (ProfileActivationException e) {
+            throw new ProjectBuildingException(projectId, "Failed to calculate active external profiles.", e);
         }
 
-        for ( Iterator i = activeExternalProfiles.iterator(); i.hasNext(); )
-        {
+        for (Iterator i = activeExternalProfiles.iterator(); i.hasNext();) {
             Profile externalProfile = (Profile) i.next();
 
-            for ( Iterator repoIterator = externalProfile.getRepositories().iterator(); repoIterator.hasNext(); )
-            {
+            for (Iterator repoIterator = externalProfile.getRepositories().iterator(); repoIterator.hasNext();) {
                 Repository mavenRepo = (Repository) repoIterator.next();
 
                 ArtifactRepository artifactRepo = null;
-                try
-                {
+                try {
                     artifactRepo =
-                        ProjectUtils.buildArtifactRepository( mavenRepo, artifactRepositoryFactory, container );
+                            ProjectUtils.buildArtifactRepository(mavenRepo, artifactRepositoryFactory, container);
                 }
-                catch ( InvalidRepositoryException e )
-                {
-                    throw new ProjectBuildingException( projectId, e.getMessage(), e );
+                catch (InvalidRepositoryException e) {
+                    throw new ProjectBuildingException(projectId, e.getMessage(), e);
                 }
 
-                aggregatedRemoteWagonRepositories.add( artifactRepo );
+                aggregatedRemoteWagonRepositories.add(artifactRepo);
             }
         }
 
         MavenProject project = null;
-        try
-        {
-            project = assembleLineage( model, lineage, config, projectDir, parentSearchRepositories,
-                                       aggregatedRemoteWagonRepositories, strict );
+        try {
+            project = assembleLineage(model, lineage, config, projectDir, parentSearchRepositories,
+                    aggregatedRemoteWagonRepositories, strict);
         }
-        catch ( InvalidRepositoryException e )
-        {
-            throw new ProjectBuildingException( projectId, e.getMessage(), e );
+        catch (InvalidRepositoryException e) {
+            throw new ProjectBuildingException(projectId, e.getMessage(), e);
         }
 
         // we don't have to force the collision exception for superModel here, it's already been done in getSuperModel()
@@ -831,124 +734,110 @@
 
         Model previous = superProject.getModel();
 
-        for ( Iterator i = lineage.iterator(); i.hasNext(); )
-        {
+        for (Iterator i = lineage.iterator(); i.hasNext();) {
             MavenProject currentProject = (MavenProject) i.next();
 
             Model current = currentProject.getModel();
 
             String pathAdjustment = null;
 
-            try
-            {
-                pathAdjustment = previousProject.getModulePathAdjustment( currentProject );
+            try {
+                pathAdjustment = previousProject.getModulePathAdjustment(currentProject);
             }
-            catch ( IOException e )
-            {
-                getLogger().debug( "Cannot determine whether " + currentProject.getId() + " is a module of " +
-                    previousProject.getId() + ". Reason: " + e.getMessage(), e );
+            catch (IOException e) {
+                getLogger().debug("Cannot determine whether " + currentProject.getId() + " is a module of " +
+                        previousProject.getId() + ". Reason: " + e.getMessage(), e);
             }
 
-            modelInheritanceAssembler.assembleModelInheritance( current, previous, pathAdjustment );
+            modelInheritanceAssembler.assembleModelInheritance(current, previous, pathAdjustment);
 
             previous = current;
             previousProject = currentProject;
         }
 
         // only add the super repository if it wasn't overridden by a profile or project
-        List repositories = new ArrayList( aggregatedRemoteWagonRepositories );
+        List repositories = new ArrayList(aggregatedRemoteWagonRepositories);
 
-        List superRepositories = buildArtifactRepositories( superModel );
+        List superRepositories = buildArtifactRepositories(superModel);
 
-        for ( Iterator i = superRepositories.iterator(); i.hasNext(); )
-        {
+        for (Iterator i = superRepositories.iterator(); i.hasNext();) {
             ArtifactRepository repository = (ArtifactRepository) i.next();
 
-            if ( !repositories.contains( repository ) )
-            {
-                repositories.add( repository );
+            if (!repositories.contains(repository)) {
+                repositories.add(repository);
             }
         }
 
         // merge any duplicated plugin definitions together, using the first appearance as the dominant one.
-        ModelUtils.mergeDuplicatePluginDefinitions( project.getModel().getBuild() );
+        ModelUtils.mergeDuplicatePluginDefinitions(project.getModel().getBuild());
 
-        try
-        {
-            project = processProjectLogic( pomLocation, project, config, projectDir, repositories, strict, false );
+        try {
+            project = processProjectLogic(pomLocation, project, config, projectDir, repositories, strict, false);
+         //   project.getBuild()
         }
-        catch ( ModelInterpolationException e )
-        {
-            throw new InvalidProjectModelException( projectId, pomLocation, e.getMessage(), e );
+        catch (ModelInterpolationException e) {
+            throw new InvalidProjectModelException(projectId, pomLocation, e.getMessage(), e);
         }
-        catch ( InvalidRepositoryException e )
-        {
-            throw new InvalidProjectModelException( projectId, pomLocation, e.getMessage(), e );
+        catch (InvalidRepositoryException e) {
+            throw new InvalidProjectModelException(projectId, pomLocation, e.getMessage(), e);
         }
 
         processedProjectCache.put(
-                                  createCacheKey( project.getGroupId(), project.getArtifactId(), project.getVersion() ), project );
+                createCacheKey(project.getGroupId(), project.getArtifactId(), project.getVersion()), project);
 
-          // jvz:note
+        // jvz:note
         // this only happens if we are building from a source file
-        if ( projectDescriptor != null )
-        {
+        if (projectDescriptor != null) {
             // Only translate the base directory for files in the source tree
-            pathTranslator.alignToBaseDirectory( project.getModel(),
-                                                 projectDir );
+            pathTranslator.alignToBaseDirectory(project.getModel(),
+                    projectDir);
 
             Build build = project.getBuild();
 
-            project.addCompileSourceRoot( build.getSourceDirectory() );
+            project.addCompileSourceRoot(build.getSourceDirectory());
 
-            project.addScriptSourceRoot( build.getScriptSourceDirectory() );
+            project.addScriptSourceRoot(build.getScriptSourceDirectory());
 
-            project.addTestCompileSourceRoot( build.getTestSourceDirectory() );
+            project.addTestCompileSourceRoot(build.getTestSourceDirectory());
 
             // Only track the file of a POM in the source tree
-            project.setFile( projectDescriptor );
+            project.setFile(projectDescriptor);
         }
 
-        project.setManagedVersionMap( createManagedVersionMap( projectId,
-                                                               project.getDependencyManagement(),
-                                                               project.getParent() ) );
+        project.setManagedVersionMap(createManagedVersionMap(projectId,
+                project.getDependencyManagement(),
+                project.getParent()));
 
         return project;
     }
 
-    private String safeVersionlessKey( String groupId,
-                                       String artifactId )
-    {
+    private String safeVersionlessKey(String groupId,
+                                      String artifactId) {
         String gid = groupId;
 
-        if ( StringUtils.isEmpty( gid ) )
-        {
+        if (StringUtils.isEmpty(gid)) {
             gid = "unknown";
         }
 
         String aid = artifactId;
 
-        if ( StringUtils.isEmpty( aid ) )
-        {
+        if (StringUtils.isEmpty(aid)) {
             aid = "unknown";
         }
 
-        return ArtifactUtils.versionlessKey( gid, aid );
+        return ArtifactUtils.versionlessKey(gid, aid);
     }
 
-    private List buildArtifactRepositories( Model model )
-        throws ProjectBuildingException
-    {
-        try
-        {
-            return ProjectUtils.buildArtifactRepositories( model.getRepositories(), artifactRepositoryFactory,
-                                                           container );
+    private List buildArtifactRepositories(Model model)
+            throws ProjectBuildingException {
+        try {
+            return ProjectUtils.buildArtifactRepositories(model.getRepositories(), artifactRepositoryFactory,
+                    container);
         }
-        catch ( InvalidRepositoryException e )
-        {
-            String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
+        catch (InvalidRepositoryException e) {
+            String projectId = safeVersionlessKey(model.getGroupId(), model.getArtifactId());
 
-            throw new ProjectBuildingException( projectId, e.getMessage(), e );
+            throw new ProjectBuildingException(projectId, e.getMessage(), e);
         }
     }
 
@@ -959,165 +848,144 @@
      * the resolved source roots, etc for the parent - that occurs for the parent when it is constructed independently
      * and projects are not cached or reused
      */
-    private MavenProject processProjectLogic( String pomLocation,
-                                              MavenProject project,
-                                              ProjectBuilderConfiguration config,
-                                              File projectDir,
-                                              List remoteRepositories,
-                                              boolean strict,
-                                              boolean isSuperPom )
-        throws ProjectBuildingException, ModelInterpolationException, InvalidRepositoryException
-    {
+    private MavenProject processProjectLogic(String pomLocation,
+                                             MavenProject project,
+                                             ProjectBuilderConfiguration config,
+                                             File projectDir,
+                                             List remoteRepositories,
+                                             boolean strict,
+                                             boolean isSuperPom)
+            throws ProjectBuildingException, ModelInterpolationException, InvalidRepositoryException {
         Model model = project.getModel();
 
         List activeProfiles = project.getActiveProfiles();
 
-        if ( activeProfiles == null )
-        {
+        if (activeProfiles == null) {
             activeProfiles = new ArrayList();
         }
 
         ProfileManager profileMgr = config == null ? null : config.getGlobalProfileManager();
 
-        List injectedProfiles = injectActiveProfiles( profileMgr, model );
-
-        activeProfiles.addAll( injectedProfiles );
-
-        // We don't need all the project methods that are added over those in the model, but we do need basedir
-        Map context = new HashMap();
+        List injectedProfiles = injectActiveProfiles(profileMgr, model);
 
-        Build build = model.getBuild();
+        activeProfiles.addAll(injectedProfiles);
 
-        if ( projectDir != null )
-        {
-            context.put( "basedir", projectDir.getAbsolutePath() );
-
-            // MNG-1927, MNG-2124, MNG-3355:
-            // If the build section is present and the project directory is non-null, we should make
-            // sure interpolation of the directories below uses translated paths.
-            // Afterward, we'll double back and translate any paths that weren't covered during interpolation via the
-            // code below...
-            context.put( "build.directory", pathTranslator.alignToBaseDirectory( build.getDirectory(), projectDir ) );
-            context.put( "build.outputDirectory", pathTranslator.alignToBaseDirectory( build.getOutputDirectory(), projectDir ) );
-            context.put( "build.testOutputDirectory", pathTranslator.alignToBaseDirectory( build.getTestOutputDirectory(), projectDir ) );
-            context.put( "build.sourceDirectory", pathTranslator.alignToBaseDirectory( build.getSourceDirectory(), projectDir ) );
-            context.put( "build.testSourceDirectory", pathTranslator.alignToBaseDirectory( build.getTestSourceDirectory(), projectDir ) );
+        List policies = new ArrayList();
+        policies.add(new TimestampPolicy());
+        
+        if(projectDir != null) {
+            policies.add(new BuildPropertyPolicy(projectDir));
         }
-
-        if ( !isSuperPom )
-        {
+        if (!isSuperPom) {
             Properties userProps = config.getUserProperties();
-            if ( userProps != null )
-            {
-                context.putAll( userProps );
+            if (userProps != null) {
+                policies.add(new UserPropertyPolicy(userProps));
             }
         }
+        policies.add(new PropertyPolicy());
+        try {
+            policies.add(new EnvironmentalPropertyPolicy(CommandLineUtils.getSystemEnvVars()));
+        } catch (IOException e) {
+            throw new ModelInterpolationException("Unable to get environmental variables", e);
+        }
 
-        model = modelInterpolator.interpolate( model, context, strict );
+        policies.add(new ReflectionPropertyPolicy());
+        policies.add(new SelfReferencePolicy());
 
-        // second pass allows ${user.home} to work, if it needs to.
-        // [MNG-2339] ensure the system properties are still interpolated for backwards compat, but the model values must win
         if ( config.getExecutionProperties() != null && !config.getExecutionProperties().isEmpty() )
         {
-            context.putAll( config.getExecutionProperties() );
+            policies.add(new SystemPropertyPolicy( config.getExecutionProperties() ));
         }
 
-        model = modelInterpolator.interpolate( model, context, strict );
+        DefaultModelPropertyInterpolator modelInterpolator = new DefaultModelPropertyInterpolator();
+        model = modelInterpolator.interpolate(model, policies);
 
         // MNG-3482: Make sure depMgmt is interpolated before merging.
-        if ( !isSuperPom )
-        {
-            mergeManagedDependencies( model, config.getLocalRepository(), remoteRepositories );
+        if (!isSuperPom) {
+            mergeManagedDependencies(model, config.getLocalRepository(), remoteRepositories);
         }
 
         // interpolation is before injection, because interpolation is off-limits in the injected variables
-        modelDefaultsInjector.injectDefaults( model );
+        modelDefaultsInjector.injectDefaults(model);
 
         MavenProject parentProject = project.getParent();
 
         Model originalModel = project.getOriginalModel();
 
         // We will return a different project object using the new model (hence the need to return a project, not just modify the parameter)
-        project = new MavenProject( model );
+        project = new MavenProject(model);
 
-        project.setOriginalModel( originalModel );
+        project.setOriginalModel(originalModel);
 
-        project.setActiveProfiles( activeProfiles );
+        project.setActiveProfiles(activeProfiles);
 
         // TODO: maybe not strictly correct, while we should enfore that packaging has a type handler of the same id, we don't
-        Artifact projectArtifact = artifactFactory.createBuildArtifact( project.getGroupId(), project.getArtifactId(),
-                                                                        project.getVersion(), project.getPackaging() );
+        Artifact projectArtifact = artifactFactory.createBuildArtifact(project.getGroupId(), project.getArtifactId(),
+                project.getVersion(), project.getPackaging());
 
-        project.setArtifact( projectArtifact );
+        project.setArtifact(projectArtifact);
 
-        project.setPluginArtifactRepositories( ProjectUtils.buildArtifactRepositories( model.getPluginRepositories(),
-                                                                                       artifactRepositoryFactory,
-                                                                                       container ) );
+        project.setPluginArtifactRepositories(ProjectUtils.buildArtifactRepositories(model.getPluginRepositories(),
+                artifactRepositoryFactory,
+                container));
 
         DistributionManagement dm = model.getDistributionManagement();
-        if ( dm != null )
-        {
-            ArtifactRepository repo = ProjectUtils.buildDeploymentArtifactRepository( dm.getRepository(),
-                                                                                      artifactRepositoryFactory,
-                                                                                      container );
-            project.setReleaseArtifactRepository( repo );
+        if (dm != null) {
+            ArtifactRepository repo = ProjectUtils.buildDeploymentArtifactRepository(dm.getRepository(),
+                    artifactRepositoryFactory,
+                    container);
+            project.setReleaseArtifactRepository(repo);
 
-            if ( dm.getSnapshotRepository() != null )
-            {
-                repo = ProjectUtils.buildDeploymentArtifactRepository( dm.getSnapshotRepository(),
-                                                                       artifactRepositoryFactory, container );
-                project.setSnapshotArtifactRepository( repo );
+            if (dm.getSnapshotRepository() != null) {
+                repo = ProjectUtils.buildDeploymentArtifactRepository(dm.getSnapshotRepository(),
+                        artifactRepositoryFactory, container);
+                project.setSnapshotArtifactRepository(repo);
             }
         }
 
-        if ( parentProject != null )
-        {
-            String cacheKey = createCacheKey( parentProject.getGroupId(),
-                                              parentProject.getArtifactId(),
-                                              parentProject.getVersion() );
+        if (parentProject != null) {
+            String cacheKey = createCacheKey(parentProject.getGroupId(),
+                    parentProject.getArtifactId(),
+                    parentProject.getVersion());
 
-            MavenProject processedParent = (MavenProject) processedProjectCache.get( cacheKey );
+            MavenProject processedParent = (MavenProject) processedProjectCache.get(cacheKey);
             Artifact parentArtifact;
 
             // yeah, this null check might be a bit paranoid, but better safe than sorry...
-            if ( processedParent != null )
-            {
-                project.setParent( processedParent );
+            if (processedParent != null) {
+                project.setParent(processedParent);
 
                 parentArtifact = processedParent.getArtifact();
-            }
-            else
-            {
-                project.setParent( parentProject );
+            } else {
+                project.setParent(parentProject);
 
-                parentArtifact = artifactFactory.createParentArtifact( parentProject.getGroupId(),
-                                                                                parentProject.getArtifactId(),
-                                                                                parentProject.getVersion() );
+                parentArtifact = artifactFactory.createParentArtifact(parentProject.getGroupId(),
+                        parentProject.getArtifactId(),
+                        parentProject.getVersion());
             }
 
-            project.setParentArtifact( parentArtifact );
+            project.setParentArtifact(parentArtifact);
         }
 
         // Must validate before artifact construction to make sure dependencies are good
-        ModelValidationResult validationResult = validator.validate( model );
+        ModelValidationResult validationResult = validator.validate(model);
 
-        String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
+        String projectId = safeVersionlessKey(model.getGroupId(), model.getArtifactId());
 
-        if ( validationResult.getMessageCount() > 0 )
-        {
-            throw new InvalidProjectModelException( projectId, pomLocation, "Failed to validate POM",
-                                                    validationResult );
+        if (validationResult.getMessageCount() > 0) {
+            throw new InvalidProjectModelException(projectId, pomLocation, "Failed to validate POM",
+                    validationResult);
         }
 
         project.setRemoteArtifactRepositories(
-            ProjectUtils.buildArtifactRepositories( model.getRepositories(), artifactRepositoryFactory, container ) );
+                ProjectUtils.buildArtifactRepositories(model.getRepositories(), artifactRepositoryFactory, container));
 
         // TODO: these aren't taking active project artifacts into consideration in the reactor
-        project.setPluginArtifacts( createPluginArtifacts( projectId, project.getBuildPlugins() ) );
+        project.setPluginArtifacts(createPluginArtifacts(projectId, project.getBuildPlugins()));
 
-        project.setReportArtifacts( createReportArtifacts( projectId, project.getReportPlugins() ) );
+        project.setReportArtifacts(createReportArtifacts(projectId, project.getReportPlugins()));
 
-        project.setExtensionArtifacts( createExtensionArtifacts( projectId, project.getBuildExtensions() ) );
+        project.setExtensionArtifacts(createExtensionArtifacts(projectId, project.getBuildExtensions()));
 
         return project;
     }
@@ -1127,100 +995,82 @@
      * @todo We need to find an effective way to unit test parts of this method!
      * @todo Refactor this into smaller methods with discrete purposes.
      */
-    private MavenProject assembleLineage( Model model,
-                                          LinkedList lineage,
-                                          ProjectBuilderConfiguration config,
-                                          File projectDir,
-                                          List parentSearchRepositories,
-                                          Set aggregatedRemoteWagonRepositories,
-                                          boolean strict )
-        throws ProjectBuildingException, InvalidRepositoryException
-    {
-        Model originalModel = ModelUtils.cloneModel( model );
+    private MavenProject assembleLineage(Model model,
+                                         LinkedList lineage,
+                                         ProjectBuilderConfiguration config,
+                                         File projectDir,
+                                         List parentSearchRepositories,
+                                         Set aggregatedRemoteWagonRepositories,
+                                         boolean strict)
+            throws ProjectBuildingException, InvalidRepositoryException {
+        Model originalModel = ModelUtils.cloneModel(model);
 
 
-        if ( !model.getRepositories().isEmpty() )
-        {
-            List respositories = buildArtifactRepositories( model );
+        if (!model.getRepositories().isEmpty()) {
+            List respositories = buildArtifactRepositories(model);
 
-            for ( Iterator it = respositories.iterator(); it.hasNext(); )
-            {
+            for (Iterator it = respositories.iterator(); it.hasNext();) {
                 ArtifactRepository repository = (ArtifactRepository) it.next();
 
-                if ( !aggregatedRemoteWagonRepositories.contains( repository ) )
-                {
-                    aggregatedRemoteWagonRepositories.add( repository );
+                if (!aggregatedRemoteWagonRepositories.contains(repository)) {
+                    aggregatedRemoteWagonRepositories.add(repository);
                 }
             }
         }
 
         ProfileManager externalProfileManager = config.getGlobalProfileManager();
         ProfileManager profileManager;
-        if ( externalProfileManager != null )
-        {
-            profileManager = new DefaultProfileManager( container, externalProfileManager.getRequestProperties() );
-        }
-        else
-        {
+        if (externalProfileManager != null) {
+            profileManager = new DefaultProfileManager(container, externalProfileManager.getRequestProperties());
+        } else {
             //TODO mkleint - use the (Container, Properties constructor to make system properties embeddable
-            profileManager = new DefaultProfileManager( container );
+            profileManager = new DefaultProfileManager(container);
         }
 
-        if ( externalProfileManager != null )
-        {
-            profileManager.explicitlyActivate( externalProfileManager.getExplicitlyActivatedIds() );
+        if (externalProfileManager != null) {
+            profileManager.explicitlyActivate(externalProfileManager.getExplicitlyActivatedIds());
 
-            profileManager.explicitlyDeactivate( externalProfileManager.getExplicitlyDeactivatedIds() );
+            profileManager.explicitlyDeactivate(externalProfileManager.getExplicitlyDeactivatedIds());
         }
 
         List activeProfiles;
 
-        try
-        {
-            profileManager.addProfiles( model.getProfiles() );
+        try {
+            profileManager.addProfiles(model.getProfiles());
 
-            loadProjectExternalProfiles( profileManager, projectDir );
+            loadProjectExternalProfiles(profileManager, projectDir);
 
-            activeProfiles = injectActiveProfiles( profileManager, model );
+            activeProfiles = injectActiveProfiles(profileManager, model);
         }
-        catch ( ProfileActivationException e )
-        {
-            String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
+        catch (ProfileActivationException e) {
+            String projectId = safeVersionlessKey(model.getGroupId(), model.getArtifactId());
 
-            throw new ProjectBuildingException( projectId, "Failed to activate local (project-level) build profiles: " +
-                e.getMessage(), e );
+            throw new ProjectBuildingException(projectId, "Failed to activate local (project-level) build profiles: " +
+                    e.getMessage(), e);
         }
 
-        MavenProject project = new MavenProject( model );
+        MavenProject project = new MavenProject(model);
 
-        project.setActiveProfiles( activeProfiles );
-        project.setOriginalModel( originalModel );
+        project.setActiveProfiles(activeProfiles);
+        project.setOriginalModel(originalModel);
 
-        lineage.addFirst( project );
+        lineage.addFirst(project);
 
         Parent parentModel = model.getParent();
 
-        String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
+        String projectId = safeVersionlessKey(model.getGroupId(), model.getArtifactId());
 
-        if ( parentModel != null )
-        {
-            if ( StringUtils.isEmpty( parentModel.getGroupId() ) )
-            {
-                throw new ProjectBuildingException( projectId, "Missing groupId element from parent element" );
-            }
-            else if ( StringUtils.isEmpty( parentModel.getArtifactId() ) )
-            {
-                throw new ProjectBuildingException( projectId, "Missing artifactId element from parent element" );
-            }
-            else if ( parentModel.getGroupId().equals( model.getGroupId() ) &&
-                parentModel.getArtifactId().equals( model.getArtifactId() ) )
-            {
-                throw new ProjectBuildingException( projectId,
-                                                    "Parent element is a duplicate of " + "the current project " );
-            }
-            else if ( StringUtils.isEmpty( parentModel.getVersion() ) )
-            {
-                throw new ProjectBuildingException( projectId, "Missing version element from parent element" );
+        if (parentModel != null) {
+            if (StringUtils.isEmpty(parentModel.getGroupId())) {
+                throw new ProjectBuildingException(projectId, "Missing groupId element from parent element");
+            } else if (StringUtils.isEmpty(parentModel.getArtifactId())) {
+                throw new ProjectBuildingException(projectId, "Missing artifactId element from parent element");
+            } else if (parentModel.getGroupId().equals(model.getGroupId()) &&
+                    parentModel.getArtifactId().equals(model.getArtifactId())) {
+                throw new ProjectBuildingException(projectId,
+                        "Parent element is a duplicate of " + "the current project ");
+            } else if (StringUtils.isEmpty(parentModel.getVersion())) {
+                throw new ProjectBuildingException(projectId, "Missing version element from parent element");
             }
 
             // the only way this will have a value is if we find the parent on disk...
@@ -1229,12 +1079,11 @@
             model = null;
 
             String parentKey =
-                createCacheKey( parentModel.getGroupId(), parentModel.getArtifactId(), parentModel.getVersion() );
-            MavenProject parentProject = (MavenProject) rawProjectCache.get( parentKey );
+                    createCacheKey(parentModel.getGroupId(), parentModel.getArtifactId(), parentModel.getVersion());
+            MavenProject parentProject = (MavenProject) rawProjectCache.get(parentKey);
 
-            if ( parentProject != null )
-            {
-                model = ModelUtils.cloneModel( parentProject.getModel() );
+            if (parentProject != null) {
+                model = ModelUtils.cloneModel(parentProject.getModel());
 
                 parentDescriptor = parentProject.getFile();
             }
@@ -1243,96 +1092,78 @@
 
             // if we can't find a cached model matching the parent spec, then let's try to look on disk using
             // <relativePath/>
-            if ( ( model == null ) && ( projectDir != null ) && StringUtils.isNotEmpty( parentRelativePath ) )
-            {
-                parentDescriptor = new File( projectDir, parentRelativePath );
-
-                if ( getLogger().isDebugEnabled() )
-                {
-                    getLogger().debug( "Searching for parent-POM: " + parentModel.getId() + " of project: " +
-                        project.getId() + " in relative path: " + parentRelativePath );
-                }
-
-                if ( parentDescriptor.isDirectory() )
-                {
-                    if ( getLogger().isDebugEnabled() )
-                    {
-                        getLogger().debug( "Path specified in <relativePath/> (" + parentRelativePath +
-                            ") is a directory. Searching for 'pom.xml' within this directory." );
+            if ((model == null) && (projectDir != null) && StringUtils.isNotEmpty(parentRelativePath)) {
+                parentDescriptor = new File(projectDir, parentRelativePath);
+
+                if (getLogger().isDebugEnabled()) {
+                    getLogger().debug("Searching for parent-POM: " + parentModel.getId() + " of project: " +
+                            project.getId() + " in relative path: " + parentRelativePath);
+                }
+
+                if (parentDescriptor.isDirectory()) {
+                    if (getLogger().isDebugEnabled()) {
+                        getLogger().debug("Path specified in <relativePath/> (" + parentRelativePath +
+                                ") is a directory. Searching for 'pom.xml' within this directory.");
                     }
 
-                    parentDescriptor = new File( parentDescriptor, "pom.xml" );
+                    parentDescriptor = new File(parentDescriptor, "pom.xml");
 
-                    if ( !parentDescriptor.exists() )
-                    {
-                        if ( getLogger().isDebugEnabled() )
-                        {
-                            getLogger().debug( "Parent-POM: " + parentModel.getId() + " for project: " +
-                                project.getId() + " cannot be loaded from relative path: " + parentDescriptor +
-                                "; path does not exist." );
+                    if (!parentDescriptor.exists()) {
+                        if (getLogger().isDebugEnabled()) {
+                            getLogger().debug("Parent-POM: " + parentModel.getId() + " for project: " +
+                                    project.getId() + " cannot be loaded from relative path: " + parentDescriptor +
+                                    "; path does not exist.");
                         }
                     }
                 }
 
-                if ( parentDescriptor != null )
-                {
-                    try
-                    {
+                if (parentDescriptor != null) {
+                    try {
                         parentDescriptor = parentDescriptor.getCanonicalFile();
                     }
-                    catch ( IOException e )
-                    {
-                        getLogger().debug( "Failed to canonicalize potential parent POM: \'" + parentDescriptor + "\'",
-                                           e );
+                    catch (IOException e) {
+                        getLogger().debug("Failed to canonicalize potential parent POM: \'" + parentDescriptor + "\'",
+                                e);
 
                         parentDescriptor = null;
                     }
                 }
 
-                if ( ( parentDescriptor != null ) && parentDescriptor.exists() )
-                {
-                    Model candidateParent = readModel( projectId, parentDescriptor, strict );
+                if ((parentDescriptor != null) && parentDescriptor.exists()) {
+                    Model candidateParent = readModel(projectId, parentDescriptor, strict);
 
                     String candidateParentGroupId = candidateParent.getGroupId();
-                    if ( ( candidateParentGroupId == null ) && ( candidateParent.getParent() != null ) )
-                    {
+                    if ((candidateParentGroupId == null) && (candidateParent.getParent() != null)) {
                         candidateParentGroupId = candidateParent.getParent().getGroupId();
                     }
 
                     String candidateParentVersion = candidateParent.getVersion();
-                    if ( ( candidateParentVersion == null ) && ( candidateParent.getParent() != null ) )
-                    {
+                    if ((candidateParentVersion == null) && (candidateParent.getParent() != null)) {
                         candidateParentVersion = candidateParent.getParent().getVersion();
                     }
 
-                    if ( parentModel.getGroupId().equals( candidateParentGroupId ) &&
-                        parentModel.getArtifactId().equals( candidateParent.getArtifactId() ) &&
-                        parentModel.getVersion().equals( candidateParentVersion ) )
-                    {
+                    if (parentModel.getGroupId().equals(candidateParentGroupId) &&
+                            parentModel.getArtifactId().equals(candidateParent.getArtifactId()) &&
+                            parentModel.getVersion().equals(candidateParentVersion)) {
                         model = candidateParent;
 
-                        getLogger().debug( "Using parent-POM from the project hierarchy at: \'" +
-                            parentModel.getRelativePath() + "\' for project: " + project.getId() );
+                        getLogger().debug("Using parent-POM from the project hierarchy at: \'" +
+                                parentModel.getRelativePath() + "\' for project: " + project.getId());
+                    } else {
+                        getLogger().debug("Invalid parent-POM referenced by relative path '" +
+                                parentModel.getRelativePath() + "' in parent specification in " + project.getId() + ":" +
+                                "\n  Specified: " + parentModel.getId() + "\n  Found:     " + candidateParent.getId());
                     }
-                    else
-                    {
-                        getLogger().debug( "Invalid parent-POM referenced by relative path '" +
-                            parentModel.getRelativePath() + "' in parent specification in " + project.getId() + ":" +
-                            "\n  Specified: " + parentModel.getId() + "\n  Found:     " + candidateParent.getId() );
-                    }
-                }
-                else if ( getLogger().isDebugEnabled() )
-                {
+                } else if (getLogger().isDebugEnabled()) {
                     getLogger().debug(
-                        "Parent-POM: " + parentModel.getId() + " not found in relative path: " + parentRelativePath );
+                            "Parent-POM: " + parentModel.getId() + " not found in relative path: " + parentRelativePath);
                 }
             }
 
             Artifact parentArtifact = null;
 
             // only resolve the parent model from the repository system if we didn't find it on disk...
-            if ( model == null )
-            {
+            if (model == null) {
                 // MNG-2302: parent's File was being populated incorrectly when parent is loaded from repo.
                 // keep this in line with other POMs loaded from the repository...the file should be null.
                 parentDescriptor = null;
@@ -1348,111 +1179,95 @@
 
                 // we must add the repository this POM was found in too, by chance it may be located where the parent is
                 // we can't query the parent to ask where it is :)
-                List remoteRepositories = new ArrayList( aggregatedRemoteWagonRepositories );
-                remoteRepositories.addAll( parentSearchRepositories );
+                List remoteRepositories = new ArrayList(aggregatedRemoteWagonRepositories);
+                remoteRepositories.addAll(parentSearchRepositories);
 
-                if ( getLogger().isDebugEnabled() )
-                {
-                    getLogger().debug( "Retrieving parent-POM: " + parentModel.getId() + " for project: " +
-                        project.getId() + " from the repository." );
+                if (getLogger().isDebugEnabled()) {
+                    getLogger().debug("Retrieving parent-POM: " + parentModel.getId() + " for project: " +
+                            project.getId() + " from the repository.");
                 }
 
-                parentArtifact = artifactFactory.createParentArtifact( parentModel.getGroupId(),
-                                                                       parentModel.getArtifactId(),
-                                                                       parentModel.getVersion() );
+                parentArtifact = artifactFactory.createParentArtifact(parentModel.getGroupId(),
+                        parentModel.getArtifactId(),
+                        parentModel.getVersion());
 
-                try
-                {
-                    model = findModelFromRepository( parentArtifact, remoteRepositories, config.getLocalRepository(), false );
+                try {
+                    model = findModelFromRepository(parentArtifact, remoteRepositories, config.getLocalRepository(), false);
                 }
-                catch ( ProjectBuildingException e )
-                {
-                    throw new ProjectBuildingException( project.getId(), "Cannot find parent: " + e.getProjectId() +
-                        " for project: " + project.getId(), e );
+                catch (ProjectBuildingException e) {
+                    throw new ProjectBuildingException(project.getId(), "Cannot find parent: " + e.getProjectId() +
+                            " for project: " + project.getId(), e);
                 }
             }
 
-            if ( ( model != null ) && !"pom".equals( model.getPackaging() ) )
-            {
-                throw new ProjectBuildingException( projectId, "Parent: " + model.getId() + " of project: " +
-                    projectId + " has wrong packaging: " + model.getPackaging() + ". Must be 'pom'." );
+            if ((model != null) && !"pom".equals(model.getPackaging())) {
+                throw new ProjectBuildingException(projectId, "Parent: " + model.getId() + " of project: " +
+                        projectId + " has wrong packaging: " + model.getPackaging() + ". Must be 'pom'.");
             }
 
             File parentProjectDir = null;
-            if ( parentDescriptor != null )
-            {
+            if (parentDescriptor != null) {
                 parentProjectDir = parentDescriptor.getParentFile();
             }
 
-            MavenProject parent = assembleLineage( model,
-                                                   lineage,
-                                                   config,
-                                                   parentProjectDir,
-                                                   parentSearchRepositories,
-                                                   aggregatedRemoteWagonRepositories,
-                                                   strict );
+            MavenProject parent = assembleLineage(model,
+                    lineage,
+                    config,
+                    parentProjectDir,
+                    parentSearchRepositories,
+                    aggregatedRemoteWagonRepositories,
+                    strict);
 
-            parent.setFile( parentDescriptor );
+            parent.setFile(parentDescriptor);
 
-            project.setParent( parent );
+            project.setParent(parent);
 
-            project.setParentArtifact( parentArtifact );
+            project.setParentArtifact(parentArtifact);
         }
 
-        rawProjectCache.put( createCacheKey( project.getGroupId(), project.getArtifactId(), project.getVersion() ), new MavenProject( project ) );
+        rawProjectCache.put(createCacheKey(project.getGroupId(), project.getArtifactId(), project.getVersion()), new MavenProject(project));
 
         return project;
     }
 
     private void mergeManagedDependencies(Model model, ArtifactRepository localRepository, List parentSearchRepositories)
-        throws ProjectBuildingException
-    {
+            throws ProjectBuildingException {
         DependencyManagement modelDepMgmt = model.getDependencyManagement();
 
-        if (modelDepMgmt != null)
-        {
+        if (modelDepMgmt != null) {
             Map depsMap = new TreeMap();
             Iterator iter = modelDepMgmt.getDependencies().iterator();
             boolean doInclude = false;
-            while (iter.hasNext())
-            {
+            while (iter.hasNext()) {
                 Dependency dep = (Dependency) iter.next();
-                depsMap.put( dep.getManagementKey(), dep );
-                if ( dep.getType().equals( "pom" ) && Artifact.SCOPE_IMPORT.equals( dep.getScope() ) )
-                {
+                depsMap.put(dep.getManagementKey(), dep);
+                if (dep.getType().equals("pom") && Artifact.SCOPE_IMPORT.equals(dep.getScope())) {
                     doInclude = true;
                 }
             }
             Map newDeps = new TreeMap(depsMap);
             iter = modelDepMgmt.getDependencies().iterator();
-            if (doInclude)
-            {
-                while (iter.hasNext())
-                {
-                    Dependency dep = (Dependency)iter.next();
-                    if ( dep.getType().equals( "pom" )
-                         && Artifact.SCOPE_IMPORT.equals( dep.getScope() ) )
-                    {
-                        Artifact artifact = artifactFactory.createProjectArtifact( dep.getGroupId(), dep.getArtifactId(),

[... 476 lines stripped ...]


Mime
View raw message