commit bb0e1e50ba75dfa15add334706d8ce288fbf2b0b
Author: iwakeh <iwakeh(a)torproject.org>
Date: Thu Jan 5 14:31:31 2017 +0100
Only include resources in binary jar, neither in javadoc nor sources jars.
Improved comments in build template.
---
java/base.xml | 5 ++++-
java/build.xml.template | 12 +++++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/java/base.xml b/java/base.xml
index feba6b0..47540e0 100644
--- a/java/base.xml
+++ b/java/base.xml
@@ -242,6 +242,7 @@
<param name="usepattern" value="empty" />
<param name="uselibpath" value="${libs}" />
<param name="uselibpattern" value="${jarpattern}" />
+ <param name="resourceincludes" value="${jarincludes}" />
</antcall>
<antcall target="jarring" >
<param name="destfile" value="${dist}/${jarsourcesfile}" />
@@ -250,6 +251,7 @@
<param name="usepattern" value="**/*.java" />
<param name="uselibpath" value="${libs}" />
<param name="uselibpattern" value="empty" />
+ <param name="resourceincludes" value="X" />
</antcall>
<antcall target="jarring" >
<param name="destfile" value="${dist}/${jardocsfile}" />
@@ -258,6 +260,7 @@
<param name="usepattern" value="*" />
<param name="uselibpath" value="${libs}" />
<param name="uselibpattern" value="empty" />
+ <param name="resourceincludes" value="X" />
</antcall>
</target>
@@ -273,7 +276,7 @@
<jar destfile="${destfile}"
basedir="${usebase}"
manifest="${manifestfile}" >
- <fileset dir="${resources}" includes="${jarincludes}" />
+ <fileset dir="${resources}" includes="${resourceincludes}" />
<restrict>
<not>
<name name="META-INF/*" />
diff --git a/java/build.xml.template b/java/build.xml.template
index cdc5582..4f5444d 100644
--- a/java/build.xml.template
+++ b/java/build.xml.template
@@ -22,20 +22,22 @@
<property name="tardepends" value="XXXX" />
-->
- <!-- Name to appear in jar names etc. -->
+ <!-- Obligatory: Name to appear in jar names etc. -->
<property name="name" value="XXXX"/>
- <!-- If 'project-main-class' is not provided, a library jar is created. -->
+ <!-- If 'project-main-class' is not provided, a library jar is created.
<property name="project-main-class" value="XXXX" />
-
+ -->
<!-- Additional includes from ${resources};
- space separated list of files.-->
+ space separated list of files.
+ Leave it as XXXX, if there are none. -->
<property name="jarincludes" value="XXXX" />
<!-- Pattern for jar library includes.
Remove, if not used.
- jar task uses 'runtime', if not set. -->
+ jar task uses 'runtime', if not set.
<property name="jarpatternprop" value="XXXX" />
+ -->
<!-- XXXX Has to be provided for each project. -->
<target name="coverage-check">