maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Raible <m...@raibledesigns.com>
Subject Re: Building a jar of a some of a webapp's classes [solved]
Date Thu, 30 Oct 2003 21:22:57 GMT
I got what I wanted by doing the following:

1.  In project.properties, I have:
maven.war.classes.excludes=**/navigator/displayer/*
maven.war.classes.includes=**/navigator/example/*
maven.jar.excludes=**/example/*

2.  In maven.xml I added:

     <!-- create jar file for struts-menu and include it in WEB-INF/lib 
-->
     <postGoal name="war:webapp">
         <attainGoal name="jar"/>
         <copy file="${maven.build.dir}/${maven.final.name}.jar"
             todir="${maven.build.dir}/${pom.artifactId}/WEB-INF/lib"/>
     </postGoal>

This accomplished what I was looking for.

Thanks,

Matt

On Oct 30, 2003, at 11:24 AM, Matt Raible wrote:

> Doing two subprojects seems like a lot of work to me - if it's not, 
> please provide a link (or short howto) on how I can do this.  In the 
> meantime, here's what I've done:
>
> 1.  Include **/example from the war.src, excluded everything else
> 2.  Excluded **/example from the jar.src
>
> It seems like it should be pretty easy to just make the war goal 
> depend on jar and then have the jar included in WEB-INF/lib of the 
> war.  Is this not possible?  It seems like a quick and easy solution.
>
> Matt
>
> On Oct 29, 2003, at 7:45 PM, matt wrote:
>
>> Recommend two subprojects - one for the tag library and one for the 
>> example web application, with the web application having a dependency 
>> on the tag library.  This would make repository management easier, 
>> too.
>>
>> Matt Raible wrote:
>>
>>> I am using Maven to build struts-menu 
>>> (http://sf.net/projects/struts-menu).  Since this is a tag library - 
>>> I want to build the struts-menu.jar from my 
>>> target/struts-menu/classes directory, but I don't want to include 
>>> net/sf/navigator/example/* classes.  I want the example classes to 
>>> remain in WEB-INF/classes and move the rest to 
>>> WEB-INF/lib/struts-menu.jar before deployment.  This will allow the 
>>> struts-menu.war (example app) to use the same setup that users will 
>>> use.  What is the best place to do this - in a <preGoal> of 
>>> webapp:war?  Does anyone have any samples of this lying around?
>>>
>>> Thanks,
>>>
>>> Matt
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message