Platform: Ubuntu 7.10, Intel Pentium M, maven 2.0.4

How does one avoid doing a maven-antrun-task when a file is present?

Here's what I do:
 - Unzip a zip file with dependency:unpack
 - Add a couple of jars into the unpacked zip file with dependency:copy
 - Modify the config in two XML files in the unpacked zip file, to tell
   it about the jars 
 - Rezip the zip file and install it in the local maven repo

This works, but I have to always do "mvn clean install" to avoid the
config being modified more than once, which messes it up, and "mvn clean
install" is a nuisance when I'm running this project as part of a
compound project.

What I have done is add an empty marker file with the touch task when I
do the config.

What I have tried to do, and been unsuccessful in, was to detect this
marker and not do the modification, inside the maven-antrun-plugin's
<tasks> element.

I've also tried (and not really expected to succeed), in using a
previous maven-antrun-plugin <task> to set a property if the marker file
is present, and use that property in an unless attribute on the <tasks>
element that does the config modification.

So... is there another plugin, or built-in maven stuff that can set a
maven property if a file is present?

(maven properties are visible inside maven-antrun-plugin tasks, but
properties set inside tasks are (probably... I haven't found any
documentation on this) not visible outside the task.  At least setting a
property in one task to determine if the next one should be run, doesn't
seem to work.)

Thanx!


- Steinar


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to