John Gerken <[EMAIL PROTECTED]> wrote:

> 1) I'm confused regarding the execution of targets.  The manual
> states that "If no if and no unless attribute is present, the target
> will always be executed."

If you request this target or one that depends on it to execute, yes.
This should work, if it doesn't work for you, please show us a build
file snippet.

> 2) Is it possible to update, or add new files to an existing jar
> file using the jar task, or must I recreate the entire jar from
> scratch?

You could use <jlink> I guess, or nested <zipfileset> elements in
<jar> together with a temporary copy of the jar file in question.
Getting the MANIFEST.MF would become tricky and I leave it as an
exercise 8-)

<move file="my.jar" tofile="tmp.jar" />
<jar jarfile="my.jar" ...>
  <!-- your new files here -->
  <fileset .../>
  <zipfileset src="tmp.jar" excludes="META-INF/MANIFEST.MF" />
</jar>

Stefan

Reply via email to