maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steinar Bang ...@dod.no>
Subject Re: Not run maven-antrun-plugin task with file present?
Date Sun, 16 Dec 2007 12:52:10 GMT
>>>>> Steinar Bang <sb@dod.no>:

>>>>> "Wendy Smoak" <wsmoak@gmail.com>:

[snip!]
>> But actually it sounds like you may want to just activate the profile
>> if one of the files that would be created is _missing_.

> Yes.  The marker file I create with <touch> in a maven-antrun-plugin
> task.

>> There's an example of that on this page:
>> http://maven.apache.org/guides/introduction/introduction-to-profiles.html

> Thanx!  I'll give it a look.

Now I've moved the entire maven-antrun-plugin config for the config
modification, into a profile that's activated with
 <file>
  <missing>full-path-to-the-marker-file</missing>
 </file>

and that works after a fashion (except that the full-path thingy is a
nuisance).

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 unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message