Questions tagged [cargo]

Cargo is a thin wrapper that allows you to manipulate Java EE containers in a standard way. It is often used to start containers for integration and functional tests, especially with Maven or Ant. DO NOT use this for the Rust-related tool; use "rust-cargo" instead.

Cargo is a thin wrapper that allows you to manipulate Java EE containers in a standard way. It is often used to start containers for integration and functional tests, especially with Maven (Cargo - Maven) or Ant (Cargo - Ant). Another use case is to create configurations and doing the deployments for the application.

Cargo provides the following Tools and APIs:

  • A Java API to start/stop/configure Java Containers and deploy modules into them.
  • A Java API to parse/create/merge Java EE Modules
  • Ant tasks and Maven 2/Maven 3 plugins.
319 questions
2
votes
1 answer

Using relative paths works for "cargo build" but not for "cargo publish"

I have a project that holds some protobuf definitions and builds code for multiple (Python and Rust) languages. The folder structure is like this: root/ proto/ my.proto python/ rust/ Cargo.toml build.rs ... I'm using prost to generate…
Achim
  • 15,415
  • 15
  • 80
  • 144
2
votes
0 answers

How to save only the war file in artifacts between 'mvn deploy' (to nexus) and 'mvn cargo:deploy'

My .gitlab-ci.yml file has the following cache and stages defined cache: key: ${CI_COMMIT_REF_SLUG} paths: - .m2/repository/ - target/ policy: pull-push stages: - build - nexus - deploy-test - deploy-prod The 'build'…
Fred
  • 335
  • 1
  • 6
  • 22
2
votes
2 answers

Java EE war deployment or redeployment - automatically choose the appropriate action

In development, it's fairly common to want to deploy your war to your local app server, irrespective of whether it's already deployed (i.e. just deploy over the old version, if it's there). However both cargo and the glassfish maven plugin fail…
artbristol
  • 32,010
  • 5
  • 70
  • 103
2
votes
1 answer

Maven cargo plugin - redeploy specific deployable in standalone container?

I'm currently working on a project that consists of several services written in Java that are accessed by a Ruby/Rails front-end. In an attempt to simplify local development, I've created a separate project that adds all of our service WAR projects…
winston smith
  • 193
  • 1
  • 2
  • 8
2
votes
2 answers

How do I configure Maven Cargo to use an embedded Tomcat 6 server?

I'm using Maven 3.0.3. Is there a way I can use the Maven Cargo plugin to spin up an embedded Tomcat server? Right now, it seems I have to install it myself first. I get this error when I try and change the container type to "embedded"…
Dave
  • 8,667
  • 25
  • 72
  • 90
2
votes
1 answer

Problem with merging WARs using uberwar (cargo-maven2-plugin)

I've just started using cargo-maven2-plugin to merge WAR artifacts during build process and I encountered problem with uberwar mojo. Merging works fine but resulting web.xml file contains extra "xmlns" attributes that cause error when deploying on…
misiekmw
  • 21
  • 3
2
votes
1 answer

Deploy current project AND another WAR using Cargo

I'm using Cargo for Integration tests with Maven. I found examples of deploying another war from .m2 repo in pre-integration here . Can somebody guide me on how to deploy current project and another war using Cargo?
Sathish
  • 20,660
  • 24
  • 63
  • 71
2
votes
1 answer

How properly to set up tomcat logs into Maven Cargo Plugin

I'm trying to use Tomcat 8 with Maven Cargo Plugin. Developing I'm introduced an error, but error logs are not printed by Tomcat. How can I specify to print error log? As you can see into my pom.xml file I've tried to configure something but it…
firegloves
  • 5,581
  • 2
  • 29
  • 50
2
votes
0 answers

How to set DataSource Connection Pool properties in Cargo Maven Plugin?

In my Cargo Maven Configuration I set up a WildFly server with a DataSource, but how can I add the connection pool properties like max DB connections? org.codehaus.cargo
Teg
  • 1,302
  • 13
  • 32
2
votes
1 answer

Setup resources for GlassFish2.x Cargo deployment

I'm trying to get integration testing working for a GlassFish 2.x project, using Maven2 and Cargo. I finally have Cargo attempting to deploy my EAR but it fails to start because the data source is not configured. The app also depends on a few JMS…
lxs
  • 8,847
  • 4
  • 20
  • 19
2
votes
1 answer

How use cargo-maven2-plugin deploy to jboss as5?

I trying cargo-maven2-plugin, but I don't deploy in jboss5x I pom.xml is org.codehaus.cargo cargo-maven2-plugin 1.0.2
EdwardLau
  • 1,139
  • 4
  • 20
  • 26
2
votes
0 answers

cargo-maven2-plugin execution start container failed

I am trying to configure the cargo-maven2-plugin to start my local install of Glassfish 4.1. I have the following configured in my pom.xml org.codehaus.cargo
PDStat
  • 5,513
  • 10
  • 51
  • 86
2
votes
1 answer

How can I use use JSP 2.1 with Cargo maven plugin and Jetty6x embedded?

I have a webapp that is using JSP 2.1, Servlets 2.5 and JSTL 1.2 on Java 6. I do my testing using the maven-jetty-plugin 6.1.1rc1 without any problems. From this link: http://docs.codehaus.org/display/JETTY/JSP+2.0+v+JSP+2.1, I understand that jetty…
Barry Pitman
  • 3,087
  • 1
  • 24
  • 32
2
votes
2 answers

Using maven and embedded jetty: ClassCastException

I have a web-application written in java. I would like to run integration tests on a embedded jetty server. For that purpose I have a maven project (just for running integration tests). For deploying I use cargo-maven2-plugin. But while jetty…
amra
  • 16,125
  • 7
  • 50
  • 47
2
votes
2 answers

How to control a tomcat container during the runtime with maven?

I have a Maven project which executes integration tests for another web-application. This application is deployed and started within a tomcat container. The configuration for this is done in the “cargo-maven2-plugin”:
Sebastian Rapp
  • 133
  • 1
  • 1
  • 5