AW: classpath order wierdness

2007-11-21 Thread Rainer Noack
Take a look at http://enitsys.sourceforge.net/ant-classloadertask/ Cheers Rainer Noack -Ursprüngliche Nachricht- Von: Hunter Peress [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 20. November 2007 02:36 An: Ant Users List Betreff: classpath order wierdness *First the build file: *

AW: How do I set a classpath for my custom task?

2007-11-21 Thread Rainer Noack
Hi Todd, the problem is your call to Class.forName(String) in ...Engine. This uses Engine's Classloader. There are the following ways to add user-defined classes: 1. let the user add them to the classpath of the task's classloader or a one of it's parents by 1.1. specify them in 's classpath-att

Re: How do I set a classpath for my custom task?

2007-11-21 Thread todd runstein
The project is non platform specific, so it can run in a container, in a swing app, or from the command line. The project applies schema changes to a database. The user creates a class that implements a single interface, adding code that the project uses to apply the changes. I've currently got

RE: How do I set a classpath for my custom task?

2007-11-21 Thread Martin Gainty
Hi Todd-Could you provide a bit more contextWill you be implementing this (web)application under J2EE server -or- perhaps a container such as Catalina or Jetty?Generally these environments support their own classloader loading algorithms depending on the capability and security characteristics

Re: How do I set a classpath for my custom task?

2007-11-21 Thread todd runstein
Gilles, The user is providing implementations of an interface I provide. Then my code (which is called from my ant task) calls interface methods. So I'm not using reflection to call the method, just to get an instance of the users class. Can you point me to any code that shows how to "create a c

Re: List/Download folder from http?

2007-11-21 Thread Gilles Scokart
The problem is that it will depends on your server. The http server must be configure to list the content of the directory. And it will do that using some specific format that the listing code will have to parse. However, I asume that different http server can provide this listing using differen

Re: How do I set a classpath for my custom task?

2007-11-21 Thread Gilles Scokart
That depends on how you want to invoke the code of the user. If you are using only reflection to creates the object, but also to invoke the method. The, it is easier. You only have to create a classloader defined with the user classpath. If you are only using reflection to create an instance o th

List/Download folder from http?

2007-11-21 Thread jonathan doklovic
Hi, I need to write a target that can download all xml files from a folder on a web server. I know I can use the get task to get a specific file, as well as using VFS to do the same, but I haven't found any way to get an entire folder of files. I would really like something like this: http://my

Re: Ant native2ascii problem

2007-11-21 Thread Andrew Goktepe
What are the attributes and values you are providing to the Ant task? What are the arguments you are passing to native2ascii on the command line? For troubleshooting purposes, also make sure that the JAVA_HOME containing the native2ascii that you are running from the command line is the same JAVA

Re: Excluding files from the apt tool

2007-11-21 Thread walkingMan
Your ant script change below worked! THanks David Weintraub wrote: > > Have you tried using to define your source instead of the > "sourcepath" attribute? > > > fork="true" > debug="true" > verbose="yes" > destdir="${target.dir}"> > > > > > >

Re: Excluding files from the apt tool

2007-11-21 Thread David Weintraub
Have you tried using to define your source instead of the "sourcepath" attribute? * * On Nov 21, 2007 12:11 PM, walkingMan <[EMAIL PROTECTED]> wrote: > > > Hi, > > I am using an ant script to build a war file. But before it can do that it > mus

Excluding files from the apt tool

2007-11-21 Thread walkingMan
Hi, I am using an ant script to build a war file. But before it can do that it must process some annotations in some source files. In my src directory are all my .java files plus a log4j.properties file. I pass in the source directory to the apt ant task but it complains about the log4j.

Re: Specify non-top level target

2007-11-21 Thread David Weintraub
Actually, the problem is solved with Eclipse itself. Eclipse can filter out all targets that don't have a description parameter. Use this feature, and names themselves don't matter so much. This also works in the command line since "ant -projecthelp" will only print out targets that have a descript

Re: How do I set a classpath for my custom task?

2007-11-21 Thread todd runstein
Ramu, Thanks for the suggestions. I've looked at both of these options, but since this is a custom task that I'd like to include with an open source project, neither of those options are ideal. In the "taskdef", I'd like the user of my task to only have to specify where my jar file is. However,

Ant native2ascii problem

2007-11-21 Thread Cool Coder
Hello Group, I have some problem with native2ascii ant task for non-english languages. When I run native2ascii task through ant task it generates some junk characters for portuguese characters e.g. Input char: Efectuar ligação Output : Efectuar liga\ufffd\ufffdo But if

RE: Specify non-top level target

2007-11-21 Thread Gilles Scokart
The problem with ~ is that it has a special meaning in unix command line. If you have a user having the name of the target, you will have to escape it. Unfortunately, there is no ascii characters after ~. Maybe starting the top level target by an uppercase and using _ might work. Gilles > --

Re: Specify non-top level target

2007-11-21 Thread mjdenham
Thanks for all those great ideas everybody. Two ideas that I liked the most were: 1. add a description to the target, making it non-internal. Then click the "Hide Internal Targets" toolbar button in Eclipse ant View. 2. Use a special prefix for internal ant targets. The standard seems to be '-

RE: Specify non-top level target

2007-11-21 Thread Gilles Scokart
I also use target names starting with / for the targets that just set some properties modifying the behaviour of whatever is executed after (for example '/offline', '/notest'). This doesn't change anything to visibility (they are callable from command line), but regroup them logically, even when

RE: Tool for documenting Ant scripts

2007-11-21 Thread Rebhan, Gilbert
-Original Message- From: Hans Schwaebli [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 21, 2007 8:59 AM To: Ant Users List Subject: RE: Tool for documenting Ant scripts /* Thank you. But it does not seem to be the tool I have seen a while ago. The tool could reverse engineer

RE: Tool for documenting Ant scripts

2007-11-21 Thread Rebhan, Gilbert
-Original Message- From: Hans Schwaebli [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 21, 2007 8:59 AM To: Ant Users List Subject: RE: Tool for documenting Ant scripts /* Thank you. But it does not seem to be the tool I have seen a while ago. The tool could reverse engineer t