Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Antoine Levy-Lambert
On 1/19/11 9:46 PM, Michael Ludwig wrote: > But I still haven't understood the underlying issue. What's so special about > mail.jar that it needs special treatment? It *could* be that instead of just using the classloader of mail.jar ... to look for other classes of mail.jar or activation.jar it wa

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Michael Ludwig
Michael Ludwig schrieb am 19.01.2011 um 13:51 (+0100): > Patrick Martin schrieb am 19.01.2011 um 10:31 (+0100): > > D:\tmp\build.xml:7: taskdef A class needed by class > > org.apache.tools.ant.taskdefs.email.MimeMailer cannot be found: > > javax/mail/MessagingException > > using the classloader A

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Michael Ludwig
Antoine Levy-Lambert schrieb am 19.01.2011 um 18:51 (-0500): > Adding for clarity that the reason why the classloader task helps in > this case is that mail.jar and activation.jar contain factory classes > which cannot be loaded from the loader of the mail task directly if > mail.jar and activation

Re: Terminate an Ant target

2011-01-19 Thread Michael Ludwig
Antoine Levy-Lambert schrieb am 19.01.2011 um 15:22 (-0500): > > To find out the process number, there is a tool called pv.exe from > teamcti which can list Windows processes with the full command line, > provided the proper format option. Great tool - thanks for sharing this information. -- Mi

Re: Execution classpath question for taskdef

2011-01-19 Thread Antoine Levy-Lambert
On 1/19/11 2:54 PM, Michael Ludwig wrote: > > There was another thread today where the same issue arose: > > Mail task with mail.jar & activation.jar out of lib folder > > r L 19.01.11 10:31+0100 Patrick Martin57 Mail task […] > L 19.01.11 11:19+0100 Patrick Martin87 ├─> > F 19.

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Antoine Levy-Lambert
Adding for clarity that the reason why the classloader task helps in this case is that mail.jar and activation.jar contain factory classes which cannot be loaded from the loader of the mail task directly if mail.jar and activation.jar were not in $ANT_HOME/lib or another directory picked up at star

Re: Execution classpath question for taskdef

2011-01-19 Thread Antoine Levy-Lambert
On 1/19/11 3:26 PM, dave.alvar...@cartridgeorder.com wrote: > Let me ask this clarification question before answering yours ... > > 1. The taskdef "classpath" attribute is NOT what is used when the taskdef is > actually executed. Correct? Wrong, the classpath nested element or attribute is used.

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Peter Reilly
url of: http://enitsys.sourceforge.net/ant-classloadertask/ Peter On Wed, Jan 19, 2011 at 8:16 PM, Antoine Levy-Lambert wrote: > Hello Patrick, > > it is possible to do this using the classloader task of jtools > > classname="org.apache.tools.ant.taskdefs.ClassloaderTask"> > > > > > > >

Re: Execution classpath question for taskdef

2011-01-19 Thread dave.alvarado
Let me ask this clarification question before answering yours ... 1. The taskdef "classpath" attribute is NOT what is used when the taskdef is actually executed. Correct? The output of what I get from running my custom task is below. Note that the NoClassDefFoundError is complaining about a c

Re: Terminate an Ant target

2011-01-19 Thread Antoine Levy-Lambert
Hi, on the JUnit leg of your parallel invocation, you need to use a script to kill your http server. Depending on your operating system you could use pskill from sysinternals (Windows) or just kill (UNIX). To find out the process number, there is a tool called pv.exe from teamcti which can l

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Antoine Levy-Lambert
Hello Patrick, it is possible to do this using the classloader task of jtools classname="org.apache.tools.ant.taskdefs.ClassloaderTask"> here is the snippet of my ivy.xml with the dependencies conf="classloadertask->default"> so you do not need to redefine the mail task but pu

Re: exec (and apply) tasks cut off the output

2011-01-19 Thread Gilbert Rebhan
Original Message Subject: exec (and apply) tasks cut off the output From: Hudson To: user@ant.apache.org Date: Wed Jan 19 2011 15:10:39 GMT+0100 (CET) > Hello, > > I try to build my project with the following ant statement. >resultproperty="buildresult"> > >

Re: Execution classpath question for taskdef

2011-01-19 Thread Michael Ludwig
dave.alvar...@cartridgeorder.com schrieb am 19.01.2011 um 13:30 (-0600): > I have discovered that the "classpath" and "claspathref" elements that > are part of the taskdef are not used during run time Are you sure? How did you discover that? There was another thread today where the same issue ar

Execution classpath question for taskdef

2011-01-19 Thread dave.alvarado
Hi, I'm using Ant 1.8. I have created a custom task, but I need to include a jar file in the classpath when this task is exected. How do I include such a jar file? I'm using Ant 1.8. Here is the definition of the task ...

Re: java script error in imported ant file

2011-01-19 Thread Michael Ludwig
ritchie schrieb am 19.01.2011 um 07:03 (-0800): > > I have a build file -A.xml which imports another build file -B.xml and > runs the targets in the imported file. File B has multiuple targets > and one of the targets has a java script. In the java script i have a > line of code which says " Bproj

java script error in imported ant file

2011-01-19 Thread ritchie
I have a build file -A.xml which imports another build file -B.xml and runs the targets in the imported file. File B has multiuple targets and one of the targets has a java script. In the java script i have a line of code which says " Bproject.setProperty("newtoken", result);" , Bproject is the na

exec (and apply) tasks cut off the output

2011-01-19 Thread Hudson
Hello, I try to build my project with the following ant statement. There are some lines missing in the output from time to time (~50%). Does anybody has the same Problem? Do you need further information? I couldn't find any help in the net so far.

Re: Terminate an Ant target

2011-01-19 Thread Michael Ludwig
Jan C. schrieb am 19.01.2011 um 14:00 (+0100): > what I meant is that I don't start the server from my java class so I > can't call > > embedded.destroy(); Which is why I tried to refer you to the

Re: Terminate an Ant target

2011-01-19 Thread Jan C.
what I meant is that I don't start the server from my java class so I can't call > embedded.destroy(); ;) On Wed, Jan 19, 2011 at 12:31 PM, Michael Ludwig wrote: > Jan C. schrieb am 19.01.2011 um 11:26 (+0100): >> I'm not starting the SimpleHTTPServer programmatically so I >> don't have any ref

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Michael Ludwig
Patrick Martin schrieb am 19.01.2011 um 10:31 (+0100): > > Is it possible to use the task without having activation.jar > and mail.jar in the ant lib folder? Well, ant-javamail.jar depends on classes from mail.jar, so that one is required. Not sure about activation.jar, though. That one will lik

Re: Terminate an Ant target

2011-01-19 Thread Michael Ludwig
Jan C. schrieb am 19.01.2011 um 11:26 (+0100): > I'm not starting the SimpleHTTPServer programmatically so I > don't have any reference to the instance. You don't have a reference, but you do start the server programmatically. ;-) > >> > >> > >>     > >>       > >>         >> classname="org.a

Re: Terminate an Ant target

2011-01-19 Thread Jan C.
Hi, I'm not starting the SimpleHTTPServer programmatically so I don't have any reference to the instance. cheers, Jan On Wed, Jan 19, 2011 at 11:21 AM, Michael Ludwig wrote: > Jan C. schrieb am 19.01.2011 um 10:17 (+0100): >> My JUnit test need a http server so I also start one in my test: >> >>

Re: Terminate an Ant target

2011-01-19 Thread Michael Ludwig
Jan C. schrieb am 19.01.2011 um 10:17 (+0100): > My JUnit test need a http server so I also start one in my test: > > > > > > classname="org.apache.axis2.transport.http.SimpleHTTPServer" > > ... > > > > ... > > > > > > The problem I

Re: Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Patrick Martin
Hello, I just realized that the correct class shuold probably be org.apache.tools.ant.taskdefs.email.EmailTask. But I still end up with an error: java.lang.ClassNotFoundException: javax.activation.DataHandler Thanks, Patrick On Wed, Jan 19, 2011 at 10:31 AM, Patrick Martin wrote: > Hello, > >

Mail task with mail.jar & activation.jar out of lib folder

2011-01-19 Thread Patrick Martin
Hello, Is it possible to use the task without having activation.jar and mail.jar in the ant lib folder? I tried to redefine the mail task this way: But it did not work. I keep on getting the following error: D:\tmp\build.

Terminate an Ant target

2011-01-19 Thread Jan C.
Hello, I use ant to run some JUnit test. My JUnit test need a http server so I also start one in my test: ... ... The problem I have is that the SimpleHTTPServer is running forever so even when my JUnit test finish successfully, the