deployment - How to Automatically Deploy EAR Subdeployments (JARs and WARs) in WildFly Using YAML Configuration Without Modifyin

admin2025-04-17  3

We have already configured the application.xml file with the deployment details for the existing JAR and WAR files. My question is: if we need to deploy additional JAR or WAR files without updating the existing application.xml file, can we use the YAML extension feature to manage the deployment configurations?

Note: The new JAR and WAR files need to be added as subdeployments of the main EAR deployment.

What I have tried: I created a YAML configuration file with the following content:

wildfly-configuration:
    deployment:
        test.jar:
            content:
                -
                    path: test.jar
                    relative-to: jboss.server.base.dir
                    archive: true

What I’m trying to achieve: I now want to deploy an EAR file (test.ear) to the WildFly server. The EAR file contains JAR and WAR files as subdeployments. When deploying the test.ear, I want its subdeployments (the JAR and WAR files inside the EAR) to be deployed automatically.

Theoretical expectation vs. issue: In theory, WildFly should automatically handle the EAR to be deployed and the required subdeployments without requiring additional configuration, like modifying the application.xml or YAML. However, in our case, it only deploys the subdeployments configured inside the application.xml file.

So, can we achieve this requirement using the YAML configuration feature?

My question is: if we need to deploy additional JAR or WAR files without updating the existing application.xml file, can we use the YAML extension feature to manage the deployment configurations?

Note: The new JAR and WAR files need to be added as subdeployments of the main EAR deployment.

转载请注明原文地址:http://anycun.com/QandA/1744898095a89181.html