darthfather
darthfather

Reputation: 377

Deploy war in Glassfish 5 Docker Image

I am trying to deploy a war in a docker container based on the oracle/glassfish:5.0 image.

I am able to deploy the war through the Glassfish Administration Console and manually uploading the war file.

Nevertheless, I would like to deploy the war with maven using the cargo plugin.

The versions I am using are:

The container has been built as:

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

The configuration I have setup in the pom.xml is:

<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>

The error displayed is:

[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]

Upvotes: 2

Views: 984

Answers (0)

Related Questions