Hello all,
In my XML, I am trying to set up the signing of a jar to be dependent on
the jar executing: (Note sequence build->signjar->jar->...)
========================================================================
========
<!-- This project is set to build the application by default -->
<project name="printerconfiguration" default="build" basedir=".">
<!-- Initialize variables -->
<target name="init">
...
</target>
<!-- Default target settings for making the project -->
<target name="build" depends="signjar">
</target>
<!-- Target settings for signing the jar -->
<target name="signjar" depends="jarfiles">
<signjar jar="${JarDest}/PrinterConfigurationApp.jar"
alias="cciikey"
storepass="keystore"
keystore="${KeystoreLoc}"
/>
</target>
<!-- Target settings for making the jar -->
<target name="jarfiles" depends="copydoc">
<jar jarfile="${JarDest}/${JarFileName}.jar"
basedir="${Dest}"
includes="${ProjectDir}/*.class"
manifest="Manifest.txt"
/>
</target>
<!-- Target settings for copying the project documentation -->
<target name="copydoc" depends="compile">
<copy todir="${HTMLDir}">
<fileset dir="." includes="*.html"/>
</copy>
</target>
<!-- Target settings for compiling the project -->
<target name="compile" depends="init">
<javac srcdir="${Src}" destdir="${Dest}"
includes="${ProjectDir}/*.java">
&IncludeBuildClasspath;
</javac>
</target>
</project>
========================================================================
==========
Here is the output that I get:
========================================================================
==========
C:\JBuilder4\jdk1.3\bin\java -classpath
"C:\JBuilder4\jdk1.3\lib\tools.jar";"c:\JBuilder4\jdk1.3\jak
arta-ant-1.3\lib\parser.jar";"c:\JBuilder4\jdk1.3\jakarta-ant-1.3\lib\ja
xp.jar";"c:\JBuilder4\jdk1.3
\jakarta-ant-1.3\lib\ant.jar";
-Dant.home="c:\JBuilder4\jdk1.3\jakarta-ant-1.3" org.apache.tools.an
t.Main pc
Buildfile: build.xml
init:
pc:
init:
[echo] Processing commands for printerconfiguration
compile:
copydoc:
jarfiles:
signjar:
[signjar] Signing Jar : C:\Source\jars\PrinterConfigurationApp.jar
build:
BUILD SUCCESSFUL
Total time: 7 seconds
========================================================================
==========
My question is: Why is the target "signjar" always executing, even if the
jar is not recreated? I also tried placing the signjar step in the "jar"
task:
<!-- Target settings for making the jar -->
<target name="jarfiles" depends="copydoc">
<jar jarfile="${JarDest}/${JarFileName}.jar"
basedir="${Dest}"
includes="${ProjectDir}/*.class"
manifest="Manifest.txt"
/>
<signjar jar="${JarDest}/PrinterConfigurationApp.jar"
alias="cciikey"
storepass="keystore"
keystore="${KeystoreLoc}"
/>
</target>
and the signjar still executes there, as well.
Any ideas?
Thanks,
Joey Cline
[EMAIL PROTECTED]