Search code examples
deploymentjbosswildflytomcat9

Deploy with unmanaged mode in wildfly


I come from Tomcat 9, and I need to deploy my project in wildfly 26.1.3 in --unmanaged mode, this is because according to the documentation the user is the one who has control of the project files, and what I need is to modify the . properties and some folders inside the project. I tried it by console:

deploy /root/myproject.war --unmanaged

But I got this error:

{"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit."myproject.war".STRUCTURE" => "WFLYSRV0153: Failed to process phase STRUCTURE of deployment "sacsFlyFagarProd.war" Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0160: Failed to mount deployment content Caused by: java.io.FileNotFoundException: /root/myproject.war (Permission denied)"}}}}

So I tried using the admin api, creating a folder and inside all the exploded project and this path was set. But when trying in the browser it just comes out.

404 - Not Found

I tried looking for related information but still can't find anything clear.

If there is another way to deploy my project where I can manage the files in a folder within the same project and have wildfly not delete it on restart, I would be very grateful for your help.

Sorry if my query is very basic.


Solution

  • WildFly supports exploded deployments with its deployment scanner and using the add content. What you are getting is unix permission issue because WildFly isn't running as root (which should be the way).