Okay, I looked at what you recommended, and I think my problem is that I can't wire my own server.xml. Using cactus.tomcat4x.conf.dir just allowed me to add my catalog.xml context file to the cactus /conf directory... The file unfortunantly doesn't do anything there...
My JNDI datasource is specified in a <context> entry in /tomcat/webapps/catalog.xml. This actually points to the /target/catalog directory as I am using Maven to build my war file. So, when I run cactus, my resulting cactified war is missing the JNDI datasource defined in /tomcat/webapps/catalog.xml. I could provide my own custom server.xml that had the correct context "catalog-cactus" and my JNDI datasource defined. Except for one issue.. The other developers will be rather annoyed that the datasource is definied in yet another file. What I really want to do is intercept via a pre/post goal Cactus's server.xml and add my context webapp entry into it, and edit the docBase to point to the right location, not "/target/catalog" but just "catalog". I looked at the webxmlmerge ant task, and in a perfect world, I could point to my server.xml (or /tomcat/webapps/catalog.xml) and have Cactus via a serverxmlmerge ant task merge the two.. any context entries, environment entries, etc.. While I'm not exactly volunteering to take it on.. I guess I could, if this was the right approach and met the Cactus needs... Actually, after looking at the maven plugin, I could write a preGoal to cactus:test-war where I just reach into the server.xml and add my context stuff.. This way I can use the vanilla version of server.xml, and not have to maintain that data in another location... I hope I'm being somewhat clear here. Eric > -----Original Message----- > From: Vincent Massol [mailto:[EMAIL PROTECTED] > Sent: Friday, February 27, 2004 12:31 AM > To: 'Cactus Users List' > Cc: [EMAIL PROTECTED] > Subject: RE: Copying Tomcat <context> file with Maven Plugin > and Cactus > 1.6 dev > > > Hi Eric, > > > -----Original Message----- > > From: Eric Pugh [mailto:[EMAIL PROTECTED] > > Sent: 26 February 2004 20:17 > > To: [EMAIL PROTECTED] > > Subject: Copying Tomcat <context> file with Maven Plugin and Cactus > 1.6 > > dev > > > > Hi all, > > > > My directory structure is set up to have an embedded tomcat: > > > > /src/java > > /src/test > > /src/test-cactus > > > > /tomcat/conf > > /tomcat/webapps/catalog.xml > > > > > > The /tomcat/webapps/catalog.xml contains my JDBC datasource and my > > environment variables. This allows me to have these files seperate > from > > my > > /tomcat/conf/server.xml file. > > > > However, trying to run this under Cactus I have the > difficulty that my > app > > deployed under Cactus managed Tomcat is missing the jdbc and > environment > > variables! The /tomcat/conf/server.xml that is deployed by Cactus > doesn't > > have the jdbc and environment properties. It seems like though that > if I > > copy my /tomcat/webapps/catalog.xml to > > $cactus_deploy/tomcat4x/webapps/catalog-cactus.xml along with my > > $cactus_deploy/tomcat4x/webapps/catalog-cactus.xml, then everything > works > > fine.. > > > > Any suggestions on how I can maybe get the catalog.xml file copied > over to > > catalog-cactus.xml? > > That should be quite easy. You can use the cactus.tomcat4x.conf.dir > property (and the cactus.tomcat4x.conf.includes and > cactus.tomcat4x.conf.excludes properties). See > http://jakarta.apache.org/cactus/integration/ant/task_cactus.html > > Thus simply point it to a directory where you have put all > config files > you wish. > > Thanks > -Vincent > > > > > Eric > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
