[netty] 04/07: Adapted codegen.groovy to run without the groovy-maven-plugin
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 16 08:18:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository netty.
commit 798abf7b8b82ae79fb6e8a005f8a2ee7c2f1241c
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Mon Jan 16 09:07:32 2017 +0100
Adapted codegen.groovy to run without the groovy-maven-plugin
---
debian/changelog | 3 +-
debian/control | 1 +
debian/maven.ignoreRules | 1 +
.../patches/08-codegen-without-groovy-plugin.patch | 32 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 8 ++++++
6 files changed, 45 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index f6bec26..32e57fc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,7 +7,8 @@ netty (1:4.1.7-1) UNRELEASED; urgency=medium
codec-mqtt, codec-redis, codec-smtp, codec-stomp, handler-proxy,
resolver-dns and resolver
- Ignore the new codec-xml module (missing dependency)
- - New dependency: libgoogle-gson-java
+ - New dependency: groovy, libgoogle-gson-java
+ - Adapted codegen.groovy to run without the groovy-maven-plugin
-- Emmanuel Bourg <ebourg at apache.org> Mon, 16 Jan 2017 02:08:28 +0100
diff --git a/debian/control b/debian/control
index 532d46a..abd55be 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@ Build-Depends: ant,
ant-contrib (>= 1.0~b3+svn177-8~),
debhelper (>= 10),
default-jdk,
+ groovy,
ivy,
libasm-java (>= 5.0),
libbuild-helper-maven-plugin-java,
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index f357525..7dc1453 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -26,6 +26,7 @@ org.apache.maven.plugins maven-jxr-plugin * * * *
org.apache.maven.plugins maven-release-plugin * * * *
org.apache.maven.plugins maven-source-plugin * * * *
org.apache.maven.plugins maven-surefire-plugin * * * *
+org.codehaus.gmaven groovy-maven-plugin * * * *
org.codehaus.mojo animal-sniffer-maven-plugin * * * *
org.codehaus.mojo xml-maven-plugin * * * *
diff --git a/debian/patches/08-codegen-without-groovy-plugin.patch b/debian/patches/08-codegen-without-groovy-plugin.patch
new file mode 100644
index 0000000..3d41320
--- /dev/null
+++ b/debian/patches/08-codegen-without-groovy-plugin.patch
@@ -0,0 +1,32 @@
+Description: Adapts codegen.groovy to run without the groovy-maven-plugin (not in Debian yet)
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/common/src/main/script/codegen.groovy
++++ b/common/src/main/script/codegen.groovy
+@@ -1,7 +1,7 @@
+-String[] templateDirs = [properties["collection.template.dir"],
+- properties["collection.template.test.dir"]]
+-String[] outputDirs = [properties["collection.src.dir"],
+- properties["collection.testsrc.dir"]]
++String[] templateDirs = [System.properties["collection.template.dir"],
++ System.properties["collection.template.test.dir"]]
++String[] outputDirs = [System.properties["collection.src.dir"],
++ System.properties["collection.testsrc.dir"]]
+
+ templateDirs.eachWithIndex { templateDir, i ->
+ convertSources templateDir, outputDirs[i]
+@@ -26,6 +26,7 @@
+ def replaceFrom = "(^.*)K([^.]+)\\.template\$"
+ def replaceTo = "\\1" + keyName + "\\2.java"
+ def hashCodeFn = keyPrimitive.equals("long") ? "(int) (key ^ (key >>> 32))" : "(int) key"
++ def ant = new AntBuilder()
+ ant.copy(todir: outputDir) {
+ fileset(dir: templateDir) {
+ include(name: "**/*.template")
+@@ -39,4 +40,4 @@
+ }
+ regexpmapper(from: replaceFrom, to: replaceTo)
+ }
+-}
+\ No newline at end of file
++}
diff --git a/debian/patches/series b/debian/patches/series
index d74c289..9617277 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
05-reproducible-versions-properties.patch
06-remove-tcnative-classifier.patch
07-netty-all-epoll-dependency.patch
+08-codegen-without-groovy-plugin.patch
diff --git a/debian/rules b/debian/rules
index a227972..c33c315 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,14 @@ export BUILD_DATE=$(shell date --date='@${SOURCE_DATE_EPOCH}' --utc +'%Y-%m-%d %
dh $@
override_dh_auto_build:
+ # Replace the missing groovy-maven-plugin
+ mkdir -p common/target
+ groovy -Dcollection.template.dir=common/src/main/templates \
+ -Dcollection.template.test.dir=common/src/test/templates \
+ -Dcollection.src.dir=common/target/generated-sources/collections/java \
+ -Dcollection.testsrc.dir=common/target/generated-test-sources/collections/java \
+ common/src/main/script/codegen.groovy
+
dh_auto_build -- package -Dbuild.date='${BUILD_DATE}'
override_dh_auto_clean:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/netty.git
More information about the pkg-java-commits
mailing list