views:

240

answers:

1

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.

A: 

I've found this can work a couple of ways. The way I'm doing it now...

1) Took out <inherited>false</inherited>
2) First run mvn clean install
3) Then run mvn install4j:compile -N (for non-recursive)

The plugin could also use the @aggregator annotation to achieve the same effect.

jobrahms