maven 3.3支持Websphere 8.5.5 - pom.xml

时间:2015-09-29 21:59:47

标签: java maven websphere pom.xml websphere-8

我找不到使用maven的pom.xml在websphere 8.5.5中部署war文件的方法。 我看到有一个名为was6-maven-plugin-1.2.1的插件。它似乎可以支持WAS 6 +,7 +,8 +。

但我无法使用此插件部署war文件。它会引发以下错误。

[ERROR] Failed to execute goal org.codehaus.mojo:was6-maven-plugin:1.2.1:installApp (default-cli) on project TEST: Bad archive: C:\test.war -> [Help 1]

请评论......

我的pom.xml配置FYR:

            <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>was6-maven-plugin</artifactId>
          <version>1.2.1</version>
          <executions>
            <execution>
              <id>integration-test</id>
              <phase>integration-test</phase>
              <goals>
                <goal>installApp</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <wasHome>C:\Program Files (x86)\IBM\WebSphere\AppServer</wasHome>
            <host>127.0.0.1</host>
            <server>server1</server>
            <node>localhostNode01</node>
            <virtualHost>default_host</virtualHost>
            <verbose>true</verbose>
            <conntype>SOAP</conntype>
            <port>8880</port>
            <earFile>test.war</earFile>
            <verbose>true</verbose>
            <updateExisting>true</updateExisting>
            <applicationName>${project.build.finalName}</applicationName>                           
          </configuration>
        </plugin>

1 个答案:

答案 0 :(得分:1)

要使用Maven开发WebSphere项目,请按照此文档Setting up your environment for Maven配置环境。

特别是对于WAS 8.5.5,您应该在pom.xml中使用以下条目:

<dependency>
      <groupId>com.ibm.tools.target</groupId>
      <artifactId>was</artifactId>
      <version>8.5.5</version>
      <type>pom</type>
      <scope>provided</scope>
</dependency>

对于此POM目标,您需要使用将运行时库复制到本地Maven存储库的启动配置脚本。

有关如何复制这些库的详细说明,请参阅Configuring dependency POM files that emulate the classpath of specific WebSphere runtime environments