[jruby] 01/01: wip: Attempt to use maven3

Miguel Landaeta nomadium at moszumanska.debian.org
Fri Feb 27 15:45:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

nomadium pushed a commit to branch next-miguel
in repository jruby.

commit 466a5174b89fe1afdd3d34ee6c53fbe41ed3ac27
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Fri Feb 27 12:44:06 2015 -0300

    wip: Attempt to use maven3
---
 debian/m2.conf                                     |  7 +++++
 .../0007-add-missing-versions-to-pom-file.patch    | 34 +++++++++++++++++++--
 debian/rules                                       | 35 ++++++++++++++++++++++
 3 files changed, 73 insertions(+), 3 deletions(-)

diff --git a/debian/m2.conf b/debian/m2.conf
new file mode 100644
index 0000000..a107568
--- /dev/null
+++ b/debian/m2.conf
@@ -0,0 +1,7 @@
+main is org.apache.maven.cli.MavenCli from plexus.core
+
+set maven.home default /usr/share/maven
+
+[plexus.core]
+optionally ${maven.home}/lib/ext/*.jar
+load       ${maven.home}/lib/*.jar
diff --git a/debian/patches/0007-add-missing-versions-to-pom-file.patch b/debian/patches/0007-add-missing-versions-to-pom-file.patch
index e65bf10..f049868 100644
--- a/debian/patches/0007-add-missing-versions-to-pom-file.patch
+++ b/debian/patches/0007-add-missing-versions-to-pom-file.patch
@@ -2,7 +2,7 @@ Description: Add missing version to core POM file
  Otherwise maven fails with an error due to invalid POM file
 Author: Miguel Landaeta <nomadium at debian.org>
 Forwarded: no
-Last-Update: 2015-02-23
+Last-Update: 2015-02-27
 
 --- jruby-1.7.19.orig/core/pom.xml
 +++ jruby-1.7.19/core/pom.xml
@@ -14,7 +14,23 @@ Last-Update: 2015-02-23
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
-@@ -426,6 +427,7 @@
+@@ -316,6 +317,7 @@
+       </plugin>
+       <plugin>
+         <artifactId>maven-compiler-plugin</artifactId>
++        <version>2.5.1</version>
+         <configuration>
+           <encoding>utf-8</encoding>
+           <debug>true</debug>
+@@ -402,6 +404,7 @@
+       </plugin>
+       <plugin>
+         <artifactId>maven-clean-plugin</artifactId>
++        <version>2.5</version>
+         <executions>
+           <execution>
+             <id>default-clean</id>
+@@ -426,9 +429,11 @@
         <plugin>
  	 <groupId>org.apache.felix</groupId>
  	 <artifactId>maven-bundle-plugin</artifactId>
@@ -22,7 +38,11 @@ Last-Update: 2015-02-23
        </plugin>
        <plugin>
  	<artifactId>maven-jar-plugin</artifactId>
-@@ -446,6 +448,7 @@
++	<version>2.4</version>
+         <executions>
+           <execution>
+             <id>default-jar</id>
+@@ -446,6 +451,7 @@
        </plugin>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
@@ -30,3 +50,11 @@ Last-Update: 2015-02-23
          <executions>
            <execution>
              <id>pack jruby.jar</id>
+@@ -472,6 +478,7 @@
+       </plugin>
+       <plugin>
+         <artifactId>maven-surefire-plugin</artifactId>
++        <version>2.10</version>
+         <configuration>
+           <forkCount>1C</forkCount>
+           <reuseForks>false</reuseForks>
diff --git a/debian/rules b/debian/rules
index 8c50eda..3a3ef08 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,38 @@ include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/maven.mk
 
 JAVA_HOME := /usr/lib/jvm/default-java
+MAVEN_HOME = /usr/share/maven
+#MAVEN_CLASSCONF = /etc/maven/m2.conf
+#MAVEN_CLASSCONF = $(CURDIR)/debian/m2.conf
+#DEB_MAVEN_ARGS := -e --debug
+DEB_CLASSPATH = $(MAVEN_HOME)/boot/plexus-classworlds-2.x.jar
+DEB_MAVEN_INVOKE = cd $(DEB_BUILDDIR) && $(JAVACMD) -classpath $(DEB_CLASSPATH) \
+		 $(JAVA_OPTS) -Dclassworlds.conf=$(CURDIR)/debian/m2.conf \
+		 org.codehaus.plexus.classworlds.launcher.Launcher \
+		 -s/etc/maven2/settings-debian.xml \
+		 -Dmaven.repo.local=$(DEB_MAVEN_REPO) \
+		 $(if $(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS))
+
+# I suspect I'm going to need to update maven-compiler-plugin
+
+maven-sanity-check:
+	@if ! test -x "$(JAVACMD)"; then \
+		echo "You must specify a valid JAVA_HOME or JAVACMD!"; \
+		exit 1; \
+	fi
+	@if ! test -r "$(MAVEN_HOME)/boot/plexus-classworlds-2.x.jar"; then \
+		echo "You must specify a valid MAVEN_HOME directory!"; \
+		exit 1; \
+	fi
+
+#		 $(JAVA_OPTS) -Dclassworlds.conf=$(MAVEN_CLASSCONF) \
+# debian maven 2
+#cd . && /usr/lib/jvm/default-java/bin/java -noverify -cp /usr/share/maven2/boot/classworlds.jar:/usr/lib/jvm/default-java/lib/tools.jar -Dproperties.file.manual=/home/miguel/packages/jruby/resume/jruby-1.7.19/debian/maven.properties -Dclassworlds.conf=/etc/maven2/m2-debian-nodocs.conf org.codehaus.classworlds.Launcher -s/etc/maven2/settings-debian.xml -Dmaven.repo.local=/home/miguel/packages/jruby/resume/jruby-1.7.19/debian/maven-repo  package
+
+# maven3 pure
+#/usr/lib/jvm/java-7-openjdk-amd64/bin/java -classpath /usr/share/maven/boot/plexus-classworlds-2.x.jar -Dclassworlds.conf=/usr/share/maven/bin/m2.conf -Dmaven.home=/usr/share/maven org.codehaus.plexus.classworlds.launcher.Launcher --debug -e -Pdist
+
+# maven-3.0.5/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
 
 #%:
 #	dh $@
@@ -11,6 +43,9 @@ JAVA_HOME := /usr/lib/jvm/default-java
 #override_dh_auto_build:
 #	true
 #
+#override_dh_auto_clean:
+#	true
+
 ## very hackish: this rules file has to be rewritten
 #
 #override_dh_auto_build:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby.git



More information about the pkg-java-commits mailing list