How do you unwar a .war file with ant on windows? - jboss

I'm only remotely familiar with what ant does, but apparently I have to setup a service that's run on jboss and put it into a deploy directory...
the problem is the .war file -- I only have winzip 7zip and ant and I dont know how to ge the contentsa out of the .war file to put it in the deploy directory...
are there other conf and build.xml files a well that are needed?
thanks for your help!
//edit
the problem is the instructions say to unwar the .war file. And I Dont know how to do this via JBOSS or any other means. How?
//edit
7zip unwar-ed the file but I'm not sure where to put the contents in jboss.
/server/ ?
Thanks for your help. As this is my first time doing this I'm completely clueless.

Usually you can just place the WAR file into the directory and the container will take care of unpacking it.
But, a WAR file is simply a ZIP file with a different extension, so you could also use any popular unzip tool (WinZip, WinRAR, 7Zip, etc) to unzip it manually if need be.
Ant has an unzip task as well.

JBoss should be able to deploy a war file and unpack it on it's own. You shouldn't be writing scripts that unpack war files for JBoss.

Using unzip task: http://ant.apache.org/manual/Tasks/unzip.html

Unless you have something else in mind1, you don't have to depoy you war in an "exploded" format (i.e. unpacked). Just deploy you war on JBoss and JBoss will deal with it. To do so, just copy your war into /server/default/deploy.
1 The only good reason I can see to deploy a war in an exploded format is if you plan to make incremental changes to the content (e.g. changing just a class) without deploying the whole webapp again. But this doesn't seem to be the case. So just deploy you war without unpacking it.

Related

Where do I find .war files in Aerogear unified push server?

Where can find unifiedpush-server-wildfly.war and unifiedpush-auth-server.war files in unified push server. where can i deploy it?
It's located at {your_jboss_installation_root_folder}/standalone/deployments/, you can just drop your .war files there and JBoss will automatically deploy them.
If the .war is successfully deployed, you will see a file such as unifiedpush-auth-server.war.deployed being generated in the same folder.
Otherwise, files such as unifiedpush-auth-server.war.failed will be generated. It is a text file so open it you will find why it failed to deploy in JBoss.
Hope this helps.

How to package my jar file as wildly war file?

I have a jar file which takes some input from command line and does processing. I want to make this jar file as a deployable war file (wildly file) How can i do that? Any guide would be appreciated.
(I have installed jobs tools in my eclipse,)
And I would like to know the difference between ear file and the war file? Any detail explanation would be appreciated?
I'm not sure a command line application makes much sense in a web container. That said in a WAR libraries need to go in the WAR/WEB-INF/lib directory.

how to download war files from wildfly 8

Wildfly 8:
Where are the deployed war files located on the server file system?
How do I download them? I tried using the JBoss CLI as well as the Web Interface.
Found the war files to be located here. In this directory I found several subdirectories. The war files were all named content and did not have an extension. I could figure out what they were based on file size and timestamp.
wildfly location\standalone\data\content
You want the files 'after' they have been deployed? This generally isn't a good idea as it isn't guaranteed to be exactly the same as the source archive.
The standard location for the deployment archives is ./standalone/deployments/ although this can be changed in the configuration.
After an archive is deployed you can see the exact location of there the deployed archive came from in the configuration, it will be written to the bottom of the xml file.
There is a download button to download the .war
in the management console localhost:9990
click the view button near your war
on top you will find a download icon
I found it in the %WILDFLY_HOME%\standalone\temp\ directory. If it is not present there then you can perform a search in all the subdirectories of the wildfly.

Jetty deploy war file (Automatic Deployment is not working)

this is my first time deploying a war File to a Jetty Server via SCP+SSH and I'm not able to get it to work.
I made a proper .war file with Eclipse (but I also tested the same things I'm going to mention with a example .war file) and copied the file to the folder /jetty/webapps/ROOT. Now when I restart Jetty and try to get on the server (I tried Serveradress/WarFilename/ aswell) I get to a Directory Path and I'm able to download the war file but nothing else.
I also tried to copy the war file to the webapps folder itself instead of webapps/ROOT. What am I doing wrong?
The directory ${jetty.base}/webapps/ROOT/ is for exploded webapps, or static resource deployments.
If you want to serve your war file, say myapp.war on the root context "/", then copy it to the file ${jetty.base}/webapps/ROOT.war
Note: if you are copying the file into the jetty-distribution/webapps/ you are doing it wrong, go read up on how ${jetty.base} and ${jetty.home} work.

Deploy a War file with Eclipse and Tomcat 6 without a build file

I know there are a bunch of posts on this topic, but I can't seem to figure it out. Here is my setup:
- Eclipse Indigo
- Tomcat 6
- Struts WAR file that I imported into Eclipse from http://www.manning.com/dbrown/SampleApplication.zip
I added the server to Eclipse, and added the project to the server. It runs fine, but I'd like to make some changes to the XML and java files (not the jsp files). I was under the impression that Eclipse takes care of the deployment after I save and restart the server, but I guess this isn't the case. I looked into creating an ant file to do a custom build, but I'm not really sure how to make it since I don't even know how to do a deployment "manually". How would I go about doing a manual deployment? Thanks.
A war file is usually created by exporting it from an IDE like eclipse, netbeans, etc.
While generating a war file there is 2 options,
You can include your java files with it
You can avoid java files from it.
In both the cases class files will be there which are created from java files. Class files will be able to take care of the actions of java class.
If the war file which you down loaded is not having those java files, you will not be able to use it with eclipse, where as it will work fine if you are putting it into tomcat directory for running.
For running a war file manually just put it into tomcat webapps folder and run tomcat.
Then you can access the pages using the url.
http://localhost:8080/yourprojectname/
If you want to check whether the war file contains any java files, after starting the tomcat server it will extract the war file into the same directry, where you can search for java files.
If you want to run the project from eclipse,
import it into eclipse, open index.jsp page
right click-> run as-> run on server
if you have not yet configured the server yet,select the server in the list, specify its installation path, then add projects into server in next step, finish it. then it will load your project.
Please provide little more details so that we can help you better.
manual: copy the war in the tomcat folder then start tomcat.
if you want to use eclipse you need to click redeploy war first by right clickling the deployed war in the servers tab under tomcat.