summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile52
-rw-r--r--README2
-rw-r--r--conf_apache-svn_map.txt16
-rw-r--r--conf_maven-svn_map.txt13
-rw-r--r--makefiles/mvn-simple.mk86
-rw-r--r--makefiles/plexus-containers.mk5
l---------makefiles/plexus-interpolation.mk1
l---------makefiles/plexus-utils.mk1
-rw-r--r--makefiles/plexus.mk61
-rw-r--r--makefiles/xbean-reflect.mk2
-rw-r--r--patches/xbean-reflect/no-log4j.patch53
11 files changed, 194 insertions, 98 deletions
diff --git a/Makefile b/Makefile
index de8a449..0c8aa04 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,11 @@
top := $(shell pwd)
export maven_dist_top := $(top)
+export makefiles := $(top)/makefiles
mvn_ver = $(shell cat conf_apache-maven_version.txt)
-MAVEN_LOCAL_REPO = $(shell cat conf_maven.local.repo.txt)
-export MAVEN_LOCAL_REPO
+MAVEN_LOCAL_REPO_INSTALL = $(shell cat conf_maven.local.repo.txt)
+MAVEN_LOCAL_REPO_SEARCH = $(top)/packages/dest/$(MAVEN_LOCAL_REPO_INSTALL)
+export MAVEN_LOCAL_REPO_INSTALL MAVEN_LOCAL_REPO_SEARCH
all: extract gen_version-maven-svn.txt
@@ -41,6 +43,7 @@ extract: \
package: \
packages/plexus-utils \
packages/plexus-interpolation \
+ packages/plexus-classworlds \
packages/plexus-containers \
token_%:
@@ -61,34 +64,31 @@ build/maven: upstream/apache-maven-${mvn_ver}
rm -rf $@
mkdir -p $@
lndir -silent "${top}/$<" "${top}/$@"
+####
-# maven-svn ####################################################################
-
-upstream/maven-svn: conf_maven-svn_map.txt token_network
+upstream/apache-svn: conf_apache-svn_map.txt token_network
if ! [[ -d "$@/.svn" ]]; then \
mkdir -p ${@D} && \
- svn checkout --depth=empty https://svn.apache.org/repos/asf/maven "$@"; \
+ svn checkout --depth=empty https://svn.apache.org/repos/asf "$@"; \
else \
cd "$@" && svn update; \
fi
cd "$@" && \
- while read svnpath localpath; do \
+ while read svnpath buildpath; do \
svn update --parents "$$svnpath"; \
done <"${top}/$<"
touch $@
-gen_version-maven-svn.txt: upstream/maven-svn conf_maven-svn_map.txt
- while read svnpath localpath; do \
- cd "${top}/$</$${svnpath}" && \
- LC_ALL=C svn log -l 1 .|sed -n 2p; \
- done <"${top}/conf_maven-svn_map.txt" | \
- cut -d'|' -f3 | date --file=- --utc --iso-8601 | sort | sed -n '$$p' > "${top}/$@"
-build/maven-extras: upstream/maven-svn conf_maven-svn_map.txt
+
+$(addprefix build/,$(shell awk '{ print $$2 }' < conf_apache-svn_map.txt)): \
+build/%: upstream/apache-svn conf_apache-svn_map.txt
rm -rf $@
mkdir -p $@
- while read svnpath localpath; do \
- mkdir -p "${top}/$@/$${localpath}" && \
- lndir -silent "${top}/$</$${svnpath}" "${top}/$@/$${localpath}"; \
- done <conf_maven-svn_map.txt
+ lndir -silent "${top}/$</$(shell sed -n 's|\s*\s$(subst .,\.,$*)$$||p' conf_apache-svn_map.txt)" "${top}/$@"
+ if [ -d patches/$* ]; then \
+ for patch in patches/$*/*; do \
+ patch -Np1 -i $$patch $@; \
+ done \
+ fi
# git wildcard #################################################################
@@ -99,11 +99,21 @@ build/%: upstream/%-git
rm -rf $@
mkdir -p $@
lndir -silent "${top}/$<" "${top}/$@"
+ if [ -d patches/$* ]; then \
+ for patch in patches/$*/*; do \
+ patch -Np1 -i $$patch $@ \
+ done \
+ fi
################################################################################
-packages/%: build/% makefiles/%.mk
- $(MAKE) -C build/$* -f $(top)/makefiles/$*.mk install DESTDIR="$(top)/$@"
+$(patsubst makefiles/%.mk,packages/%,$(wildcard makefiles/*.mk)): \
+packages/%: RECURSIVE build/% makefiles/%.mk
+ $(MAKE) -C build/$* -f "$(top)/makefiles/$*.mk" install DESTDIR="$(top)/$@"
+ mkdir -p packages/dest && lndir -silent "$(top)/$@" packages/dest
+
+packages/%: RECURSIVE build/% makefiles/mvn-simple.mk
+ $(MAKE) -C build/$* -f "$(top)/makefiles/mvn-simple.mk" install DESTDIR="$(top)/$@"
mkdir -p packages/dest && lndir -silent "$(top)/$@" packages/dest
packages/plexus-containers: packages/plexus-utils packages/plexus-classworlds
@@ -111,3 +121,5 @@ packages/plexus-containers: packages/plexus-utils packages/plexus-classworlds
distclean:
rm -rf upstream build packatges
rm -f token_* gen_*
+
+.PHONY: RECURSIVE
diff --git a/README b/README
index ef0d868..76be769 100644
--- a/README
+++ b/README
@@ -1,4 +1,6 @@
dependencies:
junit
+ asm-2
asm-3
ant
+ commons-logging
diff --git a/conf_apache-svn_map.txt b/conf_apache-svn_map.txt
new file mode 100644
index 0000000..32d29eb
--- /dev/null
+++ b/conf_apache-svn_map.txt
@@ -0,0 +1,16 @@
+maven/enforcer/tags/enforcer-1.3 maven-extras/enforcer
+maven/plugin-tools/tags/maven-plugin-tools-3.2 maven-extras/plugin-tools
+maven/plugins/tags/maven-clean-plugin-2.5 maven-extras/plugins/maven-clean-plugin
+maven/plugins/tags/maven-compiler-plugin-3.1 maven-extras/plugins/maven-compiler-plugin
+maven/plugins/tags/maven-deploy-plugin-2.8.1 maven-extras/plugins/maven-deploy-plugin
+maven/plugins/tags/maven-install-plugin-2.5.1 maven-extras/plugins/maven-install-plugin
+maven/plugins/tags/maven-plugins-24 maven-extras/plugins/maven-plugins
+maven/plugins/tags/maven-remote-resources-plugin-1.5 maven-extras/plugins/maven-remote-resources-plugin
+maven/plugins/tags/maven-resources-plugin-2.6 maven-extras/plugins/maven-resources-plugin
+maven/plugins/tags/maven-site-plugin-3.3 maven-extras/plugins/maven-site-plugin
+maven/plugins/tags/maven-verifier-plugin-1.0 maven-extras/plugins/maven-verifier-plugin
+maven/pom/tags/apache-13 maven-extras/pom/asf
+maven/pom/tags/maven-parent-23 maven-extras/pom/maven
+geronimo/xbean/tags/xbean-3.18 xbean
+geronimo/xbean/tags/xbean-3.18/xbean-reflect xbean-reflect-latest
+geronimo/xbean/tags/xbean-3.4/xbean-reflect xbean-reflect
diff --git a/conf_maven-svn_map.txt b/conf_maven-svn_map.txt
deleted file mode 100644
index 8e8ccee..0000000
--- a/conf_maven-svn_map.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-enforcer/tags/enforcer-1.3 enforcer
-plugin-tools/tags/maven-plugin-tools-3.2 plugin-tools
-plugins/tags/maven-clean-plugin-2.5 plugins/maven-clean-plugin
-plugins/tags/maven-compiler-plugin-3.1 plugins/maven-compiler-plugin
-plugins/tags/maven-deploy-plugin-2.8.1 plugins/maven-deploy-plugin
-plugins/tags/maven-install-plugin-2.5.1 plugins/maven-install-plugin
-plugins/tags/maven-plugins-24 plugins/maven-plugins
-plugins/tags/maven-remote-resources-plugin-1.5 plugins/maven-remote-resources-plugin
-plugins/tags/maven-resources-plugin-2.6 plugins/maven-resources-plugin
-plugins/tags/maven-site-plugin-3.3 plugins/maven-site-plugin
-plugins/tags/maven-verifier-plugin-1.0 plugins/maven-verifier-plugin
-pom/tags/apache-13 pom/asf
-pom/tags/maven-parent-23 pom/maven
diff --git a/makefiles/mvn-simple.mk b/makefiles/mvn-simple.mk
new file mode 100644
index 0000000..54bea0e
--- /dev/null
+++ b/makefiles/mvn-simple.mk
@@ -0,0 +1,86 @@
+#!/usr/bin/make -f
+
+# Install paths
+DESTDIR ?=
+MAVEN_LOCAL_REPO_INSTALL ?= ~/.m2
+MAVEN_LOCAL_REPO_SEARCH ?= ~/.m2
+
+# Utilities
+XMLSTARLET = xml
+FIND = find
+JAVAC = javac
+INSTALL = install
+MKDIRS = mkdir -p
+RM = rm -f
+JAR = jar
+
+# Detect information from POMs
+artifact := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:artifactId pom.xml)
+version := $(firstword $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:version -n -c /_:project/_:parent/_:version pom.xml) $(version))
+group := $(firstword $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:groupId -n -c /_:project/_:parent/_:groupId pom.xml))
+dirs := $(patsubst %/pom.xml,%,$(wildcard */pom.xml))
+targets := pom $(if $(wildcard src/main/),jar)
+
+####
+
+export CLASSPATH := $(shell $(FIND) $(MAVEN_LOCAL_REPO_SEARCH) -name '*.jar' -printf '%h/%f:'):$(JAVA_HOME)/lib/tools.jar$(if $(CLASSPATH),:$(CLASSPATH))
+$(info CLASSPATH = $(CLASSPATH))
+# all
+
+all: PHONY \
+ $(addprefix target/$(artifact)-$(version).,$(targets)) \
+ $(addsuffix /all,$(dirs))
+
+target/$(artifact)-$(version).pom: pom.xml
+ $(INSTALL) -Dm644 $< $@
+
+target/$(artifact)-$(version).jar: \
+ target/META-INF/maven/$(group)/$(artifact)/pom.properties \
+ target/META-INF/maven/$(group)/$(artifact)/pom.xml \
+ target/classes \
+ src/main
+ $(MKDIRS) $(@D)
+ $(JAR) -cf $@ \
+ -C target/classes org \
+ -C target META-INF \
+ $([ ! -d src/main/resources ] || { cd src/main/resources && printf ' -C src/main/resources %q ' *; })
+
+target/META-INF/maven/$(group)/$(artifact)/pom.xml: pom.xml
+ install -Dm644 $< $@
+
+target/META-INF/maven/$(group)/$(artifact)/pom.properties: pom.xml
+ $(MKDIRS) $(@D)
+ printf '%s\n' \
+ '#Generated by Make' \
+ "#$$(LC_ALL=C date)" \
+ 'version=$(version)' \
+ 'groupId=$(group)' \
+ 'artifactId=$(artifact)' \
+ > $@
+
+target/classes: src/main/java FORCE
+ $(MKDIRS) $@
+ $(FIND) $< -name '*.java' -exec $(JAVAC) -d $@ {} +
+
+# install
+
+install: PHONY \
+ $(addprefix $(DESTDIR)$(MAVEN_LOCAL_REPO_INSTALL)/$(subst .,/,$(group))/$(artifact)/$(version)/$(artifact)-$(version).,$(targets)) \
+ $(addsuffix /install,$(dirs))
+
+$(DESTDIR)$(MAVEN_LOCAL_REPO_INSTALL)/$(subst .,/,$(group))/$(artifact)/$(version)/%: target/%
+ $(INSTALL) -Dm644 $< $@
+
+# clean
+
+clean: PHONY $(addsuffix /clean,$(dirs))
+ rm -rf target
+
+# recurse
+
+$(addsuffix /%,$(dirs)): PHONY
+ version='$(version)' $(MAKE) -C $(@D) -f '$(abspath $(firstword $(MAKEFILE_LIST)))'
+
+# boilerplate
+
+.PHONY: PHONY FORCE
diff --git a/makefiles/plexus-containers.mk b/makefiles/plexus-containers.mk
index c826329..46defda 100644
--- a/makefiles/plexus-containers.mk
+++ b/makefiles/plexus-containers.mk
@@ -22,7 +22,8 @@ all: PHONY \
$(addsuffix /all,$(dirs))
target/$(artifact)-$(version).pom: pom.xml
- install -Dm644 $< $@
+ mkdir -p $@
+ sed -r '/<properties>/,/<\/properties>/ { s|<(.*Version)>(.*)</.*Version>|<\1>[\2,)</\1>|; }' < $< > $@
####
@@ -36,7 +37,7 @@ $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(group))/$(artifact)/$(version)/%: ta
####
$(addsuffix /%,$(dirs)): PHONY
- $(MAKE) -C $(@D) -f $(maven_dist_top)/makefiles/plexus.mk version=$(version) JAVAC_FLAGS=$(JAVAC_FLAGS)
+ $(MAKE) -C $(@D) -f $(maven_dist_top)/makefiles/plexus.mk version=$(version) JAVAC_FLAGS='$(JAVAC_FLAGS)'
####
diff --git a/makefiles/plexus-interpolation.mk b/makefiles/plexus-interpolation.mk
deleted file mode 120000
index f58c0b5..0000000
--- a/makefiles/plexus-interpolation.mk
+++ /dev/null
@@ -1 +0,0 @@
-plexus.mk \ No newline at end of file
diff --git a/makefiles/plexus-utils.mk b/makefiles/plexus-utils.mk
deleted file mode 120000
index f58c0b5..0000000
--- a/makefiles/plexus-utils.mk
+++ /dev/null
@@ -1 +0,0 @@
-plexus.mk \ No newline at end of file
diff --git a/makefiles/plexus.mk b/makefiles/plexus.mk
deleted file mode 100644
index 16f0f37..0000000
--- a/makefiles/plexus.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-DESTDIR ?=
-MAVEN_LOCAL_REPO ?= ~/.m2
-
-version=$(shell xml sel -T -t -c /_:project/_:version pom.xml)
-artifact=$(shell xml sel -T -t -c /_:project/_:artifactId pom.xml)
-group=org.codehaus.plexus
-
-####
-
-all: PHONY \
- target/$(artifact)-$(version).pom \
- target/$(artifact)-$(version).jar
-
-target/$(artifact)-$(version).pom: pom.xml
- install -Dm644 $< $@
-
-target/$(artifact)-$(version).jar: \
- target/META-INF/maven/$(group)/$(artifact)/pom.properties \
- target/META-INF/maven/$(group)/$(artifact)/pom.xml \
- target/classes \
- src/main
- mkdir -p $(@D)
- jar -cf $@ \
- -C target/classes org \
- -C target META-INF \
- $([[ ! -d src/main/resources ]] || { cd src/main/resources && printf ' -C src/main/resources %q ' *; })
-
-target/META-INF/maven/$(group)/$(artifact)/pom.xml: pom.xml
- install -Dm644 $< $@
-
-target/META-INF/maven/$(group)/$(artifact)/pom.properties: pom.xml
- mkdir -p $(@D)
- printf '%s\n' \
- '#Generated by Make' \
- "#$$(LC_ALL=C date)" \
- 'version=$(version)' \
- 'groupId=$(group)' \
- 'artifactId=$(artifact)' \
- > $@
-
-target/classes: src/main/java FORCE
- mkdir -p $@
- find $< -name '*.java' -exec javac $(JAVAC_FLAGS) -d $@ {} +
-
-####
-
-install: PHONY \
- $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(group))/$(artifact)/$(version)/$(artifact)-$(version).pom \
- $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(group))/$(artifact)/$(version)/$(artifact)-$(version).jar
-
-$(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(group))/$(artifact)/$(version)/%: target/%
- install -Dm644 $< $@
-
-####
-
-clean: PHONY
- rm -rf target
-
-####
-
-.PHONY: PHONY FORCE
diff --git a/makefiles/xbean-reflect.mk b/makefiles/xbean-reflect.mk
new file mode 100644
index 0000000..2a16169
--- /dev/null
+++ b/makefiles/xbean-reflect.mk
@@ -0,0 +1,2 @@
+CLASSPATH=/usr/share/java/commons-logging/commons-logging.jar:/usr/share/java/asm-all-2.jar
+include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/mvn-simple.mk
diff --git a/patches/xbean-reflect/no-log4j.patch b/patches/xbean-reflect/no-log4j.patch
new file mode 100644
index 0000000..b30612a
--- /dev/null
+++ b/patches/xbean-reflect/no-log4j.patch
@@ -0,0 +1,53 @@
+Index: xbean-3.4/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/Log4jConverter.java
+===================================================================
+--- xbean-3.4/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/Log4jConverter.java (revision 1598187)
++++ xbean-3.4/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/Log4jConverter.java (working copy)
+@@ -1,32 +0,0 @@
+-/**
+- * Licensed to the Apache Software Foundation (ASF) under one or more
+- * contributor license agreements. See the NOTICE file distributed with
+- * this work for additional information regarding copyright ownership.
+- * The ASF licenses this file to You under the Apache License, Version 2.0
+- * (the "License"); you may not use this file except in compliance with
+- * the License. You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-package org.apache.xbean.propertyeditor;
+-
+-import org.apache.log4j.Logger;
+-
+-/**
+- * @version $Rev$ $Date$
+- */
+-public class Log4jConverter extends AbstractConverter {
+- public Log4jConverter() {
+- super(Logger.class);
+- }
+-
+- protected Object toObjectImpl(String text) {
+- return Logger.getLogger(text);
+- }
+-}
+Index: xbean-3.4/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java
+===================================================================
+--- xbean-3.4/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java (revision 1598187)
++++ xbean-3.4/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java (working copy)
+@@ -120,11 +120,6 @@
+ registerConverter(new WeakHashMapEditor());
+
+ try {
+- registerConverter(new Log4jConverter());
+- } catch (Throwable e) {
+- }
+-
+- try {
+ registerConverter(new CommonsLoggingConverter());
+ } catch (Throwable e) {
+ }