ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Vodonosov" <>
Subject RE: [Junit] How to handle TestSuites correctly
Date Mon, 26 Mar 2007 17:12:12 GMT
>>> From what I understand from documentation, it is impossible
>>> to create Resource Collection based on classpath. Am I right?
>> that's right, because there is nothing in the Java API to enum all 
>> classes in a package.
> Yes, but it is possible to analyze classpath programmatically: 
> for jars enum archive content, for directories - directory content
>> 1. unzip the specific jars you want to test against, then create a 
>> <batchtest> batch from that

In the Spring framework configuration files may be specified using
wildcards like "classpath:com/mycompany/**/applicationContext.xml", 
and such wildcards may be resolved even if specified files are in jar.

So another choice for those who will decide to implement classpath
Resource Collections for ant is to use spring approach.
ClassPathXmlApplicationContext.html - This class can read configuration
files specified by wildcards.
PathMatchingResourcePatternResolver.html - Actual implementation of
wildcards resolving is in this class.

Note portability issues mentioned in the latter javadoc.

See also spring source code.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message