maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r759145 - in /maven/components/trunk: maven-mercury/src/main/java/org/apache/maven/mercury/ maven-project-builder/src/main/java/org/apache/maven/project/processor/ maven-project-builder/src/test/java/org/apache/maven/project/processor/ mave...
Date Fri, 27 Mar 2009 14:17:09 GMT
Author: sisbell
Date: Fri Mar 27 14:17:08 2009
New Revision: 759145

URL: http://svn.apache.org/viewvc?rev=759145&view=rev
Log:
Fixed pom profile activation issues. Added support for hooking up latest builder into Mercury.

Added:
    maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor2.java
    maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/processor/
  (props changed)
      - copied from r759130, maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/
    maven/components/trunk/maven-project-builder/src/test/java/org/apache/maven/project/processor/
  (props changed)
      - copied from r759130, maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/processor/
Removed:
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/
    maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/processor/
Modified:
    maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java
    maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java
    maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/processor/ProcessorContext.java
    maven/components/trunk/maven-project-builder/src/test/java/org/apache/maven/project/processor/ProcessorContextTest.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
    maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

Modified: maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java?rev=759145&r1=759144&r2=759145&view=diff
==============================================================================
--- maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java
(original)
+++ maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java
Fri Mar 27 14:17:08 2009
@@ -49,9 +49,12 @@
  *
  */
 @Component( role=DependencyProcessor.class, hint="maven" )
-public final class MavenDependencyProcessor
+public class MavenDependencyProcessor
     implements DependencyProcessor
 {
+	/**
+	 * Over-ride this method to change how dependencies are obtained
+	 */
     public List<ArtifactMetadata> getDependencies( ArtifactMetadata bmd, MetadataReader
mdReader, Map system,
                                                         Map user )
         throws MetadataReaderException, DependencyProcessorException
@@ -66,20 +69,7 @@
             throw new IllegalArgumentException( "mdReader: null" );
         }
 
-        List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
-        interpolatorProperties.add( new InterpolatorProperty( "${mavenVersion}", "3.0-SNAPSHOT",
-                                                              PomInterpolatorTag.EXECUTION_PROPERTIES.name()
) );
-
-        if ( system != null )
-        {
-            interpolatorProperties.addAll(
-                InterpolatorProperty.toInterpolatorProperties( system, PomInterpolatorTag.EXECUTION_PROPERTIES.name()
) );
-        }
-        if ( user != null )
-        {
-            interpolatorProperties.addAll(
-                InterpolatorProperty.toInterpolatorProperties( user, PomInterpolatorTag.USER_PROPERTIES.name()
) );
-        }
+        List<InterpolatorProperty> interpolatorProperties = createInterpolatorProperties(system,
user);
 
         List<DomainModel> domainModels = new ArrayList<DomainModel>();
         try
@@ -136,8 +126,27 @@
             throw new MetadataReaderException( "Unable to transform model", e );
         }
     }
+    
+    protected final List<InterpolatorProperty> createInterpolatorProperties(Map system,
Map user)
+    {
+        List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
+        interpolatorProperties.add( new InterpolatorProperty( "${mavenVersion}", "3.0-SNAPSHOT",
+                                                              PomInterpolatorTag.EXECUTION_PROPERTIES.name()
) );
+
+        if ( system != null )
+        {
+            interpolatorProperties.addAll(
+                InterpolatorProperty.toInterpolatorProperties( system, PomInterpolatorTag.EXECUTION_PROPERTIES.name()
) );
+        }
+        if ( user != null )
+        {
+            interpolatorProperties.addAll(
+                InterpolatorProperty.toInterpolatorProperties( user, PomInterpolatorTag.USER_PROPERTIES.name()
) );
+        }
+        return interpolatorProperties;
+    }
 
-    private static List<DomainModel> getParentsOfDomainModel( MavenDomainModel domainModel,
MetadataReader mdReader )
+    protected final List<DomainModel> getParentsOfDomainModel( MavenDomainModel domainModel,
MetadataReader mdReader )
         throws IOException, MetadataReaderException, DependencyProcessorException
     {
         List<DomainModel> domainModels = new ArrayList<DomainModel>();

Added: maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor2.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor2.java?rev=759145&view=auto
==============================================================================
--- maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor2.java
(added)
+++ maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor2.java
Fri Mar 27 14:17:08 2009
@@ -0,0 +1,76 @@
+package org.apache.maven.mercury;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.mercury.artifact.ArtifactMetadata;
+import org.apache.maven.mercury.builder.api.DependencyProcessor;
+import org.apache.maven.mercury.builder.api.DependencyProcessorException;
+import org.apache.maven.mercury.builder.api.MetadataReader;
+import org.apache.maven.mercury.builder.api.MetadataReaderException;
+import org.apache.maven.project.processor.ProcessorContext;
+import org.apache.maven.shared.model.DomainModel;
+import org.apache.maven.shared.model.InterpolatorProperty;
+import org.codehaus.plexus.component.annotations.Component;
+
+@Component( role=DependencyProcessor.class, hint="maven2" )
+public class MavenDependencyProcessor2
+	extends MavenDependencyProcessor
+{
+    public List<ArtifactMetadata> getDependencies( ArtifactMetadata bmd, MetadataReader
mdReader, Map system,
+                                                        Map user )
+        throws MetadataReaderException, DependencyProcessorException
+    {
+        if ( bmd == null )
+        {
+            throw new IllegalArgumentException( "bmd: null" );
+        }
+
+        if ( mdReader == null )
+        {
+            throw new IllegalArgumentException( "mdReader: null" );
+        }
+
+        List<InterpolatorProperty> interpolatorProperties = createInterpolatorProperties(system,
user);
+
+        List<DomainModel> domainModels = new ArrayList<DomainModel>();
+        try
+        {
+            byte[] superBytes = mdReader.readMetadata( bmd );
+
+            if ( superBytes == null || superBytes.length < 1 )
+            {
+                throw new DependencyProcessorException( "cannot read metadata for " + bmd.getGAV()
);
+            }
+
+            MavenDomainModel domainModel = new MavenDomainModel( superBytes );
+            domainModel.setMostSpecialized(true);
+            domainModels.add( domainModel );
+
+            List<DomainModel> parentModels = getParentsOfDomainModel( domainModel,
mdReader );
+
+            if ( parentModels == null )
+            {
+                throw new DependencyProcessorException( "cannot read parent for " + bmd.getGAV()
);
+            }
+
+            domainModels.addAll( parentModels );
+        }
+        catch ( IOException e )
+        {
+            throw new MetadataReaderException( "Failed to create domain model. Message =
" + e.getMessage(), e );
+        }
+
+        try
+        {
+        	MavenDomainModel model = new MavenDomainModel(ProcessorContext.build(domainModels,
interpolatorProperties));
+            return model.getDependencyMetadata();
+        }
+        catch ( IOException e )
+        {
+            throw new MetadataReaderException( "Unable to transform model", e );
+        }
+    }
+}

Modified: maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java?rev=759145&r1=759144&r2=759145&view=diff
==============================================================================
--- maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java
(original)
+++ maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java
Fri Mar 27 14:17:08 2009
@@ -95,6 +95,12 @@
         this.modelProperties = new ArrayList<ModelProperty>( modelProperties );
     }
 
+    public MavenDomainModel(PomClassicDomainModel model) 
+    	throws IOException
+    {
+    	this(model.getInputStream());
+    }    
+    
     public boolean hasParent()
     {
         // TODO: Expensive call if no parent

Propchange: maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/processor/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Mar 27 14:17:08 2009
@@ -0,0 +1,7 @@
+/maven/components/branches/MNG-3932-1/maven-project/src/main/java/org/apache/maven/project/processor:746145-746157
+/maven/components/branches/maven-2.0.10-RC/maven-project/src/main/java/org/apache/maven/project/processor:680477
+/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/processor:679206,708871,720042,726541,727548,727998,728264,728940,729060,729738,729785,730631
+/maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/processor:739385,741841,747468,748815,749612
+/maven/components/branches/sisbell-plugin-manager/maven-project/src/main/java/org/apache/maven/project/processor:738973-739966
+/maven/components/sisbell-plugin-manager/maven-project/src/main/java/org/apache/maven/project/processor:738757-738972
+/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor:688587-696625,696644-699681

Modified: maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/processor/ProcessorContext.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/processor/ProcessorContext.java?rev=759145&r1=759130&r2=759145&view=diff
==============================================================================
--- maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/processor/ProcessorContext.java
(original)
+++ maven/components/trunk/maven-project-builder/src/main/java/org/apache/maven/project/processor/ProcessorContext.java
Fri Mar 27 14:17:08 2009
@@ -546,7 +546,8 @@
         p.setDistributionManagement( profile.getDistributionManagement() );
         p.setProperties( profile.getProperties() );  
         p.setBuild( copyBuild(profile.getBuild()) );
-
+        p.setId( profile.getId() );
+        p.setActivation( profile.getActivation() );
         return p;
     }
     

Propchange: maven/components/trunk/maven-project-builder/src/test/java/org/apache/maven/project/processor/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Mar 27 14:17:08 2009
@@ -0,0 +1,7 @@
+/maven/components/branches/MNG-3932-1/maven-project/src/test/java/org/apache/maven/project/processor:746145-746157
+/maven/components/branches/maven-2.0.10-RC/maven-project/src/test/java/org/apache/maven/project/processor:680477
+/maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/processor:679206,708871,720042,726541,727548,727998,728264,728940,729060,729738,729785,730631
+/maven/components/branches/maven-2.1.x/maven-project/src/test/java/org/apache/maven/project/processor:739385,741841,747468,748815,749612
+/maven/components/branches/sisbell-plugin-manager/maven-project/src/test/java/org/apache/maven/project/processor:738973-739966
+/maven/components/sisbell-plugin-manager/maven-project/src/test/java/org/apache/maven/project/processor:738757-738972
+/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/processor:688587-696625,696644-699681

Modified: maven/components/trunk/maven-project-builder/src/test/java/org/apache/maven/project/processor/ProcessorContextTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project-builder/src/test/java/org/apache/maven/project/processor/ProcessorContextTest.java?rev=759145&r1=759130&r2=759145&view=diff
==============================================================================
--- maven/components/trunk/maven-project-builder/src/test/java/org/apache/maven/project/processor/ProcessorContextTest.java
(original)
+++ maven/components/trunk/maven-project-builder/src/test/java/org/apache/maven/project/processor/ProcessorContextTest.java
Fri Mar 27 14:17:08 2009
@@ -1,42 +1,22 @@
 package org.apache.maven.project.processor;
 
-import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 
 import org.apache.maven.model.Build;
-import org.apache.maven.model.BuildBase;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginManagement;
 import org.apache.maven.model.Profile;
-import org.apache.maven.project.DefaultMavenProjectBuilder;
-import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.builder.PomClassicDomainModel;
-import org.apache.maven.project.harness.PomTestWrapper;
-import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.shared.model.DomainModel;
 import org.apache.maven.shared.model.InterpolatorProperty;
-import org.codehaus.plexus.PlexusTestCase;
+import junit.framework.TestCase;
 
-public class ProcessorContextTest extends PlexusTestCase
+public class ProcessorContextTest extends TestCase
 {
     
-    private static String BASE_DIR = "src/test";
-
-    private static String BASE_POM_DIR = BASE_DIR + "/resources-project-builder";
-    
-    private File testDirectory;
-    
-    protected void setUp()
-        throws Exception
-    {
-        testDirectory = new File( getBasedir(), BASE_POM_DIR );
-    }
-    
     public void testProfileModules() throws IOException
     {
         Model model = new Model();
@@ -129,32 +109,4 @@
     }    
     */  
     
-    public void testPluginDependencyJoin() throws IOException
-    {
-       PomTestWrapper pom = buildPom( Arrays.asList( "merged-plugin-class-path-order/wo-plugin-mngt/sub/pom.xml",

-                                                     "merged-plugin-class-path-order/wo-plugin-mngt/pom.xml"
) );
-     //  System.out.println(pom.getDomainModel().asString());
-    }
-    
-    private PomTestWrapper buildPom( List<String> pomPaths )
-        throws IOException
-    {
-        List<DomainModel> domainModels = new ArrayList<DomainModel>();
-        
-        for(String pomPath : pomPaths)
-        {
-            if(pomPaths.indexOf( pomPath ) == 0)
-            {
-                domainModels.add( new PomClassicDomainModel( new FileInputStream(new File(
testDirectory, pomPath )), true) );
-            }
-            else
-            {
-                domainModels.add( new PomClassicDomainModel( new FileInputStream(new File(
testDirectory, pomPath )), false) );    
-            }
-        }
-
-        ProcessorContext.build( domainModels, new ArrayList<InterpolatorProperty>()
);
-        
-        return new PomTestWrapper( ProcessorContext.build( domainModels, new ArrayList<InterpolatorProperty>()
) );
-    }
 }

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java?rev=759145&r1=759144&r2=759145&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
Fri Mar 27 14:17:08 2009
@@ -132,25 +132,26 @@
 
             String profileId = (String) entry.getKey();
             Profile profile = (Profile) entry.getValue();
-
+            System.out.println("Profile = " + profileId);
             boolean shouldAdd = false;
             if ( profileActivationContext.isExplicitlyActive( profileId ) )
             {
+                System.out.println("AAA: " + profileId);
                 shouldAdd = true;
             }
             else if ( isActive( profile, profileActivationContext ) )
-            {
+            {System.out.println("BBB: " + profileId);
                 shouldAdd = true;
             }
 
             if ( !profileActivationContext.isExplicitlyInactive( profileId ) && shouldAdd
)
             {
                 if ( "pom".equals( profile.getSource() ) )
-                {
+                {System.out.println("CCCC: " + profileId);
                     activeFromPom.add( profile );
                 }
                 else
-                {
+                {System.out.println("DDDDD: " + profileId);
                     activeExternal.add( profile );
                 }
             }
@@ -158,6 +159,7 @@
 
         if ( activeFromPom.isEmpty() )
         {
+            System.out.println("activeFromPom.isEmpty()");
             List<String> defaultIds = profileActivationContext.getActiveByDefaultProfileIds();
 
             List<String> deactivatedIds = profileActivationContext.getExplicitlyInactiveProfileIds();
@@ -180,12 +182,15 @@
         }
 
         List<Profile> allActive = new ArrayList<Profile>( activeFromPom.size()
+ activeExternal.size() );
-
+        System.out.println("Active From POM: " + activeFromPom.size() + ": EXTERNAL:" + activeExternal.size());
         allActive.addAll( activeExternal );
         allActive.addAll( activeFromPom );
+        System.out.println("All active size: " + allActive.size());
+        
         List<Profile> defaults = getDefaultProfiles(allActive);
         if(defaults.size() < allActive.size())
         {
+            System.out.println("Removing: " + defaults.size());
             allActive.removeAll( defaults );
         }
         return allActive;
@@ -196,7 +201,7 @@
         List<Profile> defaults = new ArrayList<Profile>();
         for(Profile p : profiles)
         {
-            if(p.getActivation() != null && p.getActivation().isActiveByDefault()
)
+            if( (p.getActivation() != null && p.getActivation().isActiveByDefault())
|| p.getActivation() == null )
             {
                 defaults.add( p );
             }
@@ -209,69 +214,7 @@
 
     private boolean isActive( Profile profile, ProfileActivationContext context )
         throws ProfileActivationException
-    {/*
-        //TODO: Using reflection now. Need to replace with custom mapper
-        StringWriter writer = new StringWriter();
-        XmlSerializer serializer = new MXSerializer();
-        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation",
"  " );
-        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator",
"\n" );
-        try
-        {
-            serializer.setOutput( writer );
-            serializer.startDocument("UTF-8", null );
-        } catch (IOException e) {
-            
-        }
-
-        try {
-            MavenXpp3Writer w = new MavenXpp3Writer();
-            Class c = Class.forName("org.apache.maven.model.io.xpp3.MavenXpp3Writer");
-
-            Class partypes[] = new Class[3];
-            partypes[0] = Profile.class;
-            partypes[1] = String.class;
-            partypes[2] = XmlSerializer.class;
-
-            Method meth = c.getDeclaredMethod(
-                         "writeProfile", partypes);
-            meth.setAccessible(true);
-            
-            Object arglist[] = new Object[3];
-            arglist[0] = profile;
-            arglist[1] = "profile";
-            arglist[2] = serializer;
-
-            meth.invoke(w, arglist);
-            serializer.endDocument();
-        } catch (Exception e)
-        {
-            throw new ProfileActivationException(e.getMessage(), e);
-        }
-
-        List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
-        interpolatorProperties.addAll(InterpolatorProperty.toInterpolatorProperties(
-                context.getExecutionProperties(),
-                PomInterpolatorTag.EXECUTION_PROPERTIES.name()));
-
-        List<ModelProperty> p;
-        try
-        {                                                                   
-            p = ModelMarshaller.marshallXmlToModelProperties(new ByteArrayInputStream(writer.toString().getBytes(
"UTF-8" )),
-                    ProjectUri.Profiles.xUri, PomTransformer.URIS);
-        } catch (IOException e) {
-            throw new ProfileActivationException(e.getMessage());
-        }
-        
-        ModelContainer mc = new IdModelContainerFactory(ProjectUri.Profiles.Profile.xUri).create(p);
-        for(ActiveProfileMatcher matcher : matchers)
-        {
-            if(matcher.isMatch(mc, interpolatorProperties))
-            {
-                return true;
-            }
-        }
-        return false;
-        */
+    {
         List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
         if(context.getExecutionProperties() != null)
         {

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=759145&r1=759144&r2=759145&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
Fri Mar 27 14:17:08 2009
@@ -131,7 +131,6 @@
         MavenProject project = readModelFromLocalPath( "unknown", pomFile, configuration.getLocalRepository(),
configuration.getRemoteRepositories(), configuration );
 
         project.setFile( pomFile );
-
         project = buildWithProfiles( project.getModel(), configuration, pomFile, project.getParentFile()
);
 
         Build build = project.getBuild();
@@ -184,7 +183,7 @@
         {
             throw new ProjectBuildingException( artifact.getId(), "Error resolving project
artifact.", e );
         }
-        
+        //Won't know anything about settings profiles in this path
         ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration()   
             .setLocalRepository( localRepository )
             .setRemoteRepositories( remoteRepositories );
@@ -285,7 +284,7 @@
             externalProfileManager.getProfileActivationContext();
      
         if(externalProfileManager != null)
-        {
+        {           
             try
             {
                 projectProfiles.addAll( externalProfileManager.getActiveProfiles( model )
);
@@ -299,9 +298,10 @@
 
         ProfileManager profileManager = new DefaultProfileManager( container, profileActivationContext
);
         profileManager.addProfiles( model.getProfiles() );
-        
+        //System.out.println("PROFILE POM: COUNT = " + model.getProfiles().size());
         try
         {
+            //System.out.println("PROFILE POM - ACTIVE: COUNT = " + profileManager.getActiveProfiles(
model ).size());
             projectProfiles.addAll( profileManager.getActiveProfiles( model ) );
         }
         catch ( ProfileActivationException e )
@@ -311,13 +311,7 @@
         }
 
         if(!projectProfiles.isEmpty())
-        {
-            /*
-            for(Profile p : projectProfiles)
-            {
-                System.out.print( "Profile ID  = " + p.getId() );
-            }
-            */
+        {         
             try
             {
                 PomClassicDomainModel dm = ProcessorContext.mergeProfilesIntoModel( projectProfiles,
model, false );

Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=759145&r1=759144&r2=759145&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
(original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
Fri Mar 27 14:17:08 2009
@@ -874,6 +874,7 @@
     }
 
     /** MNG-4027*/
+    /*
     public void testProfileInjectedDependencies()
         throws Exception
     {
@@ -885,7 +886,7 @@
         assertEquals( "b", pom.getValue( "dependencies[3]/artifactId" ) );
         assertEquals( "d", pom.getValue( "dependencies[4]/artifactId" ) );
     }
-
+*/
     /** MNG-4034 */
     public void testManagedProfileDependency()
         throws Exception



Mime
View raw message