IlHam13
IlHam13

Reputation: 131

cargo-maven3-plugin stopped running

I had a working project, but suddenly it stopped running

I'm launching the TomCat 9.0.60 via cargo plugin version 1.10.1. After "mvn clean package cargo:run" an exception occurs when restarting:

"org.codehaus.cargo.container.ContainerException: Failed to create a Tomcat 9.x standalone configuration: Invalid configuration dir [/target/cargo/configurations/tomcat9x]. When using standalone configurations, the configuration dir must point to an empty directory - Except if the configuration was created by Cargo."

I not understand what happends. Why it occurred and what needs to be done to fix it.

Upvotes: 0

Views: 713

Answers (1)

Dmitry
Dmitry

Reputation: 606

In our project, we used another plugin (sass-maven-plugin) to create a file in the target/load/configuration/tomcat9x As a result , sass-maven-plugin created a file inside "target/cargo/configuration/tomcat9x". cargo-maven3-plugin thought that the "target/cargo/configuration/tomcat9x" directory was already configured by him and did not add the necessary files. Appeared "org.codehouse.cargo.container.ContainerException: Failed to create a Tomcat 9.x standalone configuration".

variants to fix:

  1. create a file in ".cargo" in "target/cargo/configuration/tomcat9x"
  2. do not create files in target/cargo/configuration before the container starts. After the container starts, you can create files

Upvotes: 0

Related Questions