maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r694316 - in /maven/components/branches/maven-2.1.x: ./ maven-core/src/main/java/org/apache/maven/cli/ maven-core/src/main/java/org/apache/maven/lifecycle/ maven-core/src/main/resources/META-INF/plexus/ maven-plugin-descriptor/src/main/java...
Date Thu, 11 Sep 2008 15:51:19 GMT
Author: jdcasey
Date: Thu Sep 11 08:51:17 2008
New Revision: 694316

URL: http://svn.apache.org/viewvc?rev=694316&view=rev
Log:
Merging up to RC17 code from the 2.1.0-M1-RC branch.

Modified:
    maven/components/branches/maven-2.1.x/   (props changed)
    maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
    maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
    maven/components/branches/maven-2.1.x/maven-core/src/main/resources/META-INF/plexus/components.xml
    maven/components/branches/maven-2.1.x/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
    maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
    maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
    maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java
    maven/components/branches/maven-2.1.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java

Propchange: maven/components/branches/maven-2.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 11 08:51:17 2008
@@ -1,4 +1,4 @@
 /maven/components/branches/maven-2.0.10-RC:679193-679867,680477-688882
 /maven/components/branches/maven-2.0.x:679552-679867
-/maven/components/branches/maven-2.1.0-M1-RC:690315,691793
+/maven/components/branches/maven-2.1.0-M1-RC:690315,691793-694304
 /maven/components/branches/maven-2.1.0-RC:688883,689695,689990

Modified: maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java?rev=694316&r1=694315&r2=694316&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
(original)
+++ maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
Thu Sep 11 08:51:17 2008
@@ -353,7 +353,7 @@
         }
         catch ( XmlPullParserException e )
         {
-            throw new SettingsConfigurationException( e.getMessage(), e.getDetail(), e.getLineNumber(),
+            throw new SettingsConfigurationException( e.getMessage(), e, e.getLineNumber(),
                                                       e.getColumnNumber() );
         }
 

Modified: maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=694316&r1=694315&r2=694316&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
(original)
+++ maven/components/branches/maven-2.1.x/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
Thu Sep 11 08:51:17 2008
@@ -1025,6 +1025,8 @@
                                        MavenProject project )
         throws LifecycleExecutionException, BuildFailureException, PluginNotFoundException
     {
+        project = project.getExecutionProject();
+        
         forkEntryPoints.push( mojoDescriptor );
 
         PluginDescriptor pluginDescriptor = mojoDescriptor.getPluginDescriptor();
@@ -1174,15 +1176,13 @@
         {
             Lifecycle lifecycle = getLifecycleForPhase( targetPhase );
 
-            executeGoalWithLifecycle( targetPhase, forkEntryPoints, session, lifecycleMappings,
project.getExecutionProject(),
-                                      lifecycle );
+            executeGoalWithLifecycle( targetPhase, forkEntryPoints, session, lifecycleMappings,
project, lifecycle );
         }
         else
         {
             String goal = mojoDescriptor.getExecuteGoal();
             MojoDescriptor desc = getMojoDescriptor( pluginDescriptor, goal );
-            executeGoals( Collections.singletonList( new MojoExecution( desc ) ), forkEntryPoints,
session,
-                          project.getExecutionProject() );
+            executeGoals( Collections.singletonList( new MojoExecution( desc ) ), forkEntryPoints,
session, project );
         }
     }
 

Modified: maven/components/branches/maven-2.1.x/maven-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-core/src/main/resources/META-INF/plexus/components.xml?rev=694316&r1=694315&r2=694316&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-core/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/components/branches/maven-2.1.x/maven-core/src/main/resources/META-INF/plexus/components.xml
Thu Sep 11 08:51:17 2008
@@ -209,6 +209,11 @@
     <component>
       <role>org.apache.maven.ConfigurationInterpolator</role>
       <implementation>org.apache.maven.ReflectionConfigurationInterpolator</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.project.path.PathTranslator</role>
+        </requirement>
+      </requirements>
     </component>
     
     <!--

Modified: maven/components/branches/maven-2.1.x/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java?rev=694316&r1=694315&r2=694316&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
(original)
+++ maven/components/branches/maven-2.1.x/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
Thu Sep 11 08:51:17 2008
@@ -144,7 +144,7 @@
     {
         if ( lookupKey == null )
         {
-            lookupKey = groupId + ":" + artifactId.intern();
+            lookupKey = ( groupId + ":" + artifactId ).intern();
         }
         
         return lookupKey;

Modified: maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=694316&r1=694315&r2=694316&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
(original)
+++ maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
Thu Sep 11 08:51:17 2008
@@ -1433,6 +1433,37 @@
                 }
             }
         }
+        
+//        PluginManagement pluginManagement = getBuild().getPluginManagement();
+//        if ( pluginManagement != null && pluginManagement.getPlugins() != null
)
+//        {
+//            for ( Iterator iterator = pluginManagement.getPlugins().iterator(); iterator.hasNext();
)
+//            {
+//                Plugin plugin = (Plugin) iterator.next();
+//
+//                if ( pluginGroupId.equals( plugin.getGroupId() ) && pluginArtifactId.equals(
plugin.getArtifactId() ) )
+//                {
+//                    Xpp3Dom managedDom = (Xpp3Dom) plugin.getConfiguration();
+//
+//                    if ( executionId != null )
+//                    {
+//                        PluginExecution execution = (PluginExecution) plugin.getExecutionsAsMap().get(
executionId );
+//                        if ( execution != null )
+//                        {
+//                            Xpp3Dom executionConfiguration = (Xpp3Dom) execution.getConfiguration();
+//                            if ( executionConfiguration != null )
+//                            {
+//                                Xpp3Dom newDom = new Xpp3Dom( executionConfiguration );
+//                                managedDom = Xpp3Dom.mergeXpp3Dom( newDom, dom );
+//                            }
+//                        }
+//                    }
+//                    
+//                    dom = Xpp3Dom.mergeXpp3Dom( dom, managedDom );
+//                    break;
+//                }
+//            }
+//        }
 
         if ( dom != null )
         {

Modified: maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java?rev=694316&r1=694315&r2=694316&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
(original)
+++ maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
Thu Sep 11 08:51:17 2008
@@ -246,6 +246,9 @@
         // NOTE: Order counts here!
         valueSources.add( basedirValueSource );
         valueSources.add( new BuildTimestampValueSource( config.getBuildStartTime(), timestampFormat
) );
+        valueSources.add( modelValueSource1 );
+        valueSources.add( new MapBasedValueSource( config.getUserProperties() ) );
+        valueSources.add( new PrefixedValueSourceWrapper( new MapBasedValueSource( modelProperties
), PROJECT_PREFIXES, true ) );
         valueSources.add( new MapBasedValueSource( config.getExecutionProperties() ) );
         valueSources.add( new AbstractValueSource( false )
         {
@@ -254,17 +257,14 @@
                 return config.getExecutionProperties().getProperty( "env." + expression );
             }
         } );
-        valueSources.add( modelValueSource1 );
-        valueSources.add( new PrefixedValueSourceWrapper( new MapBasedValueSource( modelProperties
), PROJECT_PREFIXES, true ) );
         valueSources.add( modelValueSource2 );
-        valueSources.add( new MapBasedValueSource( config.getUserProperties() ) );
         
         return valueSources;
     }
     
     protected List createPostProcessors( final Model model, final File projectDir, final
ProjectBuilderConfiguration config )
     {
-        return Collections.singletonList( new PathTranslatingPostProcessor( TRANSLATED_PATH_EXPRESSIONS,
projectDir, pathTranslator ) );
+        return Collections.singletonList( new PathTranslatingPostProcessor( PROJECT_PREFIXES,
TRANSLATED_PATH_EXPRESSIONS, projectDir, pathTranslator ) );
     }
     
     protected String interpolateInternal( String src, List valueSources, List postProcessors,
boolean debug )

Modified: maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java?rev=694316&r1=694315&r2=694316&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java
(original)
+++ maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingPostProcessor.java
Thu Sep 11 08:51:17 2008
@@ -23,6 +23,7 @@
 import org.codehaus.plexus.interpolation.AbstractFunctionValueSourceWrapper;
 import org.codehaus.plexus.interpolation.InterpolationPostProcessor;
 import org.codehaus.plexus.interpolation.ValueSource;
+import org.codehaus.plexus.interpolation.util.ValueSourceUtils;
 
 import java.io.File;
 import java.util.List;
@@ -38,9 +39,11 @@
     private final List unprefixedPathKeys;
     private final File projectDir;
     private final PathTranslator pathTranslator;
+    private final List expressionPrefixes;
 
-    public PathTranslatingPostProcessor( List unprefixedPathKeys, File projectDir, PathTranslator
pathTranslator )
+    public PathTranslatingPostProcessor( List expressionPrefixes, List unprefixedPathKeys,
File projectDir, PathTranslator pathTranslator )
     {
+        this.expressionPrefixes = expressionPrefixes;
         this.unprefixedPathKeys = unprefixedPathKeys;
         this.projectDir = projectDir;
         this.pathTranslator = pathTranslator;
@@ -49,6 +52,8 @@
     public Object execute( String expression,
                                       Object value )
     {
+        expression = ValueSourceUtils.trimPrefix( expression, expressionPrefixes, true );
+        
         if ( projectDir != null && value != null && unprefixedPathKeys.contains(
expression ) )
         {
             return pathTranslator.alignToBaseDirectory( String.valueOf( value ), projectDir
);

Modified: maven/components/branches/maven-2.1.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java?rev=694316&r1=694315&r2=694316&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
(original)
+++ maven/components/branches/maven-2.1.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
Thu Sep 11 08:51:17 2008
@@ -119,7 +119,7 @@
 
                 SettingsXpp3Reader modelReader = new SettingsXpp3Reader();
 
-                settings = modelReader.read( sReader );
+                settings = modelReader.read( sReader, true );
 
                 RuntimeInfo rtInfo = new RuntimeInfo( settings );
 



Mime
View raw message