summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-11-16 19:42:17 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-11-16 19:42:17 -0500
commit8b594b64a0b49bf442474d0ff1685c623cfee8ff (patch)
treef561a659c91a501cc2d2efb16036b37166f1a569
parent9419c891aca0d658e0bc2181a298f8d941c53cdc (diff)
update rules/Maven
-rw-r--r--rules/maven/Makefile72
-rw-r--r--rules/maven/delete.list1
2 files changed, 51 insertions, 22 deletions
diff --git a/rules/maven/Makefile b/rules/maven/Makefile
index c22a50a..644251a 100644
--- a/rules/maven/Makefile
+++ b/rules/maven/Makefile
@@ -1,30 +1,58 @@
-ANT = ant
-FIND = find
+DESTDIR ?=
-MODELLO_CLASSPATH := $(shell modello-classpath)
-export MODELLO_CLASSPATH
-PMDG_CLASSPATH := $(shell plexus-metadata-generator-classpath)
-export PMDG_CLASSPATH
+ANT = ant
+EXISTS = test -e
+FAIL = exit 1
+FIND = find
+RM = rm -f
+XMLSTARLET = xml
-%:
- # $@
- bash -i
- false
+export MODELLO_CLASSPATH := $(shell modello-classpath)
+export PMDG_CLASSPATH := $(shell plexus-metadata-generator-classpath)
+export M2_HOME = $(DESTDIR)/opt/maven
-export M2_HOME=$(DESTDIR)/opt/maven
-
-dep_dir = $1 $(shell $(FIND) $1 2>/dev/null)
+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=true generate-sources
+pom_get = $(shell $(XMLSTARLET) sel -T -t $(foreach xpath,$1, -v '$(subst /,/_:,$(xpath))' -n) pom.xml)
+
+version := $(call pom_get,/project/version)
+maven_assembly = apache-maven/target/apache-maven-$(version)-bin.zip
+
+install: PHONY
+ $(ANT) -Dskip.pull=true extract-assembly || { $(RM) -r bootstrap/target; $(FAIL); }
+ $(EXISTS) '$@'
+ $(TOUCH) '$@'
+
+####
+
+# install: extract-assembly
+# all: apache-maven/target/apache-maven-$(version)-bin.zip
+
+# bootstrap/target/generated-sources: $(call dep_dir,$(wildcard */src/main/mdo))
+# $(ANT) -Dskip.pull=true generate-sources || { $(RM) -r '$@'; $(FAIL); }
+# $(TOUCH) '$@'
+
+# bootstrap/target/classes: $(call dep_dir,bootstrap/target/generated-sources $(wildcard */src/main/java))
+# $(ANT) -Dskip.pull=true compile-boot || { $(RM) -r '$@'; $(FAIL); }
+# $(TOUCH) '$@'
+
+# 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
+# $(EXISTS) '$@'
+# $(TOUCH) '$@'
-bootstrap/target/classes: $(call dep_dir,bootstrap/target/generated-sources $(wildcard */src/main/java))
- $(ANT) -Dskip.pull=true compile-boot
+# modules = $(call pom_get,/project/modules/module)
+# apache-maven/target/apache-maven-$(version)-bin.zip: \
+# bootstrap/target/classes/META-INF/plexus/components.xml \
+# $(foreach module,. $(modules),$(module)/pom.xml $(call dep_dir,$(module)/src))
+# $(ANT) -Dskip.pull=true maven-assembly
+# $(EXISTS) '$@'
+# $(TOUCH) '$@'
-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
+.PHONY: PHONY
.SECONDARY:
+.DELETE_ON_ERROR:
diff --git a/rules/maven/delete.list b/rules/maven/delete.list
new file mode 100644
index 0000000..5110595
--- /dev/null
+++ b/rules/maven/delete.list
@@ -0,0 +1 @@
+maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/LogbackConfiguration.java