I added the name
parameter on my deployment using Wildfly Maven Plugin:
mvn wildfly:deploy -Dname=myapp -Dwildfly.hostname=myserver -Dwildfly.username=user -Dwildfly.password=pwd
However, it keeps on deploying with the Maven version and extension. Here's how it looks in standalone.xml
<deployment name="myapp-1.1-SNAPSHOT.war" runtime-name="myapp-1.1-SNAPSHOT.war">
<content sha1="17e09de2cd8f78ffd033a90b4e82bdb52eb9485b"/>
</deployment>
The reason is to streamline the deployment process. After a Maven release, the deployment name changes to myapp-1.1.war
, and the new development becomes myapp-1.2-SNAPSHOT.war
. Instead of undeploying release myapp-1.1.war
, and deploying myapp-1.2-SNAPSHOT.war
, we want to reduce it to a single step - just redeploy myapp
, and it should overwrite the old one.
Btw, if I just deploy, I'll have the two versions.
Just to be clear, this is the goal:
<deployment name="myapp" runtime-name="myapp-1.1-SNAPSHOT.war">
<content sha1="17e09de2cd8f78ffd033a90b4e82bdb52eb9485b"/>
</deployment>
This seems like a very simple case, and it should work as per the documentation: https://docs.jboss.org/wildfly/plugins/maven/latest/deploy-mojo.html