ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: AW: Splitting a <fileset>
Date Wed, 23 May 2007 08:01:51 GMT
1. Write your own task (as often ... maybe Ant 1.7.2 will contain <applyjava> ... )
   -- <scriptdef>
   -- Java
2. Use <antcontrib:for> for iterating over the files
3. Workaround
   -- Rename the included JSPs from *.jsp to *.jsp.inc
      (filename and include directive)
   So I hope, that the jspc wont find them for direct compiling.



Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Tim Pettersen [mailto:tim@atlassian.com] 
>Gesendet: Mittwoch, 23. Mai 2007 09:26
>An: Ant Users List
>Betreff: Re: AW: Splitting a <fileset>
>
>Hi Jan,
>
>Unfortunately not - we need to use an exclusion pattern to not compile 
>the files in the "includes" directory as they are statically 
>included in 
>other JSPs and won't compile on their own.
>
>I'm toying with the idea of attempting to pass a list of 
>directories to 
>recursively compile, which would be every JSP directory excluding the 
>"includes" dir - but I'm not sure if ANT will support that either..
>
>Thanks for the speedy reply though!
>
>cheers,
>Tim
>
>Jan.Materne@rzf.fin-nrw.de wrote:
>> Could you compile all files at once?
>>
>> http://edocs.bea.com/wls/docs81/jsp/reference.html#65756
>>     -compileAll
>>
>>     Recursively compiles all JSPs in the current directory, 
>or in the 
>>     directory specified with the -webapp flag. (See the 
>listing for -webapp 
>>     in this list of options.). JSPs in subdirectories are 
>also compiled.
>>
>>
>> Jan
>>
>>  
>>
>>   
>>> -----Urspr√ľngliche Nachricht-----
>>> Von: Tim Pettersen [mailto:tim@atlassian.com] 
>>> Gesendet: Mittwoch, 23. Mai 2007 08:45
>>> An: user@ant.apache.org
>>> Betreff: Splitting a <fileset>
>>>
>>> Hi,
>>>
>>> One of our build targets breaks on Windows systems due to a 
>too-long 
>>> command line problem.
>>>
>>> We're using a <fileset> with some include/exclude patterns 
>to build a 
>>> list of JSPs to compile, then passing the resulting set to 
>java using 
>>> the snippet below:
>>>
>>> -----8<--snip-----
>>>
>>>       <path id="jsps.path">
>>>           <fileset dir="${build.war}">
>>>               <exclude name="**/includes/**/*.jsp"/>
>>>               <exclude name="**/manageyourkitprofiling.jsp"/>
>>>               <include name="**/*.jsp"/>
>>>           </fileset>
>>>       </path>
>>>
>>>       <pathconvert pathsep=" " property="jsps" refid="jsps.path"/>
>>>
>>>       <java classname="weblogic.jspc" fork="yes">
>>>           <arg line="-d ${build.weblogic}/WEB-INF/classes -k 
>>> -g -webapp 
>>> ${build.war} ${jsps}"/>
>>>           <classpath>
>>>               <pathelement path="${wl.java}/lib/tools.jar"/>
>>>               <pathelement 
>path="${wl.home}/server/lib/weblogic.jar"/>
>>>               <pathelement 
>path="${wl.home}/common/lib/3rdparty.jar"/>
>>>           </classpath>
>>>       </java>
>>>
>>> -----snip--8<-----
>>>
>>> By including ${jsps} in the <arg> element we walk off the 
>end of the 
>>> Windows command line's max character limit. Does anyone have a 
>>> reliable 
>>> method for splitting a fileset and then iterating through the 
>>> resultant 
>>> subsets?
>>>
>>> cheers,
>>>
>>> Tim Pettersen
>>>
>>> +61 431 270 753 mobile
>>> tim@atlassian.com
>>> http://www.atlassian.com
>>>
>>> ATLASSIAN
>>> Our products help over 6,500 organisations in more than 88 
>countries 
>>> collaborate brilliantly. http://www.atlassian.com/
>>>
>>> 
>---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>>     
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>   
>
>-- 
>Tim Pettersen
>+61 431 270 753 mobile
>tim@atlassian.com
>http://www.atlassian.com
>
>ATLASSIAN
>Our products help over 6,500 organisations in more than 88 
>countries collaborate brilliantly. http://www.atlassian.com/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message