Maven - 也将WAR部署到特定文件夹

时间:2014-12-18 15:43:44

标签: java maven gwt

我需要知道如何指示maven在保留标准/deployments部署目录的同时将ROOT.war部署到/src/main/webapp文件夹中。

以下是我需要处理的个人资料:

<profile>
          <id>sdk</id>
          <build>
              <plugins>
                  <plugin>
                      <groupId>com.google.appengine</groupId>
                      <artifactId>appengine-maven-plugin</artifactId>
                      <version>${gae.version}</version>
                      <configuration>
                          <enableJarClasses>false</enableJarClasses>
                      </configuration>
                  </plugin>
                  <plugin>
                      <groupId>org.codehaus.mojo</groupId>
                      <artifactId>gwt-maven-plugin</artifactId>
                      <version>${version.gwt}</version>
                      <executions>
                          <execution>
                              <!-- gwt:compile happens just before package phase -->
                              <phase>prepare-package</phase>
                              <goals>
                                  <goal>compile</goal>
                              </goals>
                          </execution>
                      </executions>
                      <configuration>
                          <modules>
                              <!-- gwt module inherits Core gwt module therefore both will be gwt:compiled -->
                              <module>org.example.App</module>
                          </modules>
                          <logLevel>DEBUG</logLevel>
                          <!--<logLevel>WARN</logLevel>-->
                          <runTarget>index.html</runTarget>
                          <appEngineVersion>${gae.version}</appEngineVersion>
                          <!-- tell the gwt plugin that the webapp source resides in src/main/webapp -->
                          <webappDirectory>${webappDirectory}</webappDirectory>
                          <!-- tell the gwt plugin that dev mode should be run using the webapp that resides in target/${webappDirectory} -->
                          <hostedWebapp>${webappDirectory}</hostedWebapp>
                          <!-- Normally the gwt maven plugin executes dev mode using a builtin jetty server.
                               This config property instructs the gwt maven plugin to execute dev mode using the
                               jetty server supplied by the appengine sdk. -->
                          <server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
                      </configuration>
                  </plugin>
              </plugins>
          </build>
      </profile>

现在,我的应用程序部署在Openshift中我还需要有这个配置文件:

  <profiles>
    <profile>
     <id>openshift</id>
     <build>
        <finalName>OpenShift template</finalName>
        <plugins>
          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <configuration>
              <outputDirectory>deployments</outputDirectory>
              <warName>ROOT</warName>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

maven-war-plugin alonside与gwt-maven-plugin放在一起工作并且web.xml没有被复制等等。所以我需要修改gwt-maven-plugin设置。 现在的问题是

  • 如何使gwt-maven-plugin也部署与此类似 openshift档案?将ROOT.war部署到/deployments文件夹

0 个答案:

没有答案
相关问题