Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Auto Closed
-
2.2.2
-
None
-
None
Description
In an attempt to work around issue http://jira.codehaus.org/browse/MASSEMBLY-457 I tried to use the following profiles to set a property depending of the existens of a certain directory in my multimodule build:
<profiles> <profile> <id>runAssembly</id> <activation> <file> <exists>src/main/sql</exists> </file> </activation> <properties> <skipAssembly>false</skipAssembly> </properties> </profile> <profile> <id>dontRunAssembly</id> <activation> <file> <missing>src/main/sql</missing> </file> </activation> <properties> <skipAssembly>true</skipAssembly> </properties> </profile> </profiles>
This is working well in normal builds. I can use the ${skipAssembly} property to switch on and of the assembly plugin depending of the directory existence in my modules.
However, in the build run by the release:perform goal, this does not work. In this case always the second profile from the above is activated, regardless if the directory exists or not.
But I found out (after a lot of tries), that it DOES work if the order of the profiles above is just changed. So when I write it like this
<profiles> <profile> <id>dontRunAssembly</id> <activation> <file> <missing>src/main/sql</missing> </file> </activation> <properties> <skipAssembly>true</skipAssembly> </properties> </profile> <profile> <id>runAssembly</id> <activation> <file> <exists>src/main/sql</exists> </file> </activation> <properties> <skipAssembly>false</skipAssembly> </properties> </profile> </profiles>
THEN it's working even in release:perform builds. I have no idea what the triggering change is, but it seems worth creating an issue.