My ear files have a version in them. For example, myApp-1.0.1.ear or myApp-1.0.2.ear. I try to undeploy with a regex (because I don't know what the current version is) and then deploy.
However, undeploy using regex does not work for me. I am looking for "myApp - *. Ear", however this does not work if the version in pom does not match the version of the current deployment ...
what am I doing wrong?
Here is my pom.xml
...
<version>1.0.0</version>
...
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.4.Final</version>
<executions>
<execution>
<phase>clean</phase>
<goals>
<goal>undeploy</goal>
</goals>
<configuration>
<match-pattern>myApp-*.ear</match-pattern>
<ignoreMissingDeployment>true</ignoreMissingDeployment>
<matchPatternStrategy>fail</matchPatternStrategy>
</configuration>
</execution>
<execution>
<id>install-application</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
...
source
share