Maven - Failed to execute load: run

I am trying to configure automatic deployment of cargo in my servlet project, and I have this in the pom.xml file:

  <dependency> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-core-api-module</artifactId> <version>1.4.3</version> </dependency> <!-- <dependency> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-core-container-tomcat</artifactId> <version>1.4.2-SNAPSHOT</version> </dependency> --> <dependency> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.4.2</version> </dependency> <build> <plugins> <!-- cargo plugin --> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <configuration> <container> <containerId>tomcat6x</containerId> <type>remote</type> <systemProperties> <cargo.jvmargs>-XX:MaxPermSize=256M -Xmx1024m</cargo.jvmargs> </systemProperties> </container> <configuration> <type>runtime</type> <properties> <cargo.hostname>${remote.hostname}</cargo.hostname> <cargo.protocol>${remote.protocol}</cargo.protocol> <cargo.servlet.port>9000</cargo.servlet.port> <cargo.tomcat.manager.url>http://localhost:9000/manager</cargo.tomcat.manager.url> <cargo.remote.username>user</cargo.remote.username> <cargo.remote.password>pass</cargo.remote.password> </properties> </configuration> <deployer> <type>remote</type> <deployables> <deployable> <groupId>${groupId}</groupId> <artifactId>${artifactId}</artifactId> <type>war</type> <properties> <context>latest</context> </properties> </deployable> </deployables> </deployer> </configuration> </plugin> <!-- End cargo plugin --> </plugins> <build>> 

When I try to start the load through mvn clean cargo:start , I get an error message:

 [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.3:start (default-cli) on project my-app: Unable to parse configuration of mojo org.codehaus.cargo:cargo-maven2-plugin:1.4.3:start for parameter deployables: Cannot find 'deployables' in class org.codehaus.cargo.maven2.configuration.Deployer -> [Help 1] 

any idea? Hh

0
source share
2 answers

According to the documentation , the deployer element cannot contain the deployables child element. For everything to be in order, you must put the "deployables" in the "configuration" element

 <configuration> <container> [...] </container> <configuration> <type>standalone</type> [...] </configuration> <deployables> <deployable> <groupId>my.war.groupId</groupId> <artifactId>my-war</artifactId> <type>war</type> </deployable> </deployables> </configuration> 
+3
source

I noted that you write

How will $ {groupId} and $ {artifactId} be solved? !! Try static groupId and artifactId for a military application.

  <deployer> <type>remote</type> <deployables> <deployable> <groupId>${groupId}</groupId> <artifactId>${artifactId}</artifactId> <type>war</type> <properties> <context>latest</context> </properties> </deployable> </deployables> </deployer> 
0
source

Source: https://habr.com/ru/post/1307480/


All Articles