Permalink
Browse files

Add all.maven.jars to build all the jars we'll push to maven

  • Loading branch information...
1 parent d148e1a commit 0f4156e9c9fac64efece4f13c6ea8bd7fd0d020d @dsaff dsaff committed Apr 3, 2011
Showing with 50 additions and 1 deletion.
  1. +26 −1 build.xml
  2. +24 −0 build_tests.sh
View
@@ -15,9 +15,15 @@
<property name="testbin" location="${target}/test/java" />
<property name="unjarred"
value="**/*.jar, ${testfiles}, doc/**, README.html, .classpath, .project, cpl-v10.html" />
+
<property name="binjar" value="junit-${version}.jar" />
- <property name="depjar" value="junit-dep-${version}.jar" />
<property name="srcjar" value="junit-${version}-src.jar" />
+ <property name="docjar" value="junit-${version}-javadoc.jar" />
+
+ <property name="depjar" value="junit-dep-${version}.jar" />
+ <property name="depsrcjar" value="junit-dep-${version}-src.jar" />
+ <property name="depdocjar" value="junit-dep-${version}-javadoc.jar" />
+
<property name="javadocdir" location="${dist}/javadoc" />
<property name="javadoczip" location="${dist}-javadoc.zip" />
<property name="hamcrestlib" location="lib/hamcrest-core-1.1.jar" />
@@ -91,6 +97,25 @@
/>
</target>
+ <target name="all.maven.jars" depends="jars,javadoc">
+ <mkdir dir="${dist}" />
+ <jar
+ jarfile="${dist}/${docjar}"
+ basedir="${javadocdir}"
+ excludes="${unjarred}"
+ />
+ <jar
+ jarfile="${dist}/${depsrcjar}"
+ basedir="${src}"
+ excludes="${unjarred}, **/*.class"
+ />
+ <jar
+ jarfile="${dist}/${depdocjar}"
+ basedir="${javadocdir}"
+ excludes="${unjarred}, org/hamcrest/**"
+ />
+ </target>
+
<target name="samples-and-tests">
<copy todir="${dist}">
<fileset dir="${testbin}" />
View
@@ -1,4 +1,5 @@
set -e
+set -o pipefail
SCRIPT_NAME=$0
TEST_NAME=${1:-ALL}
@@ -38,6 +39,29 @@ function TEST_jars {
&& jar tf $depjar | not grep hamcrest
}
+function TEST_all_maven_jars {
+ version=$(get_junit_version)
+ binjar=junit${version}/junit-${version}.jar
+ srcjar=junit${version}/junit-${version}-src.jar
+ docjar=junit${version}/junit-${version}-javadoc.jar
+ depbin=junit${version}/junit-dep-${version}.jar
+ depsrc=junit${version}/junit-dep-${version}-src.jar
+ depdoc=junit${version}/junit-dep-${version}-javadoc.jar
+
+ ant clean
+ ant all.maven.jars
+
+ jar tf $binjar | grep -q class \
+ && jar tf $srcjar | grep -q java \
+ && jar tf $docjar | grep -q html \
+ && jar tf $depbin | grep -q class \
+ && jar tf $depsrc | grep -q java \
+ && jar tf $depdoc | grep -q html \
+ && jar tf $depbin | not grep hamcrest \
+ && jar tf $depsrc | not grep hamcrest \
+ && jar tf $depdoc | not grep hamcrest
+}
+
function not {
! "$@"
}

0 comments on commit 0f4156e

Please sign in to comment.