How can I deploy two projects with the mvn wildfly:run command

55 Views Asked by At

Can I deploy two projects while using the command maven

mvn wildfly:run

My two projects are defined in a parent pom.xml file like so

...
<modules>
    <module>project-rest-api</module>
    <module>web-frontend</module>
</modules>
...

Both projects have the wildfly plugin dependency

<plugin>
    <groupId>org.wildfly.plugins</groupId>
    <artifactId>wildfly-maven-plugin</artifactId>
    <version>2.0.1.Final</version>
</plugin>

And to fire up wildfly and deploy one of the projects I use the following which works fine

mvn clean wildfly:run -pl project-rest-api

or the other project with

mvn clean wildfly:run -pl web-frontend

Is there a way to deploy both into the wildfly container? The following does not work, it only deploys one project

mvn clean wildfly:run -pl web-frontend -pl project-rest-api

The projects are independent and I don't want them being included as a dependency of the other.

Is it even possible?

0

There are 0 best solutions below