Why not use: However, this bit is not working: <activation> <file> <exists>${basedir}\plugin.xml</exists> </file> </activation>
/Henrik On 6/12/06, Boden, David <[EMAIL PROTECTED]> wrote:
I've managed to track this down. The profiles work correctly. However, this bit is not working: <activation> <file> <exists>plugin.xml</exists> </file> </activation> It is not looking for plugin.xml at ${basedir}/plugin.xml for each sub-project as I'd expect. Instead, for each subproject it's just evaluating the same multi-project-base/plugin.xml. I'm going to come up with a simple scenario and raise a Jira. Regards, Dave -----Original Message----- From: Boden, David Sent: Monday, June 12, 2006 11:26 AM To: 'users@maven.apache.org' Subject: Profiles for sub-projects As part of a multi-project build, I have defined a <profile/> in my *parent* pom. I would like this profile to be switched on for some of the sub-projects (my GUI components), and off for other subprojects (my shared and server components). In the example I've given, I want the profile to be activated on a per-sub-project basis when the file "plugin.xml" is located in the root directory of the sub-project. At the moment, Maven decides *once* for the multi-project whether to activate the profile depending on whether a plugin.xml file is present in the *aggregator* pom's root directory (multi-project pom). Is this behaviour a bug? If so, I'll raise a Jira. Is there some other way that I can get around this other than copying the plugin configurations to every single one of my sub-projects? Many thanks, Dave Configuration in the *parent* pom: <profiles> <!-- The guibundle profile prepares and signs an RCP bundle. It is activated in the projects which need to be distributed as RCP plugins, i.e. the ones which get distributed to the GUI. It is activated when a plugin.xml file exists. --> <profile> <id>guibundle</id> <activation> <file> <exists>plugin.xml</exists> </file> </activation> <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> <configuration> <archive> <manifestFile>META-INF/MANIFEST.MF</manifestFile> </archive> <descriptors> <descriptor>../SSBuild/bundle-assembly.xml</descriptor> </descriptors> </configuration> </plugin> </plugins> </build> </profile> </profiles> ------------------------------------------------------------------------------ This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]