Hi,
I followed Marc's method but it never goes to pre section if it is already installed.
On Thu, Feb 17, 2011 at 10:55 PM, Stuart D. Gathman <stuart@xxxxxxxx> wrote:
On Thu, 17 Feb 2011, Fawad Ali wrote:I do the following:
> I am new to rpm and to rpm packaging. I was asked to copy a
> war file from one location to another. through rpm. I packaged that.
> So what it does is like below.
> 1) Copy file to AUTODEPLOY folder in tomcat server
> 2) From the AUTODEPLOY folder the tomcat server picks up the war file
> and explodes it in WEBAPPS folder and removes the content from
> AUTODEPLOY.
>
> Now if I want to REINSTALL, it should first check that whether WEBAPPS
> contains the exploded war file or not. If yes, then it should display
> that package is already installed and skip the installation, if the
> web apps does not contain the exploded war file then it should force
> the installation process.
>
> Can anyone tell me how can I do that.
Install the exploded webapp to a fixed directory structure. For instance,
our web tracking goes in /bms/webapp/webtrk with WEB-INF META-INF
subdirs and maybe an art subdir, etc. (If Linux Standards Base ever
addresses the issue, it would probably belong in /usr/share/java-webapp
or /var/lib/java-webapp instead.)
Then add a symlink to your webapp container, for instance with JPP packaged
tomcat5, add /var/lib/tomcat5/webapp/webtrk -> /bms/webapp/webtrk
I also find it handy to symlink WEB-INF/classes -> /bms/java where the webapp
and additional RPMs drop class files for our local java packages (so that the
web app is composed of multiple versioned RPMs). To enable this symlink,
the RPM needs to also install META-INF/context.xml with something like:
<?xml version="1.0" encoding="UTF-8"?>
<Context allowLinking="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
</Context>
--
Stuart D. Gathman <stuart@xxxxxxxx>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list
--
Regards,
S. Fawad Ali Shah
Software Engineer,
Stafona. Inc.
Cell# +92 334 500 1577
www.7thbillion.com
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list