title: Built war file without java code
body: <p>I was following the steps(provided to me by someone) to deploy a war file on the JBOSS on Windows which are as follows:</p>
  
  <p>1) I created a folder  Verson3</p>
  
  <p>2) Using windows command prompt, I went inside the folder Version3</p>
  
  <p>3) I ran the following command and got BUILD SUCCESS</p>
  
  <pre><code>Y:\myusername\My Documents&gt;cd Version3
  
  Y:\myusername\My Documents\Version3&gt;mvn archetype:generate -DgroupId=com.pkg.DownloadService -DartifactId=DownloadService -DarchetypeArtifactId=maven-archetype-we
  bapp -DinteractiveMode=false
  
  [INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Maven Stub Project (No POM) 1
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] &gt;&gt;&gt; maven-archetype-plugin:3.0.1:generate (default-cli) &gt; generate-sources @ standalone-pom &gt;&gt;&gt;
  [INFO]
  [INFO] &lt;&lt;&lt; maven-archetype-plugin:3.0.1:generate (default-cli) &lt; generate-sources @ standalone-pom &lt;&lt;&lt;
  [INFO]
  [INFO]
  [INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---
  [INFO] Generating project in Batch mode
  [INFO] ----------------------------------------------------------------------------
  [INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-webapp:1.0
  [INFO] ----------------------------------------------------------------------------
  [INFO] Parameter: basedir, Value: Y:\myusername\My Documents\Version3
  [INFO] Parameter: package, Value: com.pkg.DownloadService
  [INFO] Parameter: groupId, Value: com.pkg.DownloadService
  [INFO] Parameter: artifactId, Value: DownloadService
  [INFO] Parameter: packageName, Value: com.pkg.DownloadService
  [INFO] Parameter: version, Value: 1.0-SNAPSHOT
  [INFO] project created from Old (1.x) Archetype in dir: Y:\myusername\My 
  
      Documents\Version3\DownloadService
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 12.262 s
      [INFO] Finished at: 2018-02-22T17:16:11-06:00
      [INFO] Final Memory: 15M/161M
      [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>This generated the following directory structure:</p>
  
  <pre><code>Version3
  |-- src
  |   `-- main
  |       |-- resources
  |       `-- webapp
  |           |-- WEB-INF
  |           |   `-- web.xml
  |           `-- index.jsp
  `-- pom.xml
  </code></pre>
  
  <p>4) Next, I was asked to add the following and remove the JUnit related dependency code from the <code>pom.xml</code></p>
  
  <pre><code>&lt;repositories&gt;
         &lt;repository&gt;
            &lt;id&gt;JBoss repository&lt;/id&gt;
            &lt;url&gt;https://repository.jboss.org/nexus/content/groups/public-jboss/&lt;/url&gt;
         &lt;/repository&gt;
  &lt;/repositories&gt;
    &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
        &lt;artifactId&gt;resteasy-jaxrs&lt;/artifactId&gt;
        &lt;version&gt;2.3.2.Final&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.oracle&lt;/groupId&gt;
        &lt;artifactId&gt;ojdbc6&lt;/artifactId&gt;
        &lt;version&gt;11.2.0&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  </code></pre>
  
  <p>5) Another change I did was this in <code>web.xml</code>:</p>
  
  <pre><code>&lt;!-- Auto scan REST service --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;resteasy.scan&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;!-- this need same with resteasy servlet url-pattern --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;resteasy.servlet.mapping.prefix&lt;/param-name&gt;
          &lt;param-value&gt;/rest&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;
              org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
          &lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;resteasy-servlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
          &lt;/servlet-class&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;resteasy-servlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>6) Ran following command : <code>mvn clean package</code> where the pom file was. This created <code>target</code> folder and war file etc. </p>
  
  <p>The thing I am wondering is that there wasn't any <code>java</code> file I used anywhere in the above process as per the instructions I received. But I do have a java file where 
  a JAXRS webservice is defined and the package name mentioned inside that file is <code>com.pkg.DownloadService</code>. I am wondering if I should consider placing that 
  java file inside the folder <code>DownloadService</code> and then run all of the above commands? Because building a war file without any web service doesn't makes sense to me. </p>