Hi Anders,
Anders Hammar wrote:
> Today, activating a profile defined in a parent from the child is not
> possible.
this is not entirely true:
============= %< ================
$ find .
.
./child1
./child1/pom.xml
./child2
./child2/pom.xml
./child2/v.xml
./pom.xml
============= %< ================
Parent:
============= %< ================
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<version>1-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-verifier-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>verification</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<verificationFile>${basedir}/v.xml</verificationFile>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>auto-verification</id>
<activation>
<file>
<exists>v.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-verifier-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>
<module>child1</module>
<module>child2</module>
</modules>
</project>
============= %< ================
Child1:
============= %< ================
<project>
<parent>
<groupId>test</groupId>
<artifactId>parent</artifactId>
<version>1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>child2</artifactId>
<packaging>pom</packaging>
</project>
============= %< ================
Child2 the same, except artifactId. Verification file "child2/v.xml":
============= %< ================
<verifications>
<files>
<file>
<location>pom.xml</location>
<contains>child2</contains>
</file>
</files>
</verifications>
============= %< ================
Works with M3. Works with M2 locally, but not in the reactor.
:)
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]