Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ANT jarfile folder structure

Status
Not open for further replies.

theo67

Technical User
Jul 17, 2008
31
DE
Hello,

i am working for the first time with ANT and i would appreciate if someone could help me.
I want to create a jar file, where i include the folder structure to the .class files.
E.g. i have a path N:\tmp\plugins\compress
In this path are 4 .class files and one MF(=manifest).

I need to create the jar file, where if i open it i see the Folder structur \tmp\plugins\compress and in "compress" will be the .class and .MF file...

I allready have the code for creating the jar file:
Code:
<?xml version="1.0"?>
<project name="test plugins" default="build_test" basedir=".">

	<property name="src" value="./bin/test/plugins"/>
	<property name="dest" value="N:/tmp/plugins"/>
	
	<property name="compress.dir" value="${dest}/compress"/>
	<property name="compress.jarname" value="compress.jar"/>
	
	<target name="build_test">
		<copydir src="${src}" dest="${dest}"
			includes="compress/*.*"/>
		
		<jar                      destfile="${dest}/${compress.jarname}" 			          		</jar>	
	</target>
	
</project>
How could i implement somethng like this? i experimented with "pathelement" but no luck

Thanks
Theo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top