Packaging shell in jar within war

34 views
Skip to first unread message

ricardop

unread,
Jun 18, 2014, 7:57:10 PM6/18/14
to crash...@googlegroups.com
Hi.
Would appreciate your help regarding this Crash+Packaging question.
For my setup I'm building a webapp that I want to deploy as war A. This web app is composed of several components, one of which is crashhub which I want to customize with my own commands. For this purpose with maven I'm packaging the different modules in jars and packagin them in war A, where I define the web.xml. One of this jars is the "shell" jar, where other than required dependecies I define my commands and properties.

The problem that I'm having is that the web deployment seems to expect the code and properties available in "/WEB-INF/crash", and with my 2 step packaging I don't seem to find a way to place resource files of the JAR in War A's WEB-INF directory. I guess that if the code looked for crash/crash.properties in class path there would be some ways to solve this, but according to documentation:

"Configuring the web application mode :In the war file packaging, the configuration file can be found under /WEB-INF/crash/crash.properties file of the archive. "

I understand that it would simply work if I added the files directly in the WAR, but would like to keep the commands in specific package.

Any ideas ?


Julien Viet

unread,
Jun 19, 2014, 10:13:11 AM6/19/14
to crash...@googlegroups.com, ricardop
you can do that by updating the “mount point configuration”:


in this case if you want to use the files in jar file you need to define:

 <context-param>
    <param-name>crash.mountpointconfig.conf</param-name>
    <param-value>classpath:/crash/</param-value>
  </context-param>
  <context-param>
    <param-name>crash.mountpointconfig.cmd</param-name>
    <param-value>classpath:/crash/commands/</param-value>
  </context-param>

in your web.xml

-- 
Julien Viet
www.julienviet.com

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "CRaSH User Group".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse crash-users...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

ricardop

unread,
Jun 19, 2014, 5:10:01 PM6/19/14
to crash...@googlegroups.com, ricardo...@gmail.com
Perfect! Exactly what I was looking for.
Thanks once again.

Julien Viet

unread,
Jun 20, 2014, 10:07:10 AM6/20/14
to crash...@googlegroups.com, ricardop, ricardo...@gmail.com
great!

-- 
Julien Viet
www.julienviet.com

Reply all
Reply to author
Forward
0 new messages