Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 56981 invoked from network); 9 Nov 2002 09:40:49 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Nov 2002 09:40:49 -0000 Received: (qmail 13298 invoked by uid 97); 9 Nov 2002 09:41:53 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 13251 invoked by uid 97); 9 Nov 2002 09:41:52 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 13239 invoked by uid 98); 9 Nov 2002 09:41:51 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: "Vincent Massol" To: "'Jakarta Commons Developers List'" Subject: RE: [Jelly] How to do this? Date: Sat, 9 Nov 2002 09:36:19 -0000 Organization: OCTO Technology Message-ID: <006801c287d3$76042eb0$0200a8c0@octovma> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: <000001c28751$b0368920$0200a8c0@octovma> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Do not worry; I've decided to go for a Jelly Tag. Thanks -Vincent > -----Original Message----- > From: Vincent Massol [mailto:vmassol@octo.com] > Sent: 08 November 2002 18:07 > To: 'Jakarta Commons Developers List' > Subject: [Jelly] How to do this? > > Hi, > > I'd like to be able to pass a list of classnames to the junit swing test > runner. These classnames should be extracted from names of files in the > file system. > > Something like: > > > > > > > > ${test.getPath()}.substring(0,${length})} > > > > > > > > > > [...] > > I have 2 problems. > > The first one is that "${test.getPath().substring(0, > test.getPath().length() - '.java'.length())} does not properly evaluate. > I thought that everything inside ${} was a java expression, but > apparently it isn't so. The problem seems to be that the second > "test.getPath().length()" does not yield the expected result. > > The second one is that the FileScanner is creating a File Object from an > Ant DirectoryScanner by doing the following: new File( ds.getBasedir(), > files[fileIndex] ); > > Thus, the path that I get from ${tests.getPath()} are absolute paths > whereas I would need relative ones. Alternatively I need to be able to > remove the absolute part. I would then need something like: > > ${fullpath.substring((${basedir}/${maven.cactus.src.dir}).length()) > > but obviously this would not work. > > I could do all that from a java jelly tag, but I was wondering whether > there was not an easy jelly solution (maybe scripts? Or even simpler) to > the problem? > > Thanks > -Vincent > > > -- > To unsubscribe, e-mail: unsubscribe@jakarta.apache.org> > For additional commands, e-mail: help@jakarta.apache.org> -- To unsubscribe, e-mail: For additional commands, e-mail: