ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: compile two classes
Date Tue, 15 Mar 2005 10:42:24 GMT
it would be easier to use the <manifest> as nested element of <jar>.

Jan

> -----Ursprüngliche Nachricht-----
> Von: THUFIR HAWAT [mailto:hawat.thufir@gmail.com]
> Gesendet am: Dienstag, 15. März 2005 11:39
> An: Ant Users List
> Betreff: compile two classes
> 
> build.xml:
> <project name="XHTML" default="package2">
> 
> 	<property name="outputDir" value="java\classes\" />
> 	<property name="sourceDir" value="java\src\atreides\xhtml\" />
> 	<property name="mainClass1" value="HelloWorldSwing" />
> 	<property name="mainClass2" value="Test16" />
> 	<property name="pkgPath" value="atreides.xhtml." />
> 	<property name="jarPath" 
> value="java\src\org\w3c\tidy\Tidy.jar" />
> 
> 	<target name="clean">
> 		<delete dir="${outputDir}" />
> 	</target>
> 
> 	<target name="prepare" depends="clean">
> 		<mkdir dir="${outputDir}" />
> 	</target>
> 
> 	<target name="compile" depends="prepare">
> 		<javac srcdir="${sourceDir}"
> 			destdir="${outputDir}"
> 			classpath="${jarPath}"
> 		/>
> 	</target>
> 
> 	<target name="manifest1" depends="compile">
> 		<manifest file="${outputDir}/MANIFEST.MF">
> 			<attribute name="Main-Class" 
> value="${pkgPath}${mainClass1}" />
> 		</manifest>
> 	</target>
> 
> 	<target name="manifest2" depends="manifest1">
> 		<manifest file="${outputDir}/MANIFEST.MF">
> 			<attribute name="Main-Class" 
> value="${pkgPath}${mainClass2}" />
> 		</manifest>
> 	</target>
> 
> 	<target name="package1" depends="manifest2">
> 		<jar jarfile="${outputDir}/${mainClass1}.jar"
> 		basedir="${outputDir}"
> 		manifest="${outputDir}/MANIFEST.MF" />
> 	</target>
> 
> 	<target name="package2" depends="package1">
> 		<jar jarfile="${outputDir}/${mainClass2}.jar"
> 		basedir="${outputDir}"
> 		manifest="${outputDir}/MANIFEST.MF" />
> 	</target>
> </project> 
> 
> 
> unfortunately, both jar files have the same manifest :(
> how do I create two different manifests and specify them, please?
> 
> 
> thanks,
> 
> Thufir
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message