1

I would like to deploy an artifact to a remote instance of Tomcat 10. For this purpose I have been trying the Codehouse Cargo Maven 3 plugin, but I am getting an error: No container defined.

The plugin configuration:

        <plugin>
          <artifactId>cargo-maven3-plugin</artifactId>
          <version>1.10.2</version>
        <configuration>
        
          <!-- Container configuration -->
          <container>
            <containerId>tomcat10x</containerId>
            <type>remote</type>
          </container>
        
          <!-- Configuration to use with the container (which will also configure the deployer) -->
          <configuration>
            <type>runtime</type>
              <properties>
                <cargo.hostname>${remote.hostname}</cargo.hostname>
                <cargo.protocol>${remote.protocol}</cargo.protocol>
                <cargo.servlet.port>${remote.port}</cargo.servlet.port>
                <cargo.tomcat.manager.url>${remote.uri}</cargo.tomcat.manager.url>
                <cargo.remote.username>${remote.user}</cargo.remote.username>
                <cargo.remote.password>${remote.pass}</cargo.remote.password>
              </properties>
          </configuration>
        
          <!-- Deployables configuration -->
          <deployables>
            <deployable>
              <groupId>${project.groupId}</groupId>>
              <artifactId>${project.artifactId}</artifactId>
              <type>war</type>
              <properties>
                <context>${war.name}</context>
              </properties>
            </deployable>
          </deployables>
        
        </configuration>        
        </plugin>

The error:

[INFO] --- cargo-maven3-plugin:1.10.2:redeploy (default-cli) @ beletrik ---
[INFO] No container defined, using a default [jetty9x, installed] container
[INFO] [DeployerRedeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-jetty:jar:1.10.2 for container jetty9x
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Do I have to define the container? Where?

comodoro
  • 1,489
  • 1
  • 19
  • 30

0 Answers0