Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 14609 invoked from network); 17 Oct 2007 14:24:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Oct 2007 14:24:04 -0000 Received: (qmail 92246 invoked by uid 500); 17 Oct 2007 14:19:01 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 92223 invoked by uid 500); 17 Oct 2007 14:19:01 -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 92207 invoked by uid 99); 17 Oct 2007 14:19:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2007 07:19:01 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [216.252.121.72] (HELO web43142.mail.sp1.yahoo.com) (216.252.121.72) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 17 Oct 2007 14:19:04 +0000 Received: (qmail 26456 invoked by uid 60001); 17 Oct 2007 14:18:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=Z/oX4DoFrIRkp41aZqXWK/nLj7OggtRpR7rM1R5mSJW14WWJNdhMo6SbTGQfviRixv9xAZ021ZPYprSvj7LfExiE0B9bs+BuvM+c8+snDcqmKUq73HHe8d/ybuVWkzcA/VGV1Iwi6lXtwrdFevsf7aNyM7VIEYbDnMLYMRHddh8=; Received: from [192.18.128.5] by web43142.mail.sp1.yahoo.com via HTTP; Wed, 17 Oct 2007 07:18:41 PDT X-Mailer: YahooMailRC/814.06 YahooMailWebService/0.7.134.12 Date: Wed, 17 Oct 2007 07:18:41 -0700 (PDT) From: jiniusatwork-antuser@yahoo.com Subject: Re: Re-parenting classpath To: Ant Users List MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: <743524.26427.qm@web43142.mail.sp1.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org It's not obvious to me how manifestclasspath helps, here, but as for the us= e case ...=0A=0AI'd like to transform a "local" Junit test command (under N= etbeans) so that I can run a test, without Netbeans, on another machine. Sp= ecifically, I'd like to effectively execute the following command, generate= d by Netbeans: =0A=0AExecute:Java13CommandLauncher: Executing '/files/jdk1.= 6.0/jre/bin/java' =0Awith arguments:=0A'-classpath'=0A'/.jar:= =0A/.jar:=0A/classes:=0A/modules/ext/juni= t-3.8.1.jar:=0A/ant/lib/ant-launcher.jar:=0A/an= t/lib/ant.jar:=0A/ant/lib/ant-junit.jar'=0A'org.apache.tools.= ant.taskdefs.optional.junit.JUnitTestRunner'=0A'.'= =0A'filtertrace=3Dtrue'=0A'haltOnError=3Dfalse'=0A'haltOnFailure=3Dfalse'= =0A'showoutput=3Dtrue'=0A'formatter=3Dorg.apache.tools.ant.taskdefs.optiona= l.junit.BriefJUnitResultFormatter'=0A=0Aon another host (testHost) without = Netbeans (but with Java, of course). Therefore, I'd like to recreate the te= st environment on testHost by essentially zipping up all the components of = the JUnit classpath (above) and then re-parent them under a common root so = that I can reconstruct the command line on testHost. For example, assuming = I can un/zip and re-parent the required jar/class files on testHost, I shou= ld then be able to run the following command line:=0A'/files/jdk1.6.0/jre/b= in/java' =0A'-classpath'=0A=0A'//.jar:=0A//.jar:=0A//classes:=0A//m= odules/ext/junit-3.8.1.jar:=0A//ant/lib/ant-launcher= .jar:=0A//ant/lib/ant.jar:=0A//ant/lib/ant-junit.jar'=0A=0A'org.apache.tools.ant.taskdefs.optional.junit= .JUnitTestRunner'=0A=0A'.'=0A=0A'filtertrace=3Dtrue'= =0A=0A'haltOnError=3Dfalse'=0A=0A'haltOnFailure=3Dfalse'=0A=0A'showoutput= =3Dtrue'=0A=0A'formatter=3Dorg.apache.tools.ant.taskdefs.optional.junit.Bri= efJUnitResultFormatter'=0A=0ASo, ideally, what I want is the ability to:=0A= - zip up the individual components of the ${run.test.classpath} property un= der NetBeans (jars and class directories) under a new "root" directory=0A- = modify the the ${run.test.classpath} to pre-pend the new "root" to the path= elements=0A- generate a script/file with the command line to run=0A=0AMake= sense?=0A=0A=0A----- Original Message ----=0AFrom: Dominique Devienne =0ATo: Ant Users List =0ASent: Wednes= day, October 17, 2007 9:32:25 AM=0ASubject: Re: Re-parenting classpath=0A= =0A=0AOn 10/16/07, jiniusatwork-antuser@yahoo.com=0A wrote:=0A> Hopefully, someone can point me in the right direction= . What I'd like=0A to do is re-parent the elements of a classpath entry in = an Ant build=0A script (from netbeans). For example, given classpath proper= ty like:=0A>=0A> Setting project property: run.test.classpath ->=0A>=0A ../= lib/a.jar:../lib/dir1/b.jar:../lib/dir2/c.jar:build/classes:build/test/clas= ses=0A>=0A> I'd like to zip up the classpath components from their current= =0A locations, but then re-parent them within the zip file so that they get= =0A extracted to the following layout:=0A>=0A> a.jar=0A> b.jar=0A> c.jar=0A= > classes=0A>=0A> The jar file names should be unique, so I'm not too worri= ed about=0A name clashes with the jar files. Being new to Ant I don't see a= n easy way=0A to get this done with the existing Ant tasks (pathconvert, ba= sename,=0A zip, etc.). So, I'm hoping someone can tell if it can be done (a= nd how)=0A or if there's some custom Ant task that already handles this=0A = functionality.=0A=0A can do that, indirectly. You're not= saying why the=0Are-parenting, but the only use-case I know of is having a= in-manifest=0Arelative CP in a jar, which is the purpose of this task. You= only get=0Aa string out of it though, which may not be what you need. Hard= to say=0Athough given your post. --DD=0A=0A-------------------------------= --------------------------------------=0ATo unsubscribe, e-mail: user-unsub= scribe@ant.apache.org=0AFor additional commands, e-mail: user-help@ant.apac= he.org=0A=0A=0A=0A --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org