18

I am running JBoss 4.3 on Ubuntu under /usr/local/jboss-4.3/. I have deployed my application as a WAR file i.e. myapp.war, to /usr/local/jboss-4.3/server/myserver/deploy. However, there doesn't seem to be an 'exploded' /myapp directory under the deploy folder, how come?

I am used to Tomcat running on Windows so I am a bit new to JBoss. When you deply WAR to Tomcat, the physical contents of this WAR will be exploded to a /myapp directory. With this it is then possible to modify files under the web app, such as config settings etc.

How can I do this in JBoss?

rmcc
  • 3,507
  • 7
  • 29
  • 25

6 Answers6

17

You can unzip your .war contents in a "myapp.war" folder, which JBoss will consider a deployed application just as if it was a zipped war.

Even better, most IDEs (Eclipse for sure, but i guess other IDEs such as Netbeans) allow you to deploy the exploded package instead of the zipped .war, allowing you to change just the single files you modify instead of the whole .war package

Raibaz
  • 9,280
  • 10
  • 44
  • 65
3

This link can be useful:

http://community.jboss.org/wiki/DeployTipsAndBuildSampleScripts

Quick Summary of what the article concerns: When it comes application builds/deployments in JBoss, there are a plethora of viable approaches. This wiki highlights several build/deploy scenerios, along with steps and pertinent build script samples. The following approaches are covered:

  • Point/click deployment using JBossIDE - For users that don't like ANT build scripts

  • Exploded EAR, JAR, SAR, WAR deployment (Option 1) - Maximize development productivity by eliminating ANT copy tasks

  • Exploded EAR, JAR, SAR, WAR deployment (Option 2) - Separate IDE from the compile, build and deploy process

  • Normal EAR, JAR, SAR, WAR deployment - Deploy a zipped archive (Necessary when using Clustering/Farm Deployment

Franco Rondini
  • 10,841
  • 8
  • 51
  • 77
RicardoS
  • 2,088
  • 1
  • 21
  • 22
  • 2
    Unless you are linking to an article that directly (and solely) addresses the question, it is helpful to say a few words about what your are linking to and why it is useful. Indeed, in this case, it would be beneficial to excerpt the most salient points in the linked article. – Kris Nov 24 '11 at 14:59
1

Same problem facing, when I export as .war file from Eclipse and copy it into (UAT or Prod) JBOSS Server 7.1.1 Final AS deployement directory, And Start Windows JBOSS Service .war file deployed sucessfully but .war file not unpacked or exploded into deployment folder.

For This solution is copy example.war exploded folder (name of folder) into deployment folder and then start. And mentions auto-deploye-exploded=true in standalon.xml

Darin Kolev
  • 3,401
  • 13
  • 31
  • 46
Mahavir
  • 11
  • 1
0

I had exactly the same problem with JBoss 7. My ant script would copy the .war file to the JBoss deployments folder (jboss-as-7.1.1.Final/standalone/deployments in my system) but the .war wouldn't explode. The .war was perfectly deployable through the administration CLI so it wasn't an unsatisfied dependency or anything. It was solved when I instructed my Ant war task to not compress the war (set the property compress to false) as in:

...
<target name="war" depends="build">
  <mkdir dir="${build.dir}"/>
  <war
    compress="false"
    needxmlfile="false"
    basedir="${webroot.dir}"
    warfile="${build.dir}/${project.distname}.war">
    <exclude name="WEB-INF/${build.dir}/**"/>
    <exclude name="WEB-INF/src/**"/>
   </war>
</target>
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
  • That sounds like a zip compression bug. The war is still a file, the only difference is its not compressed. – cmcginty Mar 13 '13 at 02:49
  • If that (i.e. zip compression bug) were the case wouldn't deployment through the administration CLI also fail? It is not clear to me why a plausible explanation and one that at least worked in one particular case and so may be relevant for another user coming to this thread deserves a downvote. Note to mention that I find the possibility of a bug in Ant's war task unlikely, at least, given how frequently it is used. – Marcus Junius Brutus Mar 13 '13 at 12:42
0

In the standalone.xml I do see only this part of the code:

<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">

I do not see the deployment-scanner parameters like:

auto-deploy-exploded" => false,

"auto-deploy-zipped" => true, "deployment-timeout" => 60L,

and so on.

Alex
  • 1
0

it does this in a tmp folder......

but you can explode the file in the deploy directoy just name it "app.war"

l_39217_l
  • 2,090
  • 1
  • 13
  • 15