summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-05-30 15:01:41 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-05-30 15:01:41 -0400
commit4a951bd1d646789bb383370566adda876372ca21 (patch)
treeec7751c1992f5c728645b72558ab7dda68d55254
parent2bbbcb63b1aa87ead4aeffc9d276ce4ac716464a (diff)
package atinject
-rw-r--r--conf/dependencies.mk9
-rw-r--r--conf/sources.mk9
-rw-r--r--delete/atinject-javax.inject-tck.txt1
-rw-r--r--delete/atinject-javax.inject.txt1
-rw-r--r--makefiles/atinject-javax.inject-tck.mk37
-rw-r--r--makefiles/atinject-javax.inject.mk35
-rw-r--r--makefiles/jsr305.mk16
-rw-r--r--makefiles/mvn-simple.mk3
-rw-r--r--patches/atinject-javax.inject/fix-pom-xmlns.patch8
-rw-r--r--patches/plexus-cipher/no-javaee.patch16
10 files changed, 115 insertions, 20 deletions
diff --git a/conf/dependencies.mk b/conf/dependencies.mk
index 0dce992..8e92029 100644
--- a/conf/dependencies.mk
+++ b/conf/dependencies.mk
@@ -11,7 +11,8 @@ build/packages/xbean-reflect: \
build/packages/maven-plugin-api-bootstrap: \
build/packages/plexus-utils \
build/packages/plexus-container-default \
- build/packages/plexus-classworlds
+ build/packages/plexus-classworlds \
+ build/packages/atinject-javax.inject
build/packages/plexus-container-default: \
build/packages/plexus-classworlds \
@@ -20,5 +21,11 @@ build/packages/plexus-container-default: \
build/packages/guava \
/usr/share/java/junit.jar
+build/packages/plexus-cipher: \
+ build/packages/atinject-javax.inject
+
build/packages/guava: \
build/packages/jsr305
+
+build/packages/atinject-javax.inject-tck: \
+ /usr/share/java/junit.jar
diff --git a/conf/sources.mk b/conf/sources.mk
index 625a67d..15bc67b 100644
--- a/conf/sources.mk
+++ b/conf/sources.mk
@@ -30,9 +30,14 @@ plexus-interpolation = git|git://github.com/sonatype/ple
# plexus-sec-dispatcher
plexus-cipher = git|git://github.com/sonatype/plexus-cipher.git|plexus-cipher-1.7
modello = git|git://github.com/sonatype/modello.git|modello-1.8.1
+guava = git|https://code.google.com/p/guava-libraries/|v17.0/guava
-# yes, I know xbean 3.4 is old
+# Yes, I know xbean 3.4 is old.
xbean-reflect = svn|$(_apache_svn)|geronimo/xbean/tags/xbean-3.4/xbean-reflect
-guava = git|https://code.google.com/p/guava-libraries/|v17.0/guava
+# Any other implementation of JSR-305 would probably be fine too.
jsr305 = svn|http://jsr-305.googlecode.com/svn|trunk/ri
+
+# An implementation of JSR-330. Perhaps use the one included in Google Guice if we include that anyway?
+#atinject-javax.inject-tck = svn|http://atinject.googlecode.com/svn|tags/javax.inject-tck-1
+atinject-javax.inject = svn|http://atinject.googlecode.com/svn|trunk
diff --git a/delete/atinject-javax.inject-tck.txt b/delete/atinject-javax.inject-tck.txt
new file mode 100644
index 0000000..a65b417
--- /dev/null
+++ b/delete/atinject-javax.inject-tck.txt
@@ -0,0 +1 @@
+lib
diff --git a/delete/atinject-javax.inject.txt b/delete/atinject-javax.inject.txt
new file mode 100644
index 0000000..a65b417
--- /dev/null
+++ b/delete/atinject-javax.inject.txt
@@ -0,0 +1 @@
+lib
diff --git a/makefiles/atinject-javax.inject-tck.mk b/makefiles/atinject-javax.inject-tck.mk
new file mode 100644
index 0000000..b8ba8a8
--- /dev/null
+++ b/makefiles/atinject-javax.inject-tck.mk
@@ -0,0 +1,37 @@
+# DOESN'T WORK, incomplete
+syntax error
+
+DESTDIR ?=
+MAVEN_LOCAL_REPO ?= ~/.m2
+
+XMLSTARLET = xml
+RM = rm -f
+MKDIRS = mkdir -p
+INSTALL = install
+FIND = find
+SED = sed
+
+artifact := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:artifactId -n pom.xml)
+version := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:version -n pom.xml)
+group := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:groupId -n pom.xml)
+
+all: PHONY build
+
+build: $(shell $(FIND) src tck)
+ $(SED) -e 's/VERSION=.*/VERSION=$(version)/' $(if $(CLASSPATH),-e 's|-classpath |-classpath $(CLASSPATH):|') build.sh | $(SHELL) || { $(RM) -r build; exit 1; }
+build/maven/%: build
+
+mvndir = $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(group))/$(artifact)/$(version)
+
+install: PHONY build \
+ $(addprefix $(mvndir)/$(artifact)-$(version),.pom .jar -sources.jar -javadoc.jar)
+
+$(mvndir)/%: build/maven/%
+ $(INSTALL) -Dm644 $< $@
+$(mvndir)/$(artifact)-$(version).pom: build/maven/pom.xml
+ $(INSTALL) -Dm644 $< $@
+
+clean: PHONY
+ $(RM) -r build
+
+.PHONY: PHONY
diff --git a/makefiles/atinject-javax.inject.mk b/makefiles/atinject-javax.inject.mk
new file mode 100644
index 0000000..2ee9767
--- /dev/null
+++ b/makefiles/atinject-javax.inject.mk
@@ -0,0 +1,35 @@
+DESTDIR ?=
+MAVEN_LOCAL_REPO ?= ~/.m2
+
+XMLSTARLET = xml
+RM = rm -f
+MKDIRS = mkdir -p
+INSTALL = install
+FIND = find
+SED = sed
+
+artifact := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:artifactId -n pom.xml)
+version := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:version -n pom.xml)
+group := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:groupId -n pom.xml)
+
+all: PHONY build
+
+build: $(shell $(FIND) src tck)
+ $(SED) -e 's/VERSION=.*/VERSION=$(version)/' -e /tck/d -e /junit/d build.sh | $(SHELL) || { $(RM) -r build; exit 1; }
+build/maven/%: build
+
+mvndir = $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(group))/$(artifact)/$(version)
+
+install: PHONY build \
+ $(addprefix $(mvndir)/$(artifact)-$(version),.pom .jar -sources.jar -javadoc.jar)
+
+ $(addprefix $(mvndir)/$(artifact)-$(version),.jar -sources.jar -javadoc.jar): \
+$(mvndir)/%: build/maven/%
+ $(INSTALL) -Dm644 $< $@
+$(mvndir)/$(artifact)-$(version).pom: build/maven/pom.xml
+ $(INSTALL) -Dm644 $< $@
+
+clean: PHONY
+ $(RM) -r build
+
+.PHONY: PHONY
diff --git a/makefiles/jsr305.mk b/makefiles/jsr305.mk
index f087023..ca5b6d2 100644
--- a/makefiles/jsr305.mk
+++ b/makefiles/jsr305.mk
@@ -8,16 +8,18 @@ INSTALL = install
FIND = find
all: PHONY build
-install: PHONY $(DESTDIR)$(JAR_DIR)/jsr305
-clean: PHONY
- $(RM) -r build
build: src $(shell $(FIND) src)
$(ANT) jars || { $(RM) -r build; exit 1; }
+build/%: build
+
+installdir = $(DESTDIR)$(JAR_DIR)/jsr305
+install: PHONY build $(addprefix $(installdir)/jsr305,.jar -pure.jar -src.jar)
-$(DESTDIR)$(JAR_DIR)/jsr305: build $(wildcard build/*.jar)
- $(RM) -r $@
- $(MKDIRS) $@
- $(INSTALL) -t $@ build/*.jar
+$(installdir)/%: build/%
+ $(INSTALL) -Dm644 $< $@
+
+clean: PHONY
+ $(RM) -r build
.PHONY: PHONY
diff --git a/makefiles/mvn-simple.mk b/makefiles/mvn-simple.mk
index 37ccee7..082e6f2 100644
--- a/makefiles/mvn-simple.mk
+++ b/makefiles/mvn-simple.mk
@@ -24,7 +24,6 @@ targets := pom $(if $(wildcard src/main/ $(srcdir)),jar)
################################################################################
-jar_add_dir = $(foreach file,$(wildcard $1/*), -C $1 $(patsubst $1/%,%,$(file)) )
dep_dir = $1 $(shell $(FIND) $1 2>/dev/null)
dep_optdir = $(shell $(FIND) $1 2>/dev/null)
@@ -43,7 +42,7 @@ target/$(artifact)-$(version).jar: \
$(call dep_dir,target/classes) \
$(call dep_optdir,src/main/resources)
$(MKDIRS) $(@D)
- $(JAR) -cf $@ -C target META-INF $(call jar_add_dir,target/classes) $(call jar_add_dir,src/main/resources)
+ $(JAR) -cf $@ -C target META-INF -C target/classes . $(if $(wildcard src/main/resources),-C src/main/resources .)
target/META-INF/maven/$(group)/$(artifact)/pom.xml: pom.xml
install -Dm644 $< $@
diff --git a/patches/atinject-javax.inject/fix-pom-xmlns.patch b/patches/atinject-javax.inject/fix-pom-xmlns.patch
new file mode 100644
index 0000000..ec07205
--- /dev/null
+++ b/patches/atinject-javax.inject/fix-pom-xmlns.patch
@@ -0,0 +1,8 @@
+--- atinject-javax.inject.orig/pom.xml 2014-05-30 14:35:22.799128330 -0400
++++ atinject-javax.inject/pom.xml 2014-05-30 14:35:40.305446419 -0400
+@@ -1,4 +1,4 @@
+-<project>
++<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
diff --git a/patches/plexus-cipher/no-javaee.patch b/patches/plexus-cipher/no-javaee.patch
index c689294..b0cb5fa 100644
--- a/patches/plexus-cipher/no-javaee.patch
+++ b/patches/plexus-cipher/no-javaee.patch
@@ -1,18 +1,18 @@
-diff --git a/src/main/java/org/sonatype/plexus/components/cipher/DefaultPlexusCipher.java b/src/main/java/org/sonatype/plexus/components/cipher/DefaultPlexusCipher.java
-index d129fa7..0b135df 100644
---- a/src/main/java/org/sonatype/plexus/components/cipher/DefaultPlexusCipher.java
-+++ b/src/main/java/org/sonatype/plexus/components/cipher/DefaultPlexusCipher.java
-@@ -20,14 +20,9 @@ import java.util.Set;
+Binary files plexus-cipher.orig/.git/index and plexus-cipher/.git/index differ
+diff -ru plexus-cipher.orig/src/main/java/org/sonatype/plexus/components/cipher/DefaultPlexusCipher.java plexus-cipher/src/main/java/org/sonatype/plexus/components/cipher/DefaultPlexusCipher.java
+--- plexus-cipher.orig/src/main/java/org/sonatype/plexus/components/cipher/DefaultPlexusCipher.java 2014-05-29 03:30:38.180546653 -0400
++++ plexus-cipher/src/main/java/org/sonatype/plexus/components/cipher/DefaultPlexusCipher.java 2014-05-30 14:57:41.736224103 -0400
+@@ -20,14 +20,12 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.enterprise.inject.Typed;
--import javax.inject.Named;
--
+ import javax.inject.Named;
+
/**
* @author Oleg Gusakov</a>
*/
--@Named( "default" )
+ @Named( "default" )
-@Typed( PlexusCipher.class )
public class DefaultPlexusCipher
implements PlexusCipher