ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Why can't Ant find my class?
Date Mon, 23 Feb 2004 18:16:51 GMT
Did you do  a jar tf on the FixCRLFFilter.jar ?
It may have included ant classes like "ChainableReader", thus
giving the strange NoClassDefFoundError messages.

The follows works for me:

<project default="testreader">
  <target name="testreader">
    <delete dir="myclasses"/>
    <mkdir dir="myclasses"/>
    <javac srcdir="src" destdir="myclasses">
      <include name="StripLineBreaks.java"/>
    </javac>
    <jar jarfile="striplinebreaks.jar">
      <fileset dir="myclasses"/>
    </jar>
    <delete dir="outdir"/>
    <mkdir dir="outdir"/>
    <copy todir="outdir">
      <fileset dir="src" includes="**/*.java"/>
      <filterchain>
        <filterreader classname="StripLineBreaks"
                      classpath="${basedir}/striplinebreaks.jar"/>
      </filterchain>
    </copy>
  </target>
</project>

Where StripLineBreaks is a copy of the ant StripLineBreaks file, with
changes to the package and imports.

Peter

Ben Pracht wrote:

> Matt Benson wrote:
>
>> --- Ben Pracht <bpracht@nc.rr.com> wrote:
>>
>>> Here's how I build it:
>>>         <javac srcdir="${filtered_source}/source"
>>
>>
>> ...
>>
>>>         <jar
>>>
>>
>> jarfile="${build_java}/FixCRLFFilter/FixCRLFFilter.jar"
>>
>>>             manifest="${build_java}/FixCRLFFilter/manifest.mft"
>>>              basedir="${build_java}/class"
>>>              includes="*.class"
>>>         />
>>
>>
>>
>> I hate to predict the behavior of the <jar> task
>> here... can you post the output of "jar tf
>> FixCRLFFilter.jar"?
>>
>> Thanks,
>> Matt
>>
>> __________________________________
>> Do you Yahoo!?
>> Yahoo! Mail SpamGuard - Read only the mail you want.
>> http://antispam.yahoo.com/tools
>
> META-INF/
> META-INF/MANIFEST.MF
> FixCRLFFilter.class
> StandaloneTestFilter.class
>
> Note that StandaloneTestFilter.class was initially used for testing 
> outside of Ant.  I've since moved away from this.
>
> Ben
>
>
>
> ---------------------------------------------------------------------
> 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