blob: 14f484af9c00bbef32d794145e982e042ebeea66 [file] [log] [blame]
Bob Lee45c7a952009-09-14 03:09:36 +00001NAME=javax.inject
Bob Leef8219432009-07-13 21:44:47 +00002
3# Clear and recreate build directory.
4rm -r build
5mkdir -p build/classes
Bob Leeeedff3d2009-09-28 05:31:30 +00006mkdir -p build/tck
Bob Leef8219432009-07-13 21:44:47 +00007mkdir -p build/dist
Bob Leebfc03432009-09-30 21:15:57 +00008mkdir -p build/tck/classes
9mkdir -p build/tck/dist
Bob Leef8219432009-07-13 21:44:47 +000010
11# Compile classes.
12javac -g -d build/classes `find src -name *.java`
Bob Leebfc03432009-09-30 21:15:57 +000013javac -g -classpath build/classes:lib/junit.jar -d build/tck/classes \
Bob Leeeedff3d2009-09-28 05:31:30 +000014 `find tck -name *.java`
Bob Leef8219432009-07-13 21:44:47 +000015
Bob Lee45c7a952009-09-14 03:09:36 +000016FOOTER="<font size='-1'>Copyright (C) 2009 <a href='http://code.google.com/p/atinject/'>\
17The JSR-330 Expert Group</a>. \
18Licensed under the <a href='http://www.apache.org/licenses/LICENSE-2.0'>Apache \
19License</a>, Version 2.0.</font>"
20
Bob Leef8219432009-07-13 21:44:47 +000021# Generate Javadocs.
Bob Lee45c7a952009-09-14 03:09:36 +000022javadoc -protected -bottom "$FOOTER" \
23 -sourcepath src -d build/javadoc javax.inject
Bob Leebfc03432009-09-30 21:15:57 +000024javadoc -classpath build/classes:lib/junit.jar -protected -bottom "$FOOTER" \
25 -sourcepath tck -d build/tck/javadoc org.atinject.tck \
Bob Lee86a45552009-09-29 09:20:16 +000026 org.atinject.tck.auto org.atinject.tck.auto.accessories
Bob Leef8219432009-07-13 21:44:47 +000027
28# Generate jars.
29cp -R src build
Bob Leebfc03432009-09-30 21:15:57 +000030cp -R tck build/tck/src
31
32rmSvn() {
33 find $1 -name .svn -type d | xargs rm -r
34}
35
36rmSvn build/src
37rmSvn build/tck/src
38rm build/tck/src/tck.iml
Bob Leeeedff3d2009-09-28 05:31:30 +000039
Bob Lee45c7a952009-09-14 03:09:36 +000040jar cfM build/dist/$NAME-src.zip -C build/src .
Bob Leebfc03432009-09-30 21:15:57 +000041jar cfM build/tck/dist/$NAME-tck-src.zip -C build/tck/src .
Bob Leef8219432009-07-13 21:44:47 +000042
Bob Lee45c7a952009-09-14 03:09:36 +000043jar cfM build/dist/$NAME-javadoc.zip -C build/javadoc .
Bob Leebfc03432009-09-30 21:15:57 +000044jar cfM build/tck/dist/$NAME-tck-javadoc.zip -C build/tck/javadoc .
Bob Lee45c7a952009-09-14 03:09:36 +000045jar cfM build/dist/$NAME.jar -C build/classes .
Bob Leebfc03432009-09-30 21:15:57 +000046jar cfM build/tck/dist/$NAME-tck.jar -C build/tck/classes .
Bob Leef8219432009-07-13 21:44:47 +000047
Bob Lee45c7a952009-09-14 03:09:36 +000048jar cfM build/$NAME.zip -C build/dist .
Bob Leebfc03432009-09-30 21:15:57 +000049jar cfM build/$NAME-tck.zip -C build/tck/dist .