Cool! Thanks!
Chuck
On Aug 18, 2006, at 3:30 PM, Bob Schwarzmann wrote:
> Here's the wocompile example from the objectstyle website modified
> to show the new "dumpclasspath" property (you can use any name for
> the "anyname.wocompile.classpath"):
>
> <taskdef name="wocompile" classname="
> org.objectstyle.woproject.ant.WOCompile"/>
>
> <wocompile srcdir="Java" destdir="classes"
> debug="on"
> optimize="off"
> deprecation="on"
> dumpclasspath="anyname.wocompile.classpath">
>
> <frameworks dir="${build.root}">
> <include name="JavaWOExtension.framework"/>
> <include name="ER*.framework"/>
> <include name="PRLogic.framework"/>
> <exclude name="ERNeutralLook.framework"/>
> </frameworks>
>
> <frameworks dir="${wo.localroot}">
> <include name="Mysql*.framework"/>
> </frameworks>
>
> <classpath>
> <fileset dir="Libraries" includes="**/*.jar" />
> </classpath>
> </wocompile>
>
> <echo message="The classpath just used by wocompile was: $
> {anyname.wocompile.classpath}" />
>
>
> On 8/18/06, Sébastien Sahuc <lis..ahuc.net> wrote:
> Bob,
>
> The debug aspect can indeed help tremendously. Willing to share
> with the list a simple example of ant construct that would echo the
> classpath to the console ?
>
> Thanks
>
> Sébastien
>
> PS: I committed both this patch and the other one you sent for
> woproject. Thanks again.
>
> On Aug 18, 2006, at 2:07 PM, Bob Schwarzmann wrote:
>
>> Hi,
>>
>> I filed an enhancement:
>> http://objectstyle.org/jira/browse/WOL-253
>>
>> I find myself needing to know the classpath that woproject
>> constructs for later use in ant. For example, findbugs uses the
>> classpath to do a more exhaustive analysis. Passing a property for
>> woproject to set seems like an easy way of getting this done.
>> Another use would be for debugging the classpath without turning
>> on the massively verbose -debug.
>>
>> Below is my proposed fix for review.
>>
>> Cheers,
>> -Bob.
>>
>> Index: woproject/src/java/org/objectstyle/woproject/ant/
>> WOCompile.java
>> ===================================================================
>> --- woproject/src/java/org/objectstyle/woproject/ant/
>> WOCompile.java (revision 2998)
>> +++ woproject/src/java/org/objectstyle/woproject/ant/
>> WOCompile.java (working copy)
>>.. -71,8 +71,17 @@
>> frameworkSets.add (frameworks);
>> }
>>
>> + private String dumpClasspath;
>> +
>> + public void setDumpClasspath( String dumpClasspath ){
>> + this.dumpClasspath = dumpClasspath;
>> + }
>> +
>> public void execute() throws BuildException {
>> setClasspath(FrameworkSet.jarsPathForFrameworkSets
>> (getProject(), frameworkSets, false));
>> + if( dumpClasspath != null ){
>> + getProject().setProperty( dumpClasspath, getClasspath
>> ().toString() );
>> + }
>> super.execute();
>> }
>> }
>>
>
>
--Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects
This archive was generated by hypermail 2.0.0 : Fri Aug 18 2006 - 18:58:08 EDT