从父POM中定义的配置文件调用子模块的配置文件

时间:2013-04-17 13:51:00

标签: maven pom.xml

我在父POM中有以下个人资料:

<profile>
    <id>myprofile</id>
    <activation>
       <activeByDefault>false</activeByDefault>
    </activation>
    <modules>
        <module>module1</module>
        <module>module2</module>
    </modules>
</profile>

现在在我的孩子模块2的POM中,我有以下个人资料:

<profiles>
    <profile>
        <id>module2profile</id>
        <build>
            <finalName>mywar</finalName>
            <plugins>
            ....
            </plugins>
        </build>
    </profile>
</profiles>

我的要求是从父POM配置文件中,而不是引用&#34; module2&#34;,我想引用配置文件&#34; module2profile&#34;。 我需要这个,因为在我的module2中我创建了两个不同的war文件(一个是正常创建的,而另一个是由&#34创建的; module2profile&#34;)。

0 个答案:

没有答案