Context:
Since the <jar> call of these two is identical, minus the destfile, I replaced <daily> with
, which simply calls our <"jar"> with the parameter jarfile (which we use as the value of destfile) temporarily altered, for the length of the call.
This now causes the target "jar" to be our main "archive builder" (so that any change we would want to apply to it doesn't have to be mirrored somewhere else).
Additionally, this patch adds a warning/comment in <"jar"> about the addition of new JARs to this project (I got burnt by this myself, which is why I thought that it would be a good idea).
XML:
<target name="jar" depends="compile">
<jar
destfile="${jarfile}"
basedir="${build}"
update="true"
index="true"
compress="true">
<manifest>
<attribute name="Main-Class" value="${main}" />
</manifest>
<zipgroupfileset dir="${lib}/jar">
<include name="*.jar"/>
</zipgroupfileset>
<zipgroupfileset dir="${src}/jar">
<include name="*.jar"/>
</zipgroupfileset>
</jar>
</target>
XML:
<target name="daily">
<antcall target="set.released.false"/>
<antcall target="compile" />
<jar
destfile="${dist}/${ant.project.name}-${revision}.jar"
basedir="${build}"
update="true"
index="true"
compress="true">
<manifest>
<attribute name="Main-Class" value="${main}" />
</manifest>
<zipgroupfileset dir="${lib}/jar">
<include name="*.jar"/>
</zipgroupfileset>
<zipgroupfileset dir="${src}/jar">
<include name="*.jar"/>
</zipgroupfileset>
</jar>
</target>
XML:
<target name="daily">
<antcall target="set.released.false"/>
<antcall target="jar">
<param name="jarfile" value="${dist}/${ant.project.name}-${revision}.jar"/>
</antcall>
</target>
This now causes the target "jar" to be our main "archive builder" (so that any change we would want to apply to it doesn't have to be mirrored somewhere else).
Additionally, this patch adds a warning/comment in <"jar"> about the addition of new JARs to this project (I got burnt by this myself, which is why I thought that it would be a good idea).
Diff:
<manifest>
<attribute name="Main-Class" value="${main}" />
</manifest>
+ <!--
+ Note: when adding new jars, make sure to manually
+ remove any "META-INF/*.RSA" and "META-INF/*.DSA"
+ in them. We could take care of that here,
+ but since <restrict> doesn't support <zipgroupfileset>,
+ we would need to use <archives> instead,
+ which is WAAAAAYYY too slow...
+ (build time goes from 30 seconds to 2m 30s...)
+ -->
<zipgroupfileset dir="${lib}/jar">
<include name="*.jar"/>
</zipgroupfileset>