Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 58530 invoked from network); 26 Mar 2007 17:12:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Mar 2007 17:12:53 -0000 Received: (qmail 75040 invoked by uid 500); 26 Mar 2007 17:12:55 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 75019 invoked by uid 500); 26 Mar 2007 17:12:55 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 75008 invoked by uid 99); 26 Mar 2007 17:12:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2007 10:12:55 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [194.158.197.58] (HELO proxy.beldts.intra) (194.158.197.58) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2007 10:12:45 -0700 Received: from [192.168.129.171] (helo=avodonosov) by proxy.beldts.intra with esmtp (Exim 4.62) (envelope-from ) id 1HVsmC-0003qc-Ls for user@ant.apache.org; Mon, 26 Mar 2007 20:14:39 +0300 From: "Anton Vodonosov" To: "'Ant Users List'" Subject: RE: [Junit] How to handle TestSuites correctly Date: Mon, 26 Mar 2007 20:12:12 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcdcCUJK2zSfDssWSNCctXReB5WNaATvomtw In-Reply-To: <20070301135513.432B54EC748@mx1.dts-online.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Spam-Score: -4.2 (----) X-Spam-Report: Spam detection software, running on the system "ns.beldts.intra", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>> 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 >> batch from that [...] Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.2 AWL AWL: From: address is in the auto white-list X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20070326171247.7EE2610FB018@herse.apache.org> >>> 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 >> 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. http://www.springframework.org/docs/api/org/springframework/context/support/ ClassPathXmlApplicationContext.html - This class can read configuration files specified by wildcards. http://www.springframework.org/docs/api/org/springframework/core/io/support/ PathMatchingResourcePatternResolver.html - Actual implementation of wildcards resolving is in this class. Note portability issues mentioned in the latter javadoc. See also spring source code. Regards, -Anton --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org