Exploding War File Using JBOSS EWS 7

The OpenShift forums have been retired.
You can still read and search them, but for help, please post a question on Stack Overflow.

I have built a Java application which I can successfully deploy to my Jboss 7 cartridge using a regular git push using the preferred method for deployment.

In the application, I read several images from the database and place them within my webcontent directory, however this creates a problem because the .war file never gets exploded on openshift/jboss. I read that you can remove the pom.xml file, build a war and add a .dodeploy file in the deployments directory to have the war unpacked on jboss.

I have been trying to get this to work and have been unsuccessful. All the posts I read reference a directory named deployments, which I do not have within the root of my project. I am unsure where to place the war file I build or the .dodeploy file and how to name such files.

On my local machine my project contains an .openshift directory with subdirectories: action_hooks, config, cron and markers and then the src folder, webapps folder and pom.xml inside the root.

Can anyone provide me with some simple instructions (obviously I need more explanation than the documentation provides) for exploding the war file within jboss using openshift?

We have several different JBoss cartridges, though I believe you are confusing JBoss EWS (Tomcat) with JBoss AS7 - the dir structure you're referring to is for JBoss EWS (Tomcat).

If your war files should be run on JBoss AS7, please create a JBoss AS7 application and add your war file to the local repo/deployments directory. You will want to run 'git rm -r pom.xml src/' before running git add/commit/push. You can then view your log files to see if you ran into any errors.

Hi kmb385, Hi Nam Alternatively (instead of removing the pom and src-folder) you could also simply add the skip_maven_build marker: Create an empty file in

<applicatinon>/.openshift/markers. 

This will prevent OpenShift from doing the maven build when source (and most likely a war) is being pushed.

When using JBoss Tools we offer this in the latest builds (4.1.0.Beta2, to be published officially these days) as a chechbox in the application wizard:

.

In Beta2, we'll also allow you to edit all your markers:



We discussed these 2 feature extensively in our jira:

https://issues.jboss.org/browse/JBIDE-13882
https://issues.jboss.org/browse/JBIDE-14845

Cheers
André

Thanks for the tips André!!

Your correct, I am using Tomcat 7 (JBoss EWS 2.0) is there anyway to have the war exploded using this cartridge?

I found an autodeploy option in tomcats server.xml file that seemed to do the trick. Thanks for your help your clarification between AS and EWS really helped.

Glad it's working for you!