I am using the jboss-as-maven-plugin from redhat. I have a standalone JBoss Server with port offset 100 and want to use a property with this value. But if I use the following configuration, the plugin uses the default port 9999
JBAS012144: Could not connect to remote://localhost:9999
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.7.Final</version>
<configuration>
<port>${jboss.port}</port>
</configuration>
</plugin>
<properties>
<jboss.port>10099</jboss.port>
</properties>
I know I can start the deployment with -Djboss-as.port=10099 but i prefer the property.
It would be really nice, to set the properties in an extra file. So I took the properties-maven-plugin to read a user.properties file with the properties jboss.host and jboss.port. This plugin is invoked by the initialized Phase
I can read and use the properties from the file in the whole lifecycle, but when I call jboss-as:deploy, the properties are empty and the Plugin took the default values. The JBoss Plugin sais: Invokes the execution of the lifecycle phase package prior to executing itself.