My ear files have version in them. For example, myApp-1.0.1.ear or myApp-1.0.2.ear. I'm trying to undeploy by regex(cause I don't know what the current version is), and then deploy.
I'm looking for 'myApp-.*', however it doesn't work. I also tried, 'myApp*', 'myApp.*\.ear' etc.
The error I get:
[INFO] Error executing UNDEPLOY
Embedded error: {"domain-failure-description" => {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-3" => "JBAS014807: Management resource '[(\"deployment\" => \"myApp-ear-1.0.0.ear\")]' not found"}}}
If I hardcode the final build name in my pom.xml, the undeploy and deploy both work fine. - <finalName>myApp</finalName>
JBoss runs in domain mode - if that makes any difference.
what am I doing wrong?
Here's my pom.xml
...
<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-.*</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>
<configuration>
<hostname>${controller.hostname}</hostname>
<port>${controller.port}</port>
<username>${user}</username>
<password>${password}</password>
<domain>
<server-groups>
<server-group>${server.group}</server-group>
</server-groups>
</domain>
<skip>${deploy.skip}</skip>
</configuration>
...