[Patch] Related Projects

2004-05-07 Thread Nick Chalko
Here is an update to the Related Projects page. 
The Centipede project is no more, Antworks has taken it place

R,
Nick

Index: xdocs/projects.xml
===
RCS file: /home/cvspublic/ant/xdocs/projects.xml,v
retrieving revision 1.14
diff -u -r1.14 projects.xml
--- xdocs/projects.xml  20 Feb 2004 08:13:37 -  1.14
+++ xdocs/projects.xml  7 May 2004 06:08:37 -
@@ -145,7 +145,42 @@
   
 
   
+  
 
+The antworks project is a set of tools and standardized targets that
+greatly simplifies using ant in your project.
+
+The driver behind antworks is Importer. Importer is an extension 
to the
+ant import task that will download and
+cache an ant build.xml file and it's associated resources called
+antlets.  Antlets are available for Java compiling
+and packaging,  JUnit, Forrest, J2EE and 
+http://antworks.sourceforge.net/antlets/";>more.
+
+
+See the http://antworks.sourceforge.net/start.html 
">Getting Started 
+guide for more information.
+
+
+
+  
+Compatibility:
+1.6 an later
+  
+  
+URL:
+http://antworks.sourceforge.net/";>http://antworks.sourceforge.net/index.html
+  
+  
+Contact:
+http://lists.sourceforge.net/lists/listinfo/antworks-developers";>Antworks 
Developers mailing lists
+  
+  
+License:
+The Apache License 2.0
+  
+
+  
   
 
 CruiseControl is a tool for setting up a continuous build
@@ -203,43 +238,7 @@
   
 
 
-  
 
-Krysalis Centipede is a project build system based on
-Apache Ant. Centipede uses pre-packaged modules called "cents"
-that it downloads and installs automatically.  Cents can be
-used as Ant tasks or easy to use targets.
-
-For example, Forrest is an XML standards oriented project
-documentation framework based on Apache Cocoon. In order to
-assist your projects adoption of this powerful documentation
-generation tool we have packaged it as a cent that will
-(optionally) be automatically downloaded, installed and used
-to build project documentation which includes output from
-other cents such as Javadoc, JDepend, Checkstyle and many
-others.
-
-
-  
-Compatibility:
-1.4.1 an later
-  
-  
-URL:
-http://krysalis.org/centipede/";>http://krysalis.org/centipede/
-  
-  
-Contact:
-http://sourceforge.net/mail/?group_id=36516";>mailing 
lists
-  
-  
-License:
-The Krysalis Patchy Software License, based on and
-fully compatible with the Apache Software Foundation
-license
-  
-
-  
 
   
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: DO NOT REPLY [Bug 28517] - SCP task fails when invoked multiple times.

2004-04-29 Thread Nick Chalko
True,  I only posted the last call.
The SCP is  is in the target called by
   
   
   
   
   
   
   
   
   
   
   
   

   
I will run it again and find out what invocation # fails.


[EMAIL PROTECTED] wrote:
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28517
SCP task fails when invoked multiple times.


--- Additional Comments From [EMAIL PROTECTED]  2004-04-26 15:39 ---
Nick, The output you posted shows the scp task running only once.
-Rob A
Hmm. Perhaps this discussion should be taking place on the users list, rather 
than in the bug tracking database.

-
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]


importer was: auto download of antlibs

2004-02-12 Thread Nick Chalko
Krysalis Importer is now available for download at 
https://sourceforge.net/project/showfiles.php?group_id=48571&package_id=109374
Try it out.  I think it has most enough features to interest you.

R,
Nick
Nick Chalko wrote:
In an earlier message Steve Loughran   said

> OK, now that Ant1.6 has antlibs, it is time to think of the next 
step: auto download of antlibs and (perhaps) dependencies.

Importer from Krysalis does exactly this. It downloads, caches and 
imports build.xml files that I call antlets.

Some initial documentation is available at 
http://krysalis.org/cgi-bin/krywiki.pl?Importer

This allows ant files to be a small as this.
- <#> 
 Depot Ruper is a Repository Updater
 
 
 
 
<#>
 http://metamorphosis.krysalis.org/antlet/"; />
 http://metamorphosis.krysalis.org/antlet/"; />
- <#> 
- <#> 
 
 
 
 


This will give you all the following targets.  compile, dist, clean,  
etc.
The source for the antlets are at  
http://cvs.sourceforge.net/viewcvs.py/metamorphosis/antlets/

I have a krysalis-importer-0.5-alpha.jar  ready to go but Source Forge 
was down last night, so I won't be able to post until tonight.

Importer is a complete rewrite from the experience gained in the 
centipede project. It is a small target ZERO dependencies ant task. 
Importer is the my take at the simplest thing that would work.  More 
needs to be added.  I hope to get the depot ruper stuff integrated to 
handle mirrors and versioning.

R,
Nick
-
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: auto download of antlibs

2004-02-11 Thread Nick Chalko
In an earlier message Steve Loughran  
 said

> OK, now that Ant1.6 has antlibs, it is time to think of the next 
step: auto download of antlibs and (perhaps) dependencies.

Importer from Krysalis does exactly this. It downloads, caches and 
imports build.xml files that I call antlets.

Some initial documentation is available at 
http://krysalis.org/cgi-bin/krywiki.pl?Importer

This allows ant files to be a small as this.
- <#> 
 Depot Ruper is a Repository Updater
 
 
 
 
<#>
 http://metamorphosis.krysalis.org/antlet/"; />
 http://metamorphosis.krysalis.org/antlet/"; />
- <#> 
- <#> 
 
 
 
 


This will give you all the following targets.  compile, dist, clean,  etc. 

The source for the antlets are at  
http://cvs.sourceforge.net/viewcvs.py/metamorphosis/antlets/

I have a krysalis-importer-0.5-alpha.jar  ready to go but Source Forge 
was down last night, so I won't be able to post until tonight.

Importer is a complete rewrite from the experience gained in the 
centipede project. 
It is a small target ZERO dependencies ant task. 
Importer is the my take at the simplest thing that would work.  More 
needs to be added.  I hope to get the depot ruper stuff integrated to 
handle mirrors and versioning.

R,
Nick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DO NOT REPLY [Bug 26511] - Add IFileSet interface

2004-01-29 Thread Nick Chalko
[EMAIL PROTECTED] wrote:

I don´t know ruper. But "autodownload and cache resources" via fileset? A 
fileset lists per definition only present files ... why download present files?

 

Here is a sample of what I want to achieve. 

   
   
   
   
   

If ruper has a copy of log4j version 1.2 then good, if not download and 
store localy,  in all cases the fileset with refid="test1"would 
return  /org.apache.jakarta/log4j/jars/log4j-1.2.jar   

However I seem to have error already
Copy doesn't like
public void addFileset(IFileSet set) {
   filesets.addElement(set);
   }
It says 
The  type doesn't support the nested "fileset" element.

So I will need to investigate some more. 
It does seem that FileSet is a heavy. 
It seems to me that the base type for FileSet   sould only have then method
publid File[] getFiles()

I will take a look at selectors.
R,
Nick
-
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]


ImportTaskTest fails in Ecllipse

2003-12-26 Thread Nick Chalko
Running the ImportTaskTest using the JUnit tools in Eclipse, all test fail.
./build.sh -Dtestcase=org.apache.tools.ant.taskdefs.ImportTest 
run-single-test   passes.

Here is the error for testSimpleImport
junit.framework.AssertionFailedError: expecting log to contain "Before 
importIn imported topAfter import" log was "Trying to override old 
definition of task classloaderTrying to override old definition of 
datatype descriptionTrying to override old definition of task 
importTrying to override old definition of task taskdefBefore 
importAfter importIn imported top"
   at junit.framework.Assert.fail(Assert.java:47)
   at junit.framework.Assert.assertTrue(Assert.java:20)
   at 
org.apache.tools.ant.BuildFileTest.assertLogContaining(BuildFileTest.java:118)
   at 
org.apache.tools.ant.taskdefs.ImportTest.testSimpleImport(ImportTest.java:79)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
   at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
   at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)

Any Ideas?
R,
Nick
PS CVS Head of ant.
And Eclipse 2.1.2 Build id: 200311030802

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sample antlet was: Proposal: Ant AntLet(s) : Subproject or New Feature

2003-11-04 Thread Nick Chalko
Here is what I think antlets might look like.  I have experimented with 
the code and it works
see 
http://nagoya.apache.org/wiki/apachewiki.cgi?AntProjectPages/AntletSample


Antlets are designed to be (optionally) downloaded and imported by the 
importantlet task [sample code] 
 


 Sample


Helloworld template project.
   
   http://ant.apache.org/antlets"; />
   
 


This will download and automatically import 
http://ant.apache.org/antlets/init/xbuild.xml Which looks like



Standard Init.
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Proposal: Ant AntLet(s) : Subproject or New Feature

2003-11-04 Thread Nick Chalko
I really think Ant is ready to step up the amount of reuse it provides 
to the develpoment community. 
An Apache Ant subproject to develop and maintian a set of   build 
targets for specific build steps is a very worthy goal. 

R,
Nick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Proposal: Ant AntLet(s) : Subproject or New Feature

2003-11-04 Thread Nick Chalko
http://nagoya.apache.org/wiki/apachewiki.cgi?AntProjectPages/AntletProposal
= (0) rationale =
With Ant 1.6 there are new features of  and  that 
support re-use. Still, however, Ant is a framework/toolkit for building, 
but it does not provide any out-of-the-box build solution. Simple tasks 
are repeated many fold by ant users, and re-use would improve community 
benefit.

A solution is needed for building java projects, creating 
JARs/distributions, and so forth. If these solutions (part include, part 
macrodef, part normal ant tasks, part properties) are called "antlets", 
then a standard set of antlets ought be provided and maintain by the ant 
community.

Ant 1.6 has the technologies in place to make antlets a viable (and 
configurable) addition to ant.

== (0.1) criteria ==
Meritocracy:
Community:
Alignment:
Scope:
== (0.2) warning signs ==
The sponsors and core developers are seasoned developers with a history 
of Open Source Development, and are avid Ant users.

* Nick Chalko is a memeber of the Jakarta Gump project, has contributed 
to Ant, and on the PMC of Krysalis.
* Adam Jack is spearheading the Jakarta Gump rewrite in Python, and is 
on the PMC of Krysalis.

= (1) scope of the subproject =
* AntLet: A technology framework for antlets (including 
development/debugging/maintenance)
* StandardAntLets: A standard set of antlets for re-usable tasks

== Overlap ==
Antlet are "AntLibs written in Ant, not Java". An implmentation would 
likely leverage 

AntLet has potential overlap with Maven, because some antlets could deal 
with build aspects, that Maven provides. That said, '' Maven's primary 
goal is to allow a developer to comprehend the complete state of a 
development effort in the shortest period of time.''  This is 
accomplised by ''using its project object model (POM) and a single set 
of Ant build files that are shared by all projects using Maven thus 
providing a uniform build system''. Antlets takes a more conservative 
approach, staying closer to the Ant Feel.  Antlets do not rely on a 
Project Object Model, but use standard ant properties.  Antlets are 
desinged to be plugged into existing build.xml files as needed. 
Theoretically Maven could leverage Antlets or Antlets call Maven plugins.

== Not in Scope ==
* Project Metadata
= (2) identify the initial source from which the subproject is to be 
populated =

The Krysalis antlib project has a set of standard ant targets that are 
suitable for conversion to antlets.

* http://cvs.sourceforge.net/viewcvs.py/krysalis/krysalis-antlibs/
* http://cvs.sourceforge.net/viewcvs.py/krysalis/krysalis-antlibs-sandbox/
An ImportAntletTask is available at
* 
http://cvs.sourceforge.net/viewcvs.py/metamorphosis/centipede2/src/java/org/krysalis/centipede2/ant/ImportAntletTask.java?view=markup

= (3) identify the ASF resources to be created =
* Sub-project or sub-directory on Ant website
* cvs module  (antlets)
* mailing list  (antlets)
= (4) identify the initial set of committers =
* All Ant Committers
* Nick Chalko ([EMAIL PROTECTED])
* Adam Jack ([EMAIL PROTECTED])
These would be the core developers initially "responsible" of the 
project, that are willing to actively help.

= (5) identify apache sponsoring individual =
* Nick Chalko ([EMAIL PROTECTED])
* Adam Jack ([EMAIL PROTECTED])
= (6) open issues for discussion =
* The name is still to be defined. AntLets is a placeholder for now.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Ant script repository?

2003-10-13 Thread Nick Chalko
Bob Lee wrote:
Is there any sort of central repository for Ant scripts?
Krysalis Centipede is trying to do this using  downloadable ant scripts  
called antlibs
Come by  http://krysalis.org/centipede and help out.



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Preventing Parent Classloading

2003-10-10 Thread Nick Chalko
Upayavira wrote:
Samuel Gabriel wrote:
We ran into this problem in one of our projects. The solution we 
found is to
override the loadClass method so that it looks into the classloader 
classes
before it looks into the parent classes. This way if there are 
classes that
are conflicting our classes will always be loaded first.
 

Are you able to send me some sample code for your class loader? I've 
been trying to achieve that myself but with no luck.

Regards, Upayavira
Take a look at
http://cvs.sourceforge.net/viewcvs.py/krysalis/krysalis-centipede/src/java/org/krysalis/centipede/ant/OptionalClassLoader.java?rev=HEAD&content-type=text/vnd.viewcvs-markup
btw,  what was I suppose to do about the license. 
90% of the code is a straight copy from apache.

R,
Nick


smime.p7s
Description: S/MIME Cryptographic Signature


Re: password for proxy, etc

2003-09-29 Thread Nick Chalko
see
http://jakarta.apache.org/site/source.html#Patches



smime.p7s
Description: S/MIME Cryptographic Signature


Re: New External Task

2003-08-04 Thread Nick Chalko
Send a patch. 


smime.p7s
Description: S/MIME Cryptographic Signature


Re: ant 1.5.4 : Import

2003-08-01 Thread Nick Chalko

Nicola Ken Barozzi wrote:
Jose Alberto Fernandez wrote, On 31/07/2003 13.24:
From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]

...
Wait a second, does this mean that there is crosstalk between the 
lines 1, 2, 3?

Yes, there is crosstalk and at least in XSLT this is a good thing.
It means that you can write a bunch of files with groups of
templates on each, and then by just importing them into one buildfile
all the pieces can interact with each other. In that way if I want to
replace one group of templates in a diferent project I can just change
the import line for that particular group and the behaviour changes.
We use this technique extensively in our system at work and it makes
life extremely easy and modular. So in may opinion this is a good thing.

That's what I do too, just that I don't never had the need or ever 
thought of doing it with targets that are not redefined in the base one.

If you say that you use it and benefit from it, I believe you, and 
makes me feel better :-)

So what I thought was a bug is instead a feature; the important thing 
is that this "feature" is correctly documented.

I used this "feature" in centipede.
The release antlib  has a target called tag-and-release, but it depends 
on a target called   tag
However tagis expected to be defined in a different antlib.  Currently 
it is defined in cvsbuild,  but it is open for someone to make a 
vssbuild  antlib.

So I do think cross talk is a "feature"  but a feature that can be hard 
to grok.



smime.p7s
Description: S/MIME Cryptographic Signature


Re: CVS Commit with ANT

2003-07-21 Thread Nick Chalko
Yes I have done cvs commits with ant
Here is a
an exmple for doing a "tag"
   
   
   
value="build-${project.version.V}_${project.version.v}_${project.version.fix}"
   />
   
   message="Tagging the source tree as ${cvsbuild.cent.cvs.tag}"
   />
   

   
The same thing should work for ci  (checkin)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: NPE in ComponentHelper.sameDefinition(ComponentHelper.java:593)

2003-07-21 Thread Nick Chalko
peter reilly wrote:
This should be fixed in next build (July 21) of ant.
Peter
On Sat, 2003-07-19 at 00:00, Nick Chalko wrote:
 

This is related to the junit antlib at krysalis.  This may be something 
I did,  but it works with the June 25 build of ant.
Regardless NPE are always bad.
   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: NPE in ComponentHelper.sameDefinition(ComponentHelper.java:593)

2003-07-18 Thread Nick Chalko
This is related to the junit antlib at krysalis.  This may be something 
I did,  but it works with the June 25 build of ant.
Regardless NPE are always bad.


Here is the xbuild.xml file I import.








   
  


  
  
 


   
loaderRef="junit.antlib.loader" />

 

   
arg2="$${viprom:/module/[EMAIL PROTECTED]/[EMAIL PROTECTED]'test/junit']/@dir}" 
/>
  
   

value="${viprom:/module/[EMAIL PROTECTED]/[EMAIL PROTECTED]'test/junit']/@dir}"/> 


  

  Perform the unit tests using JUnit, and generates reports.



  
  



   
  
  
  
  
  
  

   
 
 
  
   
  



  if="project.test.dir">
  
  
  



  description="Perform jUnit tests. Add the 
junit.antlib.extra.sysproperty
   elements in properties.xml to add sys properties."
  depends="compile, compile-junit, test-init"
  if="project.test.dir">

  

  
style="${junit.antlib.dir}/resources/stylesheets/test.xsl"
force="true">
   
   
  
   


  



  if="project.test.dir">

 
  
   
  

   
  
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Gump rocks was: ConcurrentModificationException

2003-07-15 Thread Nick Chalko
Gump rocks.
Thanks for responding so quickly.
R,
Nick
Stefan Bodewig wrote:
On Tue, 15 Jul 2003, Adam Jack <[EMAIL PROTECTED]> wrote:
 

Peter wrote: "revert the script test that showed up the problem in
the first place". Sorry, but what does this mean to the
non-antdev-initiated?
   

I committed a patch that was supposed to improve performance and lower
memory consumption about a week ago.  Peter reported that one of our
unit tests for the 

Re: Ant 1.6 todo thoughts

2003-06-24 Thread Nick Chalko
Steve Loughran wrote:
2. Import task
I think this needs more testing and work. I currently have a disabled 
testcase that shows one problem. I think we have had some discussions 
on the meaning of basedirs for imported stuff without any clear 
resolution.

I am using this in a project as of last week. It could be very 
powerful, if only I understood its rules. Which means
 -hard use to discover its quirks
 -tuning to fix things
 -documentation

Maybe the basedir choice should be an option at  time.
Centipede is using the import task  heavily.  It works very well for us. 


--
Nick Chalko Show me the code.
 Centipede
 Ant + autodownloadable build plugins + needed jars autodownload.
 http://krysalis.org/centipede
-


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Using classloader for Junit

2003-06-20 Thread Nick Chalko

Costin Manolache wrote:
The part that loads junit.jar to the main loader is complete.
There are other possible enhancements to create arbitrary loaders
or support reloading which are not yet implemented.
 


That still failed for me. 
I tried this



  
   
  
   


   

Fails with
$ ant
Buildfile: build.xml

BUILD FAILED
C:\tools\ant-head\tools\antlibs\junit-0.1.1-dev-20030618.antlib\build.xml:12: 
ta
skdef: A class needed by class 
org.apache.tools.ant.taskdefs.optional.junit.JUni
tTask cannot be found: junit/framework/TestListener

Total time: 1 second

btw my hack to allow   optional tasks to be loaded by a childloader worked.
Costin

 

Peter
On Thu, 2003-06-19 at 08:52, Nick Chalko wrote:
 

peter reilly wrote:
  

   

Check the ant faq http://ant.apache.org/faq.html#delegating-classloader
In essence you need to place the junit.jar file in ${ant.home}/lib



 

I had hoped that was what the  task would let me avoid.
  

   

-
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]
 



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Using classloader for Junit

2003-06-20 Thread Nick Chalko

It might appear to work but can fail in subtle ways. I have had instances 
where the second invocation of a task would cause an error because it would 
bring classes into the VM which were there already leading to two different 
class instances with the same classname being reachable (loader constraint 
violation).

This can be quite non-deterministic. If I installed a delay, the first load of 
classes would be GC'd avoiding the constaint violation by the second 
instance. So, I urge caution :-)
 

Unless I do this I see only two choices
  1. put Junit.jar and every other dep.jar  in the ${ant.home}/lib
  2. remove ant-junit.jar  and other optional from ${ant.home}/lib
I hate 1 and I don't wan't to insist users change there ant environment 
unless I have to.

I'll see what happens when I try tonight.
R,
Nick


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Using classloader for Junit

2003-06-19 Thread Nick Chalko
Conor MacNeill wrote:
On Fri, 20 Jun 2003 12:17 am, Nick Chalko wrote:
 

   

I'll be interested to see if this works :-) I have my doubts. As soon as you 
go into the main loader to find the task classes 
(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask), you won't be able 
to see the Junit classes from the child loader. If you play class loader 
games to avoid this then you are headed for LinkageErrors. Forking is almost 
always more preferable.
 

The
if (resourceName.startsWith("org.apache.tools.ant.taskdefs.optional.")) 
{return useParentFirst;}
HACK worked last night.

I will try something a little cleaner tonight.
BTW, I don;t really agree with the  task being used to modify the 
effective classpath of running ClassLoaders. I'm sure this will cause trouble 
too.
 

Seems to break some of the "properties are  immutable" philosophy of ant.
--
Nick Chalko Show me the code.
 Centipede
 Ant + autodownloadable build plugins + needed jars autodownload.
 http://krysalis.org/centipede
-


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Using classloader for Junit

2003-06-19 Thread Nick Chalko
After I slept on it,  I thought of how I could extend the antclassloader 
to handle the situations I need. 
I am considering a  
That will explicitly allow the optional ant task to be loaded in the 
child classloader.
I may even go so far as  automatically adding this fileset 
${ant.home}/lib/ant-*.jar   to the classloader.

That should handle the usecase I have in mind.

peter reilly wrote:
Ah, I see.
That would be nice, but the classloader task is not
yet complete.
Peter
On Thu, 2003-06-19 at 08:52, Nick Chalko wrote:
 

peter reilly wrote:
   

Check the ant faq http://ant.apache.org/faq.html#delegating-classloader
In essence you need to place the junit.jar file in ${ant.home}/lib

 

I had hoped that was what the  task would let me avoid. 

   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Using classloader for Junit

2003-06-19 Thread Nick Chalko

peter reilly wrote:
Check the ant faq http://ant.apache.org/faq.html#delegating-classloader
In essence you need to place the junit.jar file in ${ant.home}/lib
 

I had hoped that was what the  task would let me avoid. 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Using classloader for Junit

2003-06-19 Thread Nick Chalko
Btw
I can make this work if I  include junit.jar and ant-junit.jar in the path.
And hack AntClassloader.
   private boolean isParentFirst(String resourceName) {
   // default to the global setting and then see
   // if this class belongs to a package which has been
   // designated to use a specific loader first
   // (this one or the parent one)
   // XXX - shouldn't this always return false in isolated mode?
   boolean useParentFirst = parentFirst;
// HERE IS MY HACK
   if 
(resourceName.startsWith("org.apache.tools.ant.taskdefs.optional.")) 
{return useParentFirst;}

  for (Enumeration e = systemPackages.elements(); 
e.hasMoreElements();) {
   String packageName = (String) e.nextElement();
   if (resourceName.startsWith(packageName)) {
   useParentFirst = true;
   log(resourceName+" is a system package["+packageName+" 
in"+systemPackages+"] use parent loader",Project.MSG_DEBUG);
   break;
   }
   }

   for (Enumeration e = loaderPackages.elements(); 
e.hasMoreElements();) {
   String packageName = (String) e.nextElement();
   if (resourceName.startsWith(packageName)) {
   useParentFirst = false;
   log(resourceName+" is a loader package use this 
loader",Project.MSG_DEBUG);
   break;
   }
   }

   return useParentFirst;
   }



smime.p7s
Description: S/MIME Cryptographic Signature


Using classloader for Junit

2003-06-19 Thread Nick Chalko


   

   

 
 

 

Fails with
$ ant
Buildfile: build.xml
BUILD FAILED
C:\tools\ant-head\tools\antlibs\junit-0.1.1-dev-20030618.antlib\build.xml:12: 
ta
skdef: A class needed by class 
org.apache.tools.ant.taskdefs.optional.junit.JUni
tTask cannot be found: junit/framework/TestListener

Total time: 1 second
How is this suppose to work?
I see the use parent for org.apache.tools.ant.
and the then use loader for org.apache.tools.ant.taskdefs.optional.
But it does not seem to work.  Any ideas?
R,
Nick



smime.p7s
Description: S/MIME Cryptographic Signature


Re: cvs commit: ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional JXPath.java

2003-06-05 Thread Nick Chalko
[EMAIL PROTECTED] wrote:
antoine 2003/06/05 00:53:20
 Modified:proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional
   JXPath.java
 Log:
 fixes NPE on iterator causing JXPath to fail with exception if expression returns no results
 PR: 20272
 Submitted by: Nick Chalko (nick at chalko dot com)
 

Thanks for applying the patch.
The real credit goes to Adam Jack.  He found and pushed the issue.
--
Nick Chalko Show me the code.
 Centipede
 Ant + autodownloadable build plugins + needed jars autodownload.
 http://krysalis.org/centipede
-


smime.p7s
Description: S/MIME Cryptographic Signature


Re: iterator one liner, please help commit the patch...

2003-06-05 Thread Nick Chalko
+1 I am also waiting on this.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: A Java2HTML Task - Please Add

2003-05-01 Thread Nick Chalko
A patch to the xml source docs would increase the cahnce of this getting 
done.

--
Nick Chalko Show me the code.
 Centipede
 Ant + autodownloadable build plugins + needed jars autodownload.
 http://krysalis.org/centipede
-