Rammohan
Rammohan

Reputation: 619

Specify path for jboss-maven-plugin

How do you specify the deployment path for a war deployed using jboss-maven-plugin.

e.g. If my war were to be named as appname-1.0-snapshot.war and I want to deploy it to the path localhost:8080/appname, what would be the configuration for jboss-maven-plugin in my pom.xml. My current configuration is as follows:

        <plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.5.Final</version>
            <configuration>
                <filename>/appname</filename>
            </configuration>
        </plugin>

I have also tried to use name in configuration, but it is not working.

The goals that I am using are clean jboss-as:deploy

Upvotes: 0

Views: 950

Answers (1)

Alf
Alf

Reputation: 2321

In the URL localhost:8080/appname the 'appname' part is the context root. You can set the context root by adding a jboss-web.xml file in the WEB-INF folder:

<?xml version="1.0"?>
<jboss-web>
   <context-root>/appname</context-root>
</jboss-web>

You do not need to change the name of your war.

Upvotes: 1

Related Questions