problem with ant task
Hi All, I am trying to run JiBX Binding Compiler using below ANT script --- --- and I am getting below error: --- Running binding compiler version jibx-beta3c org.jibx.runtime.JiBXException: Error running binding compiler Root cause: java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException at org.jibx.binding.Compile.compile(Compile.java:314) at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:238) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeTarget(Project.java:1214) at org.apache.tools.ant.Project.executeTargets(Project.java:1062) at org.apache.tools.ant.Main.runBuild(Main.java:673) at org.apache.tools.ant.Main.startAnt(Main.java:188) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) Caused by: java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException at org.jibx.binding.Utility.loadBinding(Utility.java:225) at org.jibx.binding.Utility.loadFileBinding(Utility.java:254) at org.jibx.binding.Compile.compile(Compile.java:291) at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:238) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeTarget(Project.java:1214) at org.apache.tools.ant.Project.executeTargets(Project.java:1062) at org.apache.tools.ant.Main.runBuild(Main.java:673) at org.apache.tools.ant.Main.startAnt(Main.java:188) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) Cause: java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException at org.jibx.binding.Utility.loadBinding(Utility.java:225) at org.jibx.binding.Utility.loadFileBinding(Utility.java:254) at org.jibx.binding.Compile.compile(Compile.java:291) at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:238) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeTarget(Project.java:1214) at org.apache.tools.ant.Project.executeTargets(Project.java:1062) at org.apache.tools.ant.Main.runBuild(Main.java:673) at org.apache.tools.ant.Main.startAnt(Main.java:188) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) --- Even though I have the required jars in classpath set in the ant script still I am getting the above errors. Can anyone please tell me what am I missing here ... Thanks & Regards, Kumar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classfileset Confusion
Hi everyone, I've been struggling with classfileset quite a bit in the last couple of days and I'm afraid I'm just as confused now as I when I started out. Maybe it's time to take a step back and ask a conceptual question or two. Given a single root class, named mydomain.foo.Foo.class, which resides in a package called mydomain.foo that is situated in a directory called foo, can I construct a classfileset that contains all of the classes upon which class mydomain.foo.Foo.class depends, directly AND indirectly, even if they are in different packages and directories? Or is classfilepath only capable of finding direct dependents and/or dependents that are in the same package as the root class? Here is my situation explained in a graphical manner. The main new code that I have written is in directory 'foo' which contains two packages, 'mydomain.foo' and 'mydomain.foo.Resources'. Package mydomain.foo contains three classes: - Foo - FooConstants - FooPreferences Package mydomain.foo.Resources contains a variety of List, Text, and Message resource bundles used by class Foo and class FooPreferences. Class Foo is dependent on all of the items in these two packages. However, only the List resource bundles actually involve class files; the other two resource bundle types only result in .properties files. IN ADDITION, class FooPreferences has direct dependencies on these classes: - AnimationPanel - AudioPanel - DigitalCountdownPanel - DigitalClockPanel all of which are in package mydomain.common AND - LocalizationUtils - LogUtils - PreferenceUtils - ReflectionUtils, all of which are in package mydomain.common.utilities. All of the packages whose names begin 'mydomain.common' are in a directory called 'common'. IN TURN, these classes have dependencies of their own, all of which are also found in packages beginning with 'mydomain.common'. Therefore, they are all found in directory 'common' too. There are a lot of classes in the 'common' directory, many of which are not needed by class Foo to do its job, and they are organized into a variety of packages, many of which Foo doesn't need, so I was hoping to construct a jar that contained only the classes needed by Foo or its dependents. However, I would be willing to simplify my requirement to having only the packages needed by Foo to do its job, even if that means having several classes in the jar that Foo will never use. I'm finding the documentation about classfileset confusing at best so I truly can't tell if I have unrealistic expectations of 'classfileset' or if I am just writing my definition incorrectly. It would really help me if someone could confirm categorically that a classfileset will contain all direct AND INDIRECT dependencies of the root class, even if they reside in different packages and directories than the root class. If classfileset is capable of recursing to other packages in the same and different directories, how do I make that happen? Right now, my classfileset definition - is returning only these three classes: Foo, FooConstants, and FooPreferences, in other words the immediate dependents of the root class that are in the same package. The other immediate dependents that are in another package in the same directory are NOT being picked up, nor are the dependents in other packages under the common directory being picked up. If it is possible to incorporate all direct and indirect dependencies of my root class in my classfileset, even if those depedent classes reside in different packages and jars, what do I need to change in my definition to make that happen? I have tried everything I could think of without success. Your assistance with this would be VERY VERY greatly appreciated. Rhino --- rhino1 AT sympatico DOT ca "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." - C.A.R. Hoare -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 25/01/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Simple problem with ANT
Hello, I´m new with this, and i hope you can help me with this too simple problem.. I have this fille: The problem it´s that just create the folder "a", Thanks a lot. AM. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple problem with ANT
You have two targets with the same name. This is the problem. - Alexey. Alvaro Andrés Montañez wrote: Hello, I´m new with this, and i hope you can help me with this too simple problem.. I have this fille: The problem it´s that just create the folder "a", Thanks a lot. AM. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- / Alexey N. Solofnenko home: http://trelony.cjb.net/ / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ant: Redirect output to both screen and log file
When I use and specify output, all the output is redirected from the display to the log file. I want to be able to also view the output as it runs. Is there any way to send both standard out and standard error simultaneously to both a log file and the display? I'm basically looking for the equivalent to the csh "tee" command: % cmd |& tee log -Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple problem with ANT
Just a thought, but I believe you shouldn´t name both targets as "tar1"; try to name the second target as "tar2" and then invoke it from ant as usual $ ant tar2 Should work. HTH luis -Original Message- From: Alvaro Andrés Montañez [mailto:[EMAIL PROTECTED] Sent: Saturday, January 29, 2005 10:01 AM To: user@ant.apache.org Subject: Simple problem with ANT Hello, I´m new with this, and i hope you can help me with this too simple problem.. I have this fille: The problem it´s that just create the folder "a", Thanks a lot. AM. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple problem with ANT
I have to do this: But it´s rare, i don´t undestand, why doesn´t work like this: Thanks to all! On Sat, 29 Jan 2005 08:56:09 -0800, Conelly, Luis (GE Energy, Non GE, GENE) <[EMAIL PROTECTED]> wrote: > Just a thought, but I believe you shouldn´t name both targets as "tar1"; try > to name the second target as "tar2" and then invoke it from ant as usual > > $ ant tar2 > > Should work. > > HTH > luis > > > -Original Message- > From: Alvaro Andrés Montañez [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 29, 2005 10:01 AM > To: user@ant.apache.org > Subject: Simple problem with ANT > > > Hello, > > I´m new with this, and i hope you can help me with this too simple problem.. > > I have this fille: > > > > > > > > > > > > > > The problem it´s that just create the folder "a", > > Thanks a lot. > > AM. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple problem with ANT
Looking at your buildfile, the thing is you have to call tar2 instead of tar1 I have tried this sligthly modified version of your script and works like a charm: - - As you can see, the only difference is the default target invoked in the section Give it a try Luis -Original Message- From: Alvaro Andrés Montañez [mailto:[EMAIL PROTECTED] Sent: Saturday, January 29, 2005 11:01 AM To: Ant Users List Subject: Re: Simple problem with ANT I have to do this: But it´s rare, i don´t undestand, why doesn´t work like this: Thanks to all! On Sat, 29 Jan 2005 08:56:09 -0800, Conelly, Luis (GE Energy, Non GE, GENE) <[EMAIL PROTECTED]> wrote: > Just a thought, but I believe you shouldn´t name both targets as "tar1"; try > to name the second target as "tar2" and then invoke it from ant as usual > > $ ant tar2 > > Should work. > > HTH > luis > > > -Original Message- > From: Alvaro Andrés Montañez [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 29, 2005 10:01 AM > To: user@ant.apache.org > Subject: Simple problem with ANT > > > Hello, > > I´m new with this, and i hope you can help me with this too simple problem.. > > I have this fille: > > > > > > > > > > > > > > The problem it´s that just create the folder "a", > > Thanks a lot. > > AM. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant: Redirect output to both screen and log file
You use records for that. You surround any task with your recorder and get a copy of screen output to a (specified) file. Example: This is cool --- Douglas Kramer <[EMAIL PROTECTED]> a écrit : > When I use and specify output, all the output is redirected > from the display to the log file. > > > > I want to be able to also view the output as it runs. > Is there any way to send both standard out and standard error > simultaneously to both a log file and the display? > > I'm basically looking for the equivalent to the csh "tee" command: > > % cmd |& tee log > > -Doug > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ant: file exists
Is there a way to test whether a file exists? I googled ant.apache.org for "file exists", looked at conditional, etc to no avail. -Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant: file exists
On Jan 29, 2005, at 3:40 PM, Douglas Kramer wrote: Is there a way to test whether a file exists? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
manipulating property strings
Is there a way to manipulate the contents of a multi-line property string as if it were a file? Right now I collect stderr of an exec to a temp-file (error="filename") then read the temp-file and manipulate via filterchain, storing into a property, as in: ... ...then deleting the temp-file. I'm looking for a more elegant solution. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant: file exists
Thanks. Okay, great so far... but I also need to excute a statement if the property is true, something like this: if [ -f filename ]; then echo "File exists"; fi -Doug Erik Hatcher wrote: On Jan 29, 2005, at 3:40 PM, Douglas Kramer wrote: Is there a way to test whether a file exists? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant: file exists
For the curious, this is it. When calling the run task, a symlink is created if it does not exist. Douglas Kramer wrote: Thanks. Okay, great so far... but I also need to excute a statement if the property is true, something like this: if [ -f filename ]; then echo "File exists"; fi -Doug Erik Hatcher wrote: On Jan 29, 2005, at 3:40 PM, Douglas Kramer wrote: Is there a way to test whether a file exists? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ant: create file if none exists
Okay, try again. Need to create a file (actually a symlink) if none exists. Is there a way to set a property true if a resource does *not* exist? DETAIL The dosomething task will do something only if the file exists. I tried using , but it won't work, because the "not" operation of "is not set" is not true. Ideas? I don't see a NotAvailable task. -Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant: create file if none exists
Found "unless" attribute of target. This simpler version works if ${MYFILE} resource is a file or directory, but fails if a symlink (which is what I devised this for). Am bummed out. -Doug Douglas Kramer wrote: Okay, try again. Need to create a file (actually a symlink) if none exists. Is there a way to set a property true if a resource does *not* exist? DETAIL The dosomething task will do something only if the file exists. I tried using , but it won't work, because the "not" operation of "is not set" is not true. Ideas? I don't see a NotAvailable task. -Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant: create file if none exists
You can also look at the task (part of the ant-contrib project in SourceForge) which along with the standard condition tasks will allow you to do the following --- Douglas Kramer <[EMAIL PROTECTED]> wrote: > Found "unless" attribute of target. > > This simpler version works if ${MYFILE} resource is > a file or directory, > but fails if a symlink (which is what I devised this > for). > > > property="file.exists" value="true" /> > > > unless="file.exists"> > > > > Am bummed out. > > -Doug > > Douglas Kramer wrote: > > Okay, try again. > > > > Need to create a file (actually a symlink) if none > exists. > > > > Is there a way to set a property true if a > resource does *not* exist? > > > > > > DETAIL > > > > > The dosomething task will do something only if the > file > > exists. > > > > > >property="file.exists" value="true" /> > > > > > > > >if="file.exists"> > > > > > > > > I tried using , but it won't work, because > the "not" > > operation of "is not set" is not true. > > > > > > > > > > property="file.exists" > > value="true" /> > > > > > > > > > > Ideas? I don't see a NotAvailable task. > > > > -Doug > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]