0

warTomcat 7 と Weblogic コンテナの両方に同時にデプロイしたいと考えてcargo:deployいます。現状では、一度にアクティブにできるプロファイルは 1 つだけです。

これが私が現在持っているものです:

<profiles>
    <!--  *********************************************************************
                          CARGO - FOR TOMCAT.
                          Activated when file ${env.USERPROFILE}/foo.bar exists (which should be there after successful Tomcat tookit install)
              ********************************************************************* -->
    <profile>
        <id>tomcat</id>
        <activation>
            <file><exists>${env.USERPROFILE}/foo.bar</exists></file>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.cargo</groupId>
                    <artifactId>cargo-maven2-plugin</artifactId>
                    <version>${cargo-maven2-plugin.version}</version>
                    <configuration>
                        <container>
                            <containerId>tomcat7x</containerId>
                            <type>installed</type>
                            <home>${env.USERPROFILE}/foo/apache-tomcat-7.0.57</home>
                            <timeout>180000</timeout>
                        </container>
                        <configuration>
                            <type>existing</type>
                            <home>${env.USERPROFILE}/foo/apache-tomcat-7.0.57</home>
                        </configuration>
                        <deployables>
                            <deployable>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                                <type>war</type>
                                <properties>
                                    <!--No slash needed before the context-->
                                    <context>sec-captc</context>
                                </properties>
                            </deployable>
                        </deployables>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>


  <!--  *********************************************************************
                              CARGO - FOR WEBLOGIC
                    ********************************************************************* -->
    <profile>
        <id>weblogic</id>
        <activation>
            <file><exists>${env.USERPROFILE}/foo.bar</exists></file>
        </activation>
        <build><plugins>
            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>${cargo-maven2-plugin.version}</version>
                <configuration>
                    <container>
                        <containerId>weblogic12x</containerId>
                        <type>installed</type>
                        <home>${installed-weblogic.home}/foo</home>
                        <timeout>180000</timeout>
                    </container>
                    <configuration>
                        <type>existing</type>
                        <home>${installed-weblogic.domain}</home>
                    </configuration>
                    <deployables>
                        <deployable>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <type>war</type>
                            <properties>
                                <context>/${installed-weblogic.war.contextpath}</context>
                            </properties>
                        </deployable>
                    </deployables>
                </configuration>
            </plugin>
        </plugins></build>
    </profile>
</profiles>

これらを同時に機能させるには、何を追加/変更する必要がありますか?

4

1 に答える 1