maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1072163 - in /maven/maven-3/trunk: maven-model-builder/src/main/java/org/apache/maven/model/inheritance/ maven-model-builder/src/main/java/org/apache/maven/model/merge/ maven-model/src/main/java/org/apache/maven/model/merge/
Date Fri, 18 Feb 2011 21:47:54 GMT
Author: bentmann
Date: Fri Feb 18 21:47:54 2011
New Revision: 1072163

URL: http://svn.apache.org/viewvc?rev=1072163&view=rev
Log:
o Improved location tracking

Modified:
    maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
    maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
    maven/maven-3/trunk/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java

Modified: maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java?rev=1072163&r1=1072162&r2=1072163&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
(original)
+++ maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
Fri Feb 18 21:47:54 2011
@@ -126,6 +126,7 @@ public class DefaultInheritanceAssembler
                     {
                         // NOTE: Enforce recursive merge to trigger merging/inheritance logic
for executions
                         Plugin plugin = new Plugin();
+                        plugin.setLocation( "", element.getLocation( "" ) );
                         plugin.setGroupId( null );
                         mergePlugin( plugin, element, sourceDominant, context );
 
@@ -208,6 +209,7 @@ public class DefaultInheritanceAssembler
                     {
                         // NOTE: Enforce recursive merge to trigger merging/inheritance logic
for executions as well
                         ReportPlugin plugin = new ReportPlugin();
+                        plugin.setLocation( "", element.getLocation( "" ) );
                         plugin.setGroupId( null );
                         mergeReportPlugin( plugin, element, sourceDominant, context );
 

Modified: maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java?rev=1072163&r1=1072162&r2=1072163&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
(original)
+++ maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
Fri Feb 18 21:47:54 2011
@@ -120,12 +120,13 @@ public class MavenModelMerger
                                             Map<Object, Object> context )
     {
         Organization src = source.getOrganization();
-        if ( source.getOrganization() != null )
+        if ( src != null )
         {
             Organization tgt = target.getOrganization();
             if ( tgt == null )
             {
                 tgt = new Organization();
+                tgt.setLocation( "", src.getLocation( "" ) );
                 target.setOrganization( tgt );
                 mergeOrganization( tgt, src, sourceDominant, context );
             }
@@ -137,12 +138,13 @@ public class MavenModelMerger
                                                Map<Object, Object> context )
     {
         IssueManagement src = source.getIssueManagement();
-        if ( source.getIssueManagement() != null )
+        if ( src != null )
         {
             IssueManagement tgt = target.getIssueManagement();
             if ( tgt == null )
             {
                 tgt = new IssueManagement();
+                tgt.setLocation( "", src.getLocation( "" ) );
                 target.setIssueManagement( tgt );
                 mergeIssueManagement( tgt, src, sourceDominant, context );
             }
@@ -154,12 +156,13 @@ public class MavenModelMerger
                                             Map<Object, Object> context )
     {
         CiManagement src = source.getCiManagement();
-        if ( source.getCiManagement() != null )
+        if ( src != null )
         {
             CiManagement tgt = target.getCiManagement();
             if ( tgt == null )
             {
                 tgt = new CiManagement();
+                tgt.setLocation( "", src.getLocation( "" ) );
                 target.setCiManagement( tgt );
                 mergeCiManagement( tgt, src, sourceDominant, context );
             }
@@ -367,6 +370,7 @@ public class MavenModelMerger
             if ( sourceDominant || tgt == null )
             {
                 tgt = new DeploymentRepository();
+                tgt.setLocation( "", src.getLocation( "" ) );
                 target.setRepository( tgt );
                 mergeDeploymentRepository( tgt, src, sourceDominant, context );
             }
@@ -386,6 +390,7 @@ public class MavenModelMerger
             if ( sourceDominant || tgt == null )
             {
                 tgt = new DeploymentRepository();
+                tgt.setLocation( "", src.getLocation( "" ) );
                 target.setSnapshotRepository( tgt );
                 mergeDeploymentRepository( tgt, src, sourceDominant, context );
             }
@@ -403,6 +408,7 @@ public class MavenModelMerger
             if ( sourceDominant || tgt == null )
             {
                 tgt = new Site();
+                tgt.setLocation( "", src.getLocation( "" ) );
                 target.setSite( tgt );
                 mergeSite( tgt, src, sourceDominant, context );
             }

Modified: maven/maven-3/trunk/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java?rev=1072163&r1=1072162&r2=1072163&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
(original)
+++ maven/maven-3/trunk/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
Fri Feb 18 21:47:54 2011
@@ -155,7 +155,7 @@ public class ModelMerger
     protected void mergeModel_Parent( Model target, Model source, boolean sourceDominant,
Map<Object, Object> context )
     {
         Parent src = source.getParent();
-        if ( source.getParent() != null )
+        if ( src != null )
         {
             Parent tgt = target.getParent();
             if ( tgt == null )
@@ -281,7 +281,7 @@ public class ModelMerger
                                             Map<Object, Object> context )
     {
         Organization src = source.getOrganization();
-        if ( source.getOrganization() != null )
+        if ( src != null )
         {
             Organization tgt = target.getOrganization();
             if ( tgt == null )
@@ -409,7 +409,7 @@ public class ModelMerger
                                                Map<Object, Object> context )
     {
         IssueManagement src = source.getIssueManagement();
-        if ( source.getIssueManagement() != null )
+        if ( src != null )
         {
             IssueManagement tgt = target.getIssueManagement();
             if ( tgt == null )
@@ -424,7 +424,7 @@ public class ModelMerger
     protected void mergeModel_Scm( Model target, Model source, boolean sourceDominant, Map<Object,
Object> context )
     {
         Scm src = source.getScm();
-        if ( source.getScm() != null )
+        if ( src != null )
         {
             Scm tgt = target.getScm();
             if ( tgt == null )
@@ -440,7 +440,7 @@ public class ModelMerger
                                             Map<Object, Object> context )
     {
         CiManagement src = source.getCiManagement();
-        if ( source.getCiManagement() != null )
+        if ( src != null )
         {
             CiManagement tgt = target.getCiManagement();
             if ( tgt == null )
@@ -456,7 +456,7 @@ public class ModelMerger
                                              Map<Object, Object> context )
     {
         Prerequisites src = source.getPrerequisites();
-        if ( source.getPrerequisites() != null )
+        if ( src != null )
         {
             Prerequisites tgt = target.getPrerequisites();
             if ( tgt == null )
@@ -471,7 +471,7 @@ public class ModelMerger
     protected void mergeModel_Build( Model target, Model source, boolean sourceDominant,
Map<Object, Object> context )
     {
         Build src = source.getBuild();
-        if ( source.getBuild() != null )
+        if ( src != null )
         {
             Build tgt = target.getBuild();
             if ( tgt == null )
@@ -626,7 +626,7 @@ public class ModelMerger
                                                           Map<Object, Object> context
)
     {
         DistributionManagement src = source.getDistributionManagement();
-        if ( source.getDistributionManagement() != null )
+        if ( src != null )
         {
             DistributionManagement tgt = target.getDistributionManagement();
             if ( tgt == null )
@@ -642,7 +642,7 @@ public class ModelMerger
                                              Map<Object, Object> context )
     {
         Reporting src = source.getReporting();
-        if ( source.getReporting() != null )
+        if ( src != null )
         {
             Reporting tgt = target.getReporting();
             if ( tgt == null )
@@ -658,7 +658,7 @@ public class ModelMerger
                                                         Map<Object, Object> context
)
     {
         DependencyManagement src = source.getDependencyManagement();
-        if ( source.getDependencyManagement() != null )
+        if ( src != null )
         {
             DependencyManagement tgt = target.getDependencyManagement();
             if ( tgt == null )
@@ -2440,7 +2440,7 @@ public class ModelMerger
                                                               boolean sourceDominant, Map<Object,
Object> context )
     {
         PluginManagement src = source.getPluginManagement();
-        if ( source.getPluginManagement() != null )
+        if ( src != null )
         {
             PluginManagement tgt = target.getPluginManagement();
             if ( tgt == null )



Mime
View raw message