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.
However, undeploy by regex is not working for me. I'm looking for 'myApp-*.ear', however it doesn't work unless the version in pom matches the version of current deployment...
what am I doing wrong?
Here's 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>
...
 
     
     
    