[ 
http://nagoya.apache.org/jira/browse/CACTUS-126?page=comments#action_55347 ]
     
Vincent Massol commented on CACTUS-126:
---------------------------------------

Hi James,

Yes, you're right this is a deficiency of tha WAR/JAR Ant tasks as we're 
directly extending the WAR task. That said, if you were to provide a poatch for 
this, we would be willing to apply it... :-)

Thanks


> JarList reference for cactifywar task
> -------------------------------------
>
>          Key: CACTUS-126
>          URL: http://nagoya.apache.org/jira/browse/CACTUS-126
>      Project: Cactus
>         Type: Wish
>   Components: Ant Integration
>  Environment: All platforms
>     Reporter: James Carpenter
>     Priority: Minor

>
> When using the cactifywar ant task one can inject additional libraries into 
> the cactified war by using the nested lib element.  The problem is that there 
> is no way to inject a whole list of jars by reference.  In a more advanced 
> build design one is likely to use the new ant 1.6 import feature which allows 
> a build to inherit the majority of its functionality.  In such a situation it 
> is very awkward to have to override the ant task responsible for calling the 
> cactifywar task just to add a few more libraries.
> To be fair this problem is really a deficiency in the Ant War and Jar tasks.  
> To fix it one will probably want to create a new datatype that supports 
> mulitple jars.  An example usage of the sort of thing I am talking about is 
> demonstrated below.
> <jarlist id="my.jarlist.ref">
>   <lib file="somefile.jar"/>
>   <lib file="someotherfile.jar"/>
> </jarlist>
> <cactifywar srcfile="${dist.home}/${war.name}"
>         destfile="${dist.home}/${cactus-war.name}"
>            mergewebxml="${cactus-web.path}">
>             <classes dir="${testbuild.classes.dir}"/>
>             <jarlist refid="my.jarlist.ref"/>
>             <servletredirector/>
>             <servletredirector name="ServletRedirectorSecure"
>                 mapping="/ServletRedirectorSecure" roles="test"/>
>             <filterredirector mapping="/test/filterRedirector.jsp"/>
> </cactifywar>
> Such functionality would let one do things like this in the ant task:
> <project name="ExampleWebComponent" default="usage" basedir=".">
>     <import file="../webcomponentbuild.xml"/>
>     <target name="init.jarlist.refs" depends="init.properties">
>         <!-- Compile Classpath -->
>         <jarlist id="my.jarlist.ref">
>             <lib file="somefile.jar"/>
>             <lib file="someotherfile.jar"/>
>         </jarlist>
>     </target>
> </project>
> There are lots of potential variations on the sort of thing I am describing.  
> The objective is bury the details of calling the cactifywar task in an 
> imported ant file and only override the target necessary to set a reference 
> to a list of jars to pack into the cactified war.
> Note: A fileset reference won't work well for the jarlist datatype since all 
> the jars would then have to be under a single directory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to