Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 0f4156e9c9fac64efece4f13c6ea8bd7fd0d020d 1 parent d148e1a
authored April 03, 2011
27  build.xml
@@ -15,9 +15,15 @@
15 15
   <property name="testbin" location="${target}/test/java" />
16 16
   <property name="unjarred" 
17 17
             value="**/*.jar, ${testfiles}, doc/**, README.html, .classpath, .project, cpl-v10.html" />
  18
+
18 19
   <property name="binjar" value="junit-${version}.jar" />
19  
-  <property name="depjar" value="junit-dep-${version}.jar" />
20 20
   <property name="srcjar" value="junit-${version}-src.jar" />
  21
+  <property name="docjar" value="junit-${version}-javadoc.jar" />
  22
+
  23
+  <property name="depjar" value="junit-dep-${version}.jar" />
  24
+  <property name="depsrcjar" value="junit-dep-${version}-src.jar" />
  25
+  <property name="depdocjar" value="junit-dep-${version}-javadoc.jar" />
  26
+
21 27
   <property name="javadocdir" location="${dist}/javadoc" />
22 28
   <property name="javadoczip" location="${dist}-javadoc.zip" />
23 29
   <property name="hamcrestlib" location="lib/hamcrest-core-1.1.jar" />
@@ -91,6 +97,25 @@
91 97
         />
92 98
   </target>
93 99
 
  100
+  <target name="all.maven.jars" depends="jars,javadoc">
  101
+    <mkdir dir="${dist}" />
  102
+    <jar 
  103
+        jarfile="${dist}/${docjar}"
  104
+        basedir="${javadocdir}"
  105
+        excludes="${unjarred}"
  106
+        />
  107
+    <jar 
  108
+        jarfile="${dist}/${depsrcjar}"
  109
+        basedir="${src}"
  110
+        excludes="${unjarred}, **/*.class"
  111
+        />
  112
+    <jar 
  113
+        jarfile="${dist}/${depdocjar}"
  114
+        basedir="${javadocdir}"
  115
+        excludes="${unjarred}, org/hamcrest/**"
  116
+        />
  117
+  </target>
  118
+
94 119
   <target name="samples-and-tests">
95 120
     <copy todir="${dist}">
96 121
       <fileset dir="${testbin}" />
24  build_tests.sh
... ...
@@ -1,4 +1,5 @@
1 1
 set -e
  2
+set -o pipefail
2 3
 
3 4
 SCRIPT_NAME=$0
4 5
 TEST_NAME=${1:-ALL}
@@ -38,6 +39,29 @@ function TEST_jars {
38 39
     && jar tf $depjar | not grep hamcrest
39 40
 }
40 41
 
  42
+function TEST_all_maven_jars {
  43
+  version=$(get_junit_version)
  44
+  binjar=junit${version}/junit-${version}.jar
  45
+  srcjar=junit${version}/junit-${version}-src.jar
  46
+  docjar=junit${version}/junit-${version}-javadoc.jar
  47
+  depbin=junit${version}/junit-dep-${version}.jar
  48
+  depsrc=junit${version}/junit-dep-${version}-src.jar
  49
+  depdoc=junit${version}/junit-dep-${version}-javadoc.jar
  50
+
  51
+  ant clean
  52
+  ant all.maven.jars
  53
+
  54
+  jar tf $binjar | grep -q class \
  55
+    && jar tf $srcjar | grep -q java \
  56
+    && jar tf $docjar | grep -q html \
  57
+    && jar tf $depbin | grep -q class \
  58
+    && jar tf $depsrc | grep -q java \
  59
+    && jar tf $depdoc | grep -q html \
  60
+    && jar tf $depbin | not grep hamcrest \
  61
+    && jar tf $depsrc | not grep hamcrest \
  62
+    && jar tf $depdoc | not grep hamcrest
  63
+}
  64
+
41 65
 function not {
42 66
   ! "$@"
43 67
 }

0 notes on commit 0f4156e

Please sign in to comment.
Something went wrong with that request. Please try again.