• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1NAME=javax.inject
2VERSION=SNAPSHOT
3
4# Clear and recreate build directory.
5rm -r build
6mkdir -p build/classes
7mkdir -p build/tck
8mkdir -p build/dist
9mkdir -p build/tck/classes
10mkdir -p build/tck/dist
11
12# Compile classes.
13javac -g -d build/classes `find src -name *.java`
14javac -g -classpath build/classes:lib/junit.jar -d build/tck/classes \
15	`find tck -name *.java`
16
17FOOTER="<font size='-1'>Copyright (C) 2009 <a href='http://code.google.com/p/atinject/'>\
18The JSR-330 Expert Group</a>. \
19Licensed under the <a href='http://www.apache.org/licenses/LICENSE-2.0'>Apache \
20License</a>, Version 2.0.</font>"
21
22# Generate Javadocs.
23javadoc -protected -bottom "$FOOTER" \
24    -header "<font color='red'><b>This is a DRAFT specification.</b></font>" \
25	-sourcepath src -d build/javadoc javax.inject
26javadoc -classpath build/classes:lib/junit.jar -protected -bottom "$FOOTER" \
27	-sourcepath tck -d build/tck/javadoc org.atinject.tck \
28	org.atinject.tck.auto org.atinject.tck.auto.accessories
29
30# Generate jars.
31cp -R src build
32cp -R tck build/tck/src
33
34rmSvn() {
35  find $1 -name .svn -type d | xargs rm -r
36}
37
38rmSvn build/src
39rmSvn build/tck/src
40rm build/tck/src/tck.iml
41
42jar cfM build/dist/$NAME-src.zip -C build/src .
43jar cfM build/tck/dist/$NAME-tck-src.zip -C build/tck/src .
44
45jar cfM build/dist/$NAME-javadoc.zip -C build/javadoc .
46jar cfM build/tck/dist/$NAME-tck-javadoc.zip -C build/tck/javadoc .
47jar cfM build/dist/$NAME.jar -C build/classes .
48jar cfM build/tck/dist/$NAME-tck.jar -C build/tck/classes .
49
50jar cfM build/$NAME.zip -C build/dist .
51jar cfM build/$NAME-tck.zip -C build/tck/dist .
52
53# Build Maven bundle.
54mkdir build/maven
55cp build/dist/$NAME.jar build/maven/$NAME-$VERSION.jar
56cp build/dist/$NAME-src.zip build/maven/$NAME-$VERSION-sources.jar
57cp build/dist/$NAME-javadoc.zip build/maven/$NAME-$VERSION-javadoc.jar
58cp pom.xml build/maven
59jar cfM build/$NAME-$VERSION-bundle.jar -C build/maven .
60