dev@javaserverfaces.java.net

Re: Another Maven question, this one re: war plugin

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Thu, 02 Aug 2007 15:07:45 -0700

Tom Kalafut wrote:
> Thanks.
>
> (Sorry all, if this shouldn't be posted here. It *IS* helping me set up
> my JSF/Tomcat/Maven build environment.)
>
> While you're at it, would you happen to know how to get Maven to wipe
> out the directory that my war file gets expanded into by Tomcat? (Or is
> this configurable in Tomcat?)
>
> Where war.deploy=%CATALINA_HOME%/webapps, this pom.xml fragment copies
> my newly built war file over to Tomcat:
>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.0</version>
> <configuration>
>
> <warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory>
>
> <webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
> <outputDirectory>${war.deploy}</outputDirectory>
> </configuration>
> </plugin>
>
> For now, I have to delete the expanded directory manually of course.
>
I can't speak the maven side of this question, but you can configure
Tomcat to
not expand the WAR upon deployment.

In TOMCAT_HOME/conf/server.xml, you can search for the unpackWARs
attribute (associated with the appBase of 'webapps') and set it to false.

> Tom
>
> Tom Kalafut
> I3/CG Crew Member
> Trident Systems Inc.
> tommyk_at_tridsys.com
> (919)388-1264
>
> ============
> The opinions expressed in this e-mail may not necessarily reflect the
> opinions of Trident Systems Inc.
>
>
> -----Original Message-----
> Date: Thu, 02 Aug 2007 13:21:58 -0700
> From: Adam Winer <adam.winer_at_oracle.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Subject: cannot be cast to
> com.sun.faces.application.ApplicationAssociate
>
> Set the <scope> to "provided" in your pom.xml.
>
> -- Adam
>
>
> Tom Kalafut wrote:
>
>> Thanks. That did the trick.
>>
>> Now I just gotta figure out how to (automatically) exclude some of my
>> dependency jar files from Maven 2's war plugin so that I don't have to
>> manually delete them after every build. The warSourceExcludes tag
>> doesn't want to cooperate.
>>
>> Tom
>>
>>
>> Tom Kalafut
>> I3/CG Crew Member
>> Trident Systems Inc.
>> tommyk_at_tridsys.com
>> (919)388-1264
>>
>> ============
>> The opinions expressed in this e-mail may not necessarily reflect the
>> opinions of Trident Systems Inc.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>