0

I am using Jelastic and I have an environment with a WildFly 10.1 node and a Maven 3.5.0 node. When I click "build and deploy" on the project in the Maven node my application should build and deploy a EAR file.

However, after the first time I do that, the deploy fails, and when I check the WildFly admin console there is a EAR and a WAR file. I have no idea where this WAR is coming from, and I can't find such file in the "target" folder either.

Checking the WildFly log, I see a "org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.app.myapp-dev is already registered"

If I remove the war from the admin console, disable the EAR and re-enable it, the application works.

I don't know exactly how Jelastic works with maven, but I believe there is no problem with my pom.xml files.

Thanks in advance!

edit: here's the pom.xml for the project root, and the pom.xml for the inner EAR module.

1 Answers1

0

Automatic build and deploy functionality in Jelastic is designed to build all the targets specified in pom.xml and deploy all the built artifacts to the app server.

If multiple targets are specified in root pom.xml of the project, all of them will be built and deployed to the app server, not only the .ear target.

Please try to deploy the subproject with the inner EAR module with the appropriate pom.xml as root project file to build and deploy only the *.ear file.

Virtuozzo
  • 1,993
  • 1
  • 10
  • 13