|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Not reading from jar when unzipped it works...hi
Am using a 3rd party jar in my ant script for xml manipulation.the jar file i placed in a folder in my workspace. it is working if i unzip my jar and keep it but it is not working if i keep the jar as such. my code is as below <path id="lib.path"> <fileset dir="${PROJECT_DIR}/ant" includes="${PROJECT_DIR}/ant/*.jar"/> </path> <typedef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpathref="lib.path" /> it says the class com.oopsconsultancy.xmltask.ant.XmlTask is not found. please help urgent |
|
|
Re: Not reading from jar when unzipped it works...Hi,
You should specify "includes" value relatively to the "dir" attribute of the <fileset>, i.e.: <path id="lib.path"> <fileset dir="${PROJECT_DIR}/ant" includes="*.jar"/> </path> Or also: <path id="lib.path"> <fileset dir="${PROJECT_DIR}" includes="ant/*.jar"/> </path> BR, Olivier *Olivier Gies* *Delivery Manager Customs & Tax Software Engineering Center Bull, Architect of an Open World ^TM Phone: +86 (10) 65978001 - Ext 555 * *www.bull.com <http://www.bull.com/>* *This e-mail contains material that is confidential for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.* -------- Original Message -------- Subject: Not reading from jar when unzipped it works... From: Aravind_RP <AravindR_Pillai@...> To: user@... Date: 09/07/2008 15:03 > hi > Am using a 3rd party jar in my ant script for xml manipulation.the jar file > i placed in a folder in my workspace. > it is working if i unzip my jar and keep it but it is not working if i keep > the jar as such. my code is as below > <path id="lib.path"> > <fileset dir="${PROJECT_DIR}/ant" > includes="${PROJECT_DIR}/ant/*.jar"/> > </path> > > <typedef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" > classpathref="lib.path" /> > > it says the class com.oopsconsultancy.xmltask.ant.XmlTask is not found. > please help urgent --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
How to echo the classpathref?For debugging purpose I want to echo the actual classpathref. But it does not work by using something like this:
<path id="all.you.can.need.class.path"> <fileset dir="${eclipse-home}/plugins"> <include name="**/*.jar"/> </fileset> </path> <target name="echo"> <echo>${all.you.can.need.class.path}</echo> </target> It prints nothing although there are jars in this dir. Any idea how to echo it? |
|
|
RE: How to echo the classpathref?-----Original Message----- From: Hans Schwaebli [mailto:hans_schwaebli@...] Sent: Wednesday, July 09, 2008 9:43 AM To: Ant Users List Subject: How to echo the classpathref? /* For debugging purpose I want to echo the actual classpathref. But it does not work by using something like this: <path id="all.you.can.need.class.path"> <fileset dir="${eclipse-home}/plugins"> <include name="**/*.jar"/> </fileset> </path> <target name="echo"> <echo>${all.you.can.need.class.path}</echo> </target> It prints nothing although there are jars in this dir. Any idea how to echo it? */ <echo>${toString:all.you.can.need.class.path}</echo> the ${toString: ...} has all files in a comma separated list Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
RE: How to echo the classpathref?Hi!
I usually use a macro such as: <!-- Macro for echoing an entire fileset by reference --> <macrodef name="echo-fileset"> <attribute name="filesetref" /> <sequential> <pathconvert pathsep="${line.separator}" property="@{filesetref}.echopath" refid="@{filesetref}"/> <echo> ------- echoing fileset @{filesetref} -------</echo> <echo>${@{filesetref}.echopath}</echo> </sequential> </macrodef> And then: <target name="print"> <echo-fileset filesetref="all.you.can.need.class.path"/> </target> This gives me the opportunity to convert the path separator and such. //daniel -----Original Message----- From: Hans Schwaebli [mailto:hans_schwaebli@...] Sent: den 9 juli 2008 09:43 To: Ant Users List Subject: How to echo the classpathref? For debugging purpose I want to echo the actual classpathref. But it does not work by using something like this: <path id="all.you.can.need.class.path"> <fileset dir="${eclipse-home}/plugins"> <include name="**/*.jar"/> </fileset> </path> <target name="echo"> <echo>${all.you.can.need.class.path}</echo> </target> It prints nothing although there are jars in this dir. Any idea how to echo it? --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: How to echo the classpathref?Daniel Gröndal schrieb:
> Hi! > > I usually use a macro such as: > > <!-- Macro for echoing an entire fileset by reference --> > <macrodef name="echo-fileset"> > <attribute name="filesetref" /> > <sequential> > <pathconvert pathsep="${line.separator}" property="@{filesetref}.echopath" refid="@{filesetref}"/> > <echo> ------- echoing fileset @{filesetref} -------</echo> > <echo>${@{filesetref}.echopath}</echo> > </sequential> > </macrodef> > > And then: > > <target name="print"> > <echo-fileset filesetref="all.you.can.need.class.path"/> > </target> > > This gives me the opportunity to convert the path separator and such. if it's only for a simple echoing - similar to those System.out ... statements, lowlevel debugging, i would use the ${toString:...} stuff, otherwards if specific delimiter needed i would use a macrodef/scriptdef with pathconvert as you suggested. btw. the ant editor of eclipse (using 3.2.2 on Windows) gives a popup window with the files included when using ${toString:...] and mouse over. Same behaviour on similar attributes f.e. <javac classpathref="..." Edit your antscript, save and the popup get's updated, when mouse over again. Would be nice to see how they did it ? I think they have to use the ant api somehow !? Are there any official api docs available, has anybody more details about or do i have to dig myself in org.eclipse. ... ? Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
| Free Forum Powered by Nabble | Forum Help |