Maven: trying to get my submodule's poms to NOT inherit a plugin in the parent

Posted by jobrahms on Stack Overflow See other posts from Stack Overflow or by jobrahms
Published on 2010-03-25T16:17:27Z Indexed on 2010/03/25 18:33 UTC
Read the original article Hit count: 257

My project has a parent pom and several submodule poms. I've put a plugin in the parent that is responsible for building our installer distributables (using install4j). It doesn't make sense to have this plugin run on the submodules, so I've put false in the plugin's config, as seen below. The problem is, when I run mvn clean install install4j:compile it cleans, compiles, and runs the install4j plugin on the parent, but then it tries to run it on the child modules and crashes.

Here's the plugin config

<plugin>
    <groupId>com.google.code.maven-install4j</groupId>
    <artifactId>maven-install4j-plugin</artifactId>
    <version>0.1.1</version>
    <inherited>false</inherited>
    <configuration>
        <executable>${devenv.install4jc}</executable>
        <configFile>${basedir}/newinstaller/ehd-demo.install4j</configFile>
        <releaseId>${project.version}</releaseId>
        <attach>false</attach>
        <skipOnMissingExecutable>true</skipOnMissingExecutable>
    </configuration>
</plugin>

Am I misunderstanding the purpose of inherited=false? What is the correct way to get this to work? I'm using maven 2.2.0.

© Stack Overflow or respective owner

Related posts about maven-plugin

Related posts about inheritance