在Glassfish 5 Docker Image中部署战争

时间:2017-12-31 07:23:03

标签: maven docker deployment glassfish-5

我正在尝试基于 oracle / glassfish:5.0 图像在docker容器中部署战争。

我可以通过Glassfish管理控制台部署战争并手动上传war文件。

尽管如此,我想使用货物插件与 maven 部署战争。

我使用的版本是:

  • javac 9.0.1
  • Apache Maven 3.3.9
  • Maven货运插件1.6.6
  • Docker image oracle / glassfish:5.0

容器已构建为:

docker run -ti -e ADMIN_PASSWORD=password -p 4848:4848 -p 8080:8080 -d oracle/glassfish:5.0

我在 pom.xml 中设置的配置是:

<plugins>
   <plugin>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-maven2-plugin</artifactId>
      <configuration>
         <container>
            <containerId>glassfish5x</containerId>
            <type>remote</type>
         </container>
         <configuration>
            <type>runtime</type>
            <properties>
               <cargo.runtime.args>force=true</cargo.runtime.args>
               <cargo.hostname>127.0.0.1</cargo.hostname>
               <cargo.glassfish.admin.port>4848</cargo.glassfish.admin.port>
               <cargo.glassfish.domain.name>domain1</cargo.glassfish.domain.name>
               <cargo.remote.username>admin</cargo.remote.username>
               <cargo.remote.password>password</cargo.remote.password>
            </properties>
         </configuration>
      </configuration>
   </plugin>
</plugins>

显示的错误是:

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-
plugin:1.6.6:deploy (default-cli) on project hello1: 
Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.6.6:deploy failed: 
Deployment has failed: Action failed Deploying application to target server failed; 
File not found : /var/folders/b0/kd4wyk3s1rnfs_rvvbc_m2400000gn/T/cargo/19525/hello1.war -> [Help 1]

0 个答案:

没有答案