>>>>> Steinar Bang <[EMAIL PROTECTED]>:
[snip! On using a profile to detect file presence]
> It now works when I do "mvn install" (config is modified), and
> repeated installs (config is left alone).
> But when I do "mvn clean install" then config is not modified
> (probably because the marker is still there at the time of profile
> activation).
> Of course, since the marker is deleted, but not recreated, the next
> "mvn install" will modify the config, and repeated "mvn install"
> invocations will leave it alone.
> So the behaviour is less destructive than before (ie. the config is
> never modified beyond corruption), but it may be wrong the first time,
> and that behaviour is confusing.
> Not sure how to fix this.
To complete the thread: I ended up having to bite the bullet, and put
the stuff done by ant into a separate ant build file, and invoke it from
an ant task in maven-antrun-plugin.
This works, ie. both "mvn clean install" and "mvn install" gives the
expected results (patching of config the first time after a clean, and
no more patching after that).
It also allows me to use a property for the marker file name (a property
that is a function of other properties, and eventually based on
${project.build.directory}).
The drawbacks are:
1. there is an extra file to keep track of and put changes in
2. running an ant task seems to be a lot more costly in time, than
having the ant tasks inline in the POM
3. it doesn't do property expansion in the replacevalue elements (that
was probably done by maven with the inlined maven-antrun-plugin
tasks)
- Steinar
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]