Missing top level dir in jar file
Hello, Using the jar task in ant.1.4.1 I am missing the top level dir from the paths in the jar. For example if I have files and dirs like this:- . ./base ./base/sub ./base/sub/file1.class ./base/sub/file2.class Then in . I run jar cf ajar.jar base then jar tf ajar.jar we see :- META-INF/ META-INF/MANIFEST.MF base/ base/sub/ base/sub/file1.class base/sub/file2.class (note the top level base dir is included) However if I have an ant file that tries to create the same jar file:- project name=test.jar default=do.jar basedir=. target name=do.jar jar jarfile=ajar.jar basedir=base/ /target /project And I run ant then jar tf ajar.jar on the resulting file I get:- META-INF/ META-INF/MANIFEST.MF sub/ sub/file1.class sub/file2.class Where has the base dir gone? What do I have to do to get base dir into the path, other than by creating a dummy parent dir? Regards, Roger. Nokia 5510 looks weird sounds great. Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Missing top level dir in jar file
Try: jar jarfile=ajar.jar basedir=. includes=base/ You might have to play with the excludes directive also. -Original Message- From: Roger Marlow [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001 11:00 AM To: [EMAIL PROTECTED] Subject: Missing top level dir in jar file Hello, Using the jar task in ant.1.4.1 I am missing the top level dir from the paths in the jar. For example if I have files and dirs like this:- . ./base ./base/sub ./base/sub/file1.class ./base/sub/file2.class Then in . I run jar cf ajar.jar base then jar tf ajar.jar we see :- META-INF/ META-INF/MANIFEST.MF base/ base/sub/ base/sub/file1.class base/sub/file2.class (note the top level base dir is included) However if I have an ant file that tries to create the same jar file:- project name=test.jar default=do.jar basedir=. target name=do.jar jar jarfile=ajar.jar basedir=base/ /target /project And I run ant then jar tf ajar.jar on the resulting file I get:- META-INF/ META-INF/MANIFEST.MF sub/ sub/file1.class sub/file2.class Where has the base dir gone? What do I have to do to get base dir into the path, other than by creating a dummy parent dir? Regards, Roger. Nokia 5510 looks weird sounds great. Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Missing top level dir in jar file
On Thu, 6 Dec 2001, Marko Srdanovic [EMAIL PROTECTED] wrote: Try: jar jarfile=ajar.jar basedir=. includes=base/ this would only include the directory base and nothing else, it should probably be jar jarfile=ajar.jar basedir=. includes=base/**/ Stefan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Missing top level dir in jar file
Oops, that's what you get when you don't test things first - Thanks! ;-) -Original Message- From: Stefan Bodewig [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001 11:05 AM To: [EMAIL PROTECTED] Subject: Re: Missing top level dir in jar file On Thu, 6 Dec 2001, Marko Srdanovic [EMAIL PROTECTED] wrote: Try: jar jarfile=ajar.jar basedir=. includes=base/ this would only include the directory base and nothing else, it should probably be jar jarfile=ajar.jar basedir=. includes=base/**/ Stefan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Missing top level dir in jar file
Try: jar jarfile=ajar.jar basedir=. includes=base/ this would only include the directory base and nothing else, it should probably be jar jarfile=ajar.jar basedir=. includes=base/**/ Unfortunately that just looks for the files under base. There's only a directory there, so it finds nothing. (In general there's going to be an arbitrarily deep tree under base so I need it to recurse down for me.) Roger. Nokia 5510 looks weird sounds great. Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Missing top level dir in jar file
On Thu, 6 Dec 2001, Roger Marlow [EMAIL PROTECTED] wrote: Try: jar jarfile=ajar.jar basedir=. includes=base/ this would only include the directory base and nothing else, it should probably be jar jarfile=ajar.jar basedir=. includes=base/**/ Unfortunately that just looks for the files under base. and recursively below that. ** is recursive. Stefan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Missing top level dir in jar file
Hi, A quick question on recursion. Just out of curiosity, is there any difference between ** and **/* in Pattern Sets? I always observe the latter convention for recursive pattern set and file set matching in my build files. Matt -Original Message- From: Stefan Bodewig [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001 11:36 AM To: [EMAIL PROTECTED] Subject: Re: Missing top level dir in jar file On Thu, 6 Dec 2001, Roger Marlow [EMAIL PROTECTED] wrote: Try: jar jarfile=ajar.jar basedir=. includes=base/ this would only include the directory base and nothing else, it should probably be jar jarfile=ajar.jar basedir=. includes=base/**/ Unfortunately that just looks for the files under base. and recursively below that. ** is recursive. Stefan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Missing top level dir in jar file
Try: jar jarfile=ajar.jar basedir=. includes=base/ this would only include the directory base and nothing else, it should probably be jar jarfile=ajar.jar basedir=. includes=base/**/ Unfortunately that just looks for the files under base. and recursively below that. ** is recursive. Ahh! double * - must go along for that sight test sometime :-) Many thanks for your help with this, hey you guys are fast! Regards, Roger. Nokia 5510 looks weird sounds great. Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Missing top level dir in jar file
--- Matt Lyon [EMAIL PROTECTED] wrote: A quick question on recursion. Just out of curiosity, is there any difference between ** and **/* in Pattern Sets? See the Example patterns table in the Directory-based Tasks section of the user manual. Diane = ([EMAIL PROTECTED]) __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]