title: Deploy on JBoss 7 with maven successful, but web-app not running
body: <p>I created a web app with maven for JBoss 7. During the maven tasks, a war gets created. This is my pom.xml</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.jboss.as.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-as-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;7.5.Final&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;hostname&gt;127.0.0.1&lt;/hostname&gt;
                  &lt;port&gt;9999&lt;/port&gt;
                  &lt;name&gt;webAdmin&lt;/name&gt;
                  &lt;username&gt;administrator&lt;/username&gt;
                  &lt;password&gt;mypassword&lt;/password&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;finalName&gt;webAdmin&lt;/finalName&gt;
  &lt;/build&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;lightadmin-nexus-releases&lt;/id&gt;
          &lt;url&gt;http://lightadmin.org/nexus/content/repositories/releases&lt;/url&gt;
          &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
          &lt;/releases&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.4&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.lightadmin&lt;/groupId&gt;
          &lt;artifactId&gt;lightadmin&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.M2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-as-arquillian-container-managed&lt;/artifactId&gt;
          &lt;version&gt;7.1.1.Final&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>
  
  <p>And this is the web.xml I have created for it.</p>
  
  <pre><code>&lt;!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd" &gt;
  
  &lt;web-app&gt;
  &lt;display-name&gt;Ifrit Web Administration 1.0&lt;/display-name&gt;
  
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>So the webAdmin.war file is created and if I deploy it manually (That is, I go to the Jboss web console and deploy it under "manage deployments") I can successfully see the index.jsp under [<a href="http://localhost:8080/webAdmin]" rel="nofollow noreferrer">http://localhost:8080/webAdmin]</a></p>
  
  <p>The problem comes when I try to deploy it using maven mvn jboss-as:deploy.</p>
  
  <p>These are the steps I follow:</p>
  
  <ol>
  <li>Undeploy the war that I manually deployed</li>
  <li>mvn jboss-as:deploy</li>
  <li>Go to the Jboss web console and I confirm the war file has been deployed ok (I can see it there being enabled)</li>
  <li>go to [<a href="http://localhost:8080/webAdmin]" rel="nofollow noreferrer">http://localhost:8080/webAdmin]</a> and I get 404.</li>
  </ol>
  
  <p>I have seen another case like this, in case someone wants to mark it as duplicated saying <a href="https://stackoverflow.com/questions/16318318/my-web-project-does-not-work-on-jboss-7-when-deployed-by-maven">My web project does not work on JBoss 7 when deployed by maven</a> but I still can't make it work. I have created a EAR file too, a jboss-web.xml and it just doesn't show up.</p>
  
  <p>Is there a way to know what context root is the one that has been asigned by Jboss? Or any hint as why it does work when deployed manually vs deployed with maven?</p>
  
  <p>Thanks</p>
  
  <p>Alejandro</p>