我的项目有一个父 pom 和几个子模块 pom。我已经在负责构建我们的安装程序分发的父插件中放置了一个插件(使用 install4j)。让这个插件在子模块上运行是没有意义的,所以我在插件的配置中设置了 false,如下所示。问题是,当我运行时mvn clean install install4j:compile <other variables here>
,它会在父模块上清理、编译和运行install4j
插件,但随后它会尝试在子模块上运行它并崩溃。
这是插件配置
<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>
我误解了 的目的inherited=false
吗?什么是让它工作的正确方法?
我正在使用 Maven 2.2.0。