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

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.

Related

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.

Why do files end up in JBoss tmp but not the deployment

I have a JBoss server whereby when I deploy my ear file from Eclipse, I'm ending up with a whole bunch of jar files missing from the lib/ directory. Upon further investigation, I have found these files - they're in the JBoss server's tmp/vfs-nested.tmp directory. The timestamps all confirm that they're "fresh" from the latest Eclipse server instance publish action I kick off, but I'm perplexed as to why they're residing in this tmp directory and not in the application's (failed) deployment to the server.
JBoss documentation indicates "The tmp directory is used by JBoss to store temporarily files such as unpacked deployments." but I'm unsure as to what the order is or why things are there but not in the deployed application.
Any help?
Dave

Will JBoss App Server (v5.01) load any .ear file in the deploy directory?

Will the JBoss App Server load any .ear file it sees in the deploy directory? We want to name our .ear file differently based on whether it's built from the trunk or a branch. I don't have first-hand experience with this since our deployment is done by another team. Thanks for your help!
yes it will deploy all EAR files from deploy folder.

Deploy war file with modifiable properties files

I am building a web service and am packaging it into a war file for deployment. Right now all of my config files (.properties and .xml) are being packaged into my .war file. This isn't going to work as some of these files will need to be modified for each individual installation. I know that some servlet containers will leave the .war files intact which would mean the config files would never be easily modified. My question is this: what is the best practice for deploying a .war file with these external config files? I'm thinking that the config files will need to be shipped separate from the .war file and placed into a directory that is in the classpath. Is there a default directory setup like this in Tomcat that these files can just be dropped into and my web service will be able to find without much trouble?
Maybe I shouldn't be using a war file for this setup? Maybe I should just be providing a zip file (with the same contents as the war file) and the deployment will simply be to extract the zip into the webapps directory?
I do not know any default directory in Tomcat to store configuration, my
attempts to solve the same issue have been :
1 - Move configuration to the DB and provide scripts or webpages to modify values.
2 - Have a script to deploy the war. The script would merge configuration from a user directory into web.xml or other deployed config files.
3 - Have webapps look first in a user directory for configuration and
if not found then look for configuration files deployed by the war.
Least favorite is 3 - it require all webapps to check two places for configuration and
you end up with two different xml files on the server with different values and it is not always clear which one is used.
Next favorite is 2 - the webapps can be written without knowledge of multiple config files, but you run into issue when someone does a deploy from Tomcat manager instead of using your script.
Favorite is 1. This just works in most cases. Problem is when you don't have a DB or
want to configure how you connect to the DB.
If having the file visible from all webapps is not an issue, you could put it $CATALINA_HOME/lib.
One solution is to modify property file after deployment of war file is to use ServletContext.getRealpath() method to get the real path means path of file in the server where it is deployed and then modify that file it will modify file in container only not the original file. So you need to backup it if it is important modification for you. So by this you do not need to redeploy war file as it is already modifying file from deployed container.
This solution can edit a file that is in webpages folder also from the java class.
If you want more description or how to do it then let me know i have did it.

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

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.