summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-06 21:17:47 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-06 21:17:47 -0400
commiteb754e501c91cdcb29e01e50f065f73f308d3574 (patch)
tree07f484e121bf4fb3ea3dbd5b5a316ad052794092 /rules
parent294d543163dd785092f4383a4ac359d1815eba6c (diff)
Get maven closer to compiling
The blocker on on compile-boot is org.eclipse.aether, which is missing.
Diffstat (limited to 'rules')
-rw-r--r--rules/maven/Makefile13
-rw-r--r--rules/maven/fix-build-xml.patch47
-rw-r--r--rules/maven/fix-classpath.patch11
3 files changed, 58 insertions, 13 deletions
diff --git a/rules/maven/Makefile b/rules/maven/Makefile
index 2619ad8..37f546b 100644
--- a/rules/maven/Makefile
+++ b/rules/maven/Makefile
@@ -1,3 +1,6 @@
+ANT = ant
+FIND = find
+
%:
# $@
bash -i
@@ -9,7 +12,13 @@ dep_dir = $1 $(shell $(FIND) $1 2>/dev/null)
dep_optdir = $(shell $(FIND) $1 2>/dev/null)
bootstrap/target/generated-sources: $(call dep_dir,$(wildcard */src/main/mdo))
- ant -Dskip.pull generate-sources
+ $(ANT) -Dskip.pull=true generate-sources
bootstrap/target/classes: $(call dep_dir,bootstrap/target/generated-sources $(wildcard */src/main/java))
- ant -Dskip.pull compile-boot
+ $(ANT) -Dskip.pull=true compile-boot
+
+bootstrap/target/classes/META-INF/plexus/components.xml: \
+ $(call dep_dir,maven-compat/src/main/java) \
+ $(call dep_dir,maven-core/src/main/resources/META-INF/plexus) \
+ bootstrap/target/classes $(shell $(FIND) bootstrap/target/classes -name '*.class' -o -type d)
+ $(ANT) -Dskip.pull=true process-classes
diff --git a/rules/maven/fix-build-xml.patch b/rules/maven/fix-build-xml.patch
new file mode 100644
index 0000000..06e6580
--- /dev/null
+++ b/rules/maven/fix-build-xml.patch
@@ -0,0 +1,47 @@
+--- maven.orig/build.xml
++++ maven/build.xml
+@@ -39,6 +39,7 @@
+ <property name="maven-compile.jvmargs" value="-Xmx512m -Xms512m"/>
+ <property name="maven-compile.fork" value="true"/>
+ <property name="maven-compile.maxmemory" value="512m"/>
++ <property environment="env" />
+
+ <target name="initTaskDefs">
+ <echo>Building ${distributionName} ...</echo>
+@@ -48,7 +49,6 @@
+ </target>
+
+ <target name="isMavenHomeSet" depends="initTaskDefs">
+- <property environment="env" />
+ <condition property="maven.home" value="${env.M2_HOME}">
+ <isset property="env.M2_HOME" />
+ </condition>
+@@ -100,7 +100,10 @@
+ <delete dir="bootstrap" />
+ </target>
+
+- <target name="pull" depends="init" unless="skip.pull">
++ <target name="pull" depends="pull-network,pull-cached">
++ </target>
++
++ <target name="pull-network" depends="init" unless="skip.pull">
+ <!-- Pull the dependencies that Maven needs to build -->
+ <copy file="pom.xml" tofile="dependencies.xml" />
+ <replace file="${basedir}/dependencies.xml" token="&lt;!--bootstrap-start-comment--&gt;" value="&lt;!--" />
+@@ -125,10 +128,14 @@
+ <localRepository path="${maven.repo.local}" />
+ <dependency groupId="org.codehaus.plexus" artifactId="plexus-component-metadata" version="${pom.properties.plexusVersion}" />
+ </artifact:dependencies>
+-
++ </target>
++ <target name="pull-cached" depends="init" if="skip.pull">
++ <path id="pom.pathid"><pathelement path="${env.CLASSPATH}"/></path>
++ <path id="modello.pathid"><pathelement path="${env.CLASSPATH}"/></path>
++ <path id="pmdg.pathid"><pathelement path="${env.CLASSPATH}"/></path>
+ </target>
+
+- <target name="process-classes" depends="pull" description="generates plexus component metadata.">
++ <target name="process-classes" depends="compile-boot" description="generates plexus component metadata.">
+ <mkdir dir="${basedir}/bootstrap/target" />
+ <mkdir dir="${basedir}/bootstrap/target/classes" />
+
diff --git a/rules/maven/fix-classpath.patch b/rules/maven/fix-classpath.patch
deleted file mode 100644
index b40a4d1..0000000
--- a/rules/maven/fix-classpath.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ruN maven.orig/build.xml maven/build.xml
---- maven.orig/build.xml 2014-06-03 16:09:48.457817856 -0400
-+++ maven/build.xml 2014-06-03 16:41:03.871179314 -0400
-@@ -165,7 +165,6 @@
- <attribute name="version" />
- <sequential>
- <java fork="true" classname="org.codehaus.modello.ModelloCli" failonerror="true">
-- <classpath refid="modello.pathid" />
- <arg file="@{file}" />
- <!-- model file -->
- <arg value="@{mode}" />