You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/04/28 17:42:51 UTC
[maven] branch master updated (1e03388 -> 5350ed8)
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git.
from 1e03388 [MNG-6632] - Remember artifact handlers after they've been used once
new 869b615 [MNG-6636] merge reports location tracking
new 5350ed8 [MNG-6644] don't fail if no input location tracking available
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../maven/model/plugin/DefaultReportingConverter.java | 2 +-
.../java/org/apache/maven/model/merge/ModelMerger.java | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
[maven] 02/02: [MNG-6644] don't fail if no input location tracking
available
Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 5350ed8a1f5bea4dd064ffe3a2027c8b90790077
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Fri Apr 26 03:17:00 2019 +0200
[MNG-6644] don't fail if no input location tracking available
this can happen when the POM is not parsed by Maven core from XML
---
.../java/org/apache/maven/model/plugin/DefaultReportingConverter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
index 683f494..a3c17ad 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
@@ -240,7 +240,7 @@ public class DefaultReportingConverter
int n = 0;
for ( String report : reportSet.getReports() )
{
- addDom( reports, "report", report, location.getLocation( n++ ) );
+ addDom( reports, "report", report, ( location == null ) ? null : location.getLocation( n++ ) );
}
dom.addChild( reports );
}
[maven] 01/02: [MNG-6636] merge reports location tracking
Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 869b615189fd05eb1216a66178eb22b72ea0b4d3
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Fri Apr 26 03:12:43 2019 +0200
[MNG-6636] merge reports location tracking
- avoids NPE during DefaultReportingConverter work
- fixes missing location tracking when parent values injected into
existing child values
---
.../java/org/apache/maven/model/merge/ModelMerger.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java b/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
index 5848f59..8b4e0cd 100644
--- a/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
+++ b/maven-model/src/main/java/org/apache/maven/model/merge/ModelMerger.java
@@ -1475,6 +1475,24 @@ public class ModelMerger
merged.addAll( tgt );
merged.addAll( src );
target.setReports( merged );
+
+ InputLocation sourceLocation = source.getLocation( "reports" );
+ if ( sourceLocation != null )
+ {
+ InputLocation targetLocation = target.getLocation( "reports" );
+ if ( targetLocation == null )
+ {
+ target.setLocation( "reports", sourceLocation );
+ }
+ else
+ {
+ for ( int i = 0; i < src.size(); i++ )
+ {
+ targetLocation.setLocation( Integer.valueOf( tgt.size() + i ),
+ sourceLocation.getLocation( Integer.valueOf( i ) ) );
+ }
+ }
+ }
}
}