The plugin is declared in a profile that is only activated when a thrift source directory is present:
<profile> <id>uses-thrift</id> <activation> <file> <exists>${basedir}/src/main/thrift</exists> </file> </activation> <build> <plugins> <plugin> <groupId>org.apache.thrift.tools</groupId> <artifactId>maven-thrift-plugin</artifactId> ...
I actually have a number of plugins defined in such profiles so that they become active only when relevant source artefacts are present in the sub-project.
This all looks good, but in practice I found that the profiles were never activated in sub-modules that were being built from a parent project. It was as if the activation state was determined at the parent level, not on a per module basis.
It seems that profile inheritance does function as I expected in Maven 2. It does however work perfectly with Maven 3.
No comments:
Post a Comment