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 2020/04/09 20:12:24 UTC
[maven-changes-plugin] branch master updated: [MCHANGES-408] also
patch Modello-generated java sources
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-changes-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new e04e199 [MCHANGES-408] also patch Modello-generated java sources
e04e199 is described below
commit e04e1991d43239265cd84f58d5b7269b1d1794a4
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Thu Apr 9 22:12:20 2020 +0200
[MCHANGES-408] also patch Modello-generated java sources
---
pom.xml | 2 +-
src/main/script/patch-changes-xsd.groovy | 22 ++++++++++++++++------
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index ff43ec4..4edc7bd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -493,7 +493,7 @@ under the License.
<executions>
<execution>
<id>patch-changes-xsd</id>
- <phase>compile</phase>
+ <phase>process-resources</phase>
<goals>
<goal>execute</goal>
</goals>
diff --git a/src/main/script/patch-changes-xsd.groovy b/src/main/script/patch-changes-xsd.groovy
index b5de9da..82cc6bb 100644
--- a/src/main/script/patch-changes-xsd.groovy
+++ b/src/main/script/patch-changes-xsd.groovy
@@ -17,10 +17,20 @@
* under the License.
*/
-dir = new File( basedir, 'target/classes/META-INF/changes/xsd' );
+def patch( String path )
+{
+ File dir = new File( basedir, path );
+ for( File f : dir.listFiles() )
+ {
+ if ( f.isFile() )
+ {
+ content = f.text;
+ content = content.replaceAll( 'on \\d+-\\d+-\\d+ \\d+:\\d+:\\d+', '' );
+ f.write( content );
+ }
+ }
+}
-file = new File( dir, 'changes-1.0.0.xsd' );
-content = file.text;
-
-content = content.replaceAll( 'on \\d+-\\d+-\\d+ \\d+:\\d+:\\d+', '' );
-file.write( content );
+patch( 'target/classes/META-INF/changes/xsd' );
+patch( 'target/generated-sources/modello/org/apache/maven/plugins/changes/model' );
+patch( 'target/generated-sources/modello/org/apache/maven/plugins/changes/model/xpp3' );