You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Labhard, Michael E" <mi...@intel.com> on 2006/05/26 17:14:32 UTC

jar properties

Unable to add a properties file to a jar file.  Ant task:

	 <target name="firstjar" depends="manifest">
		 <jar jarfile="${jars.project}" >
			<fileset refid="files.sweethome.class" />
		 </jar>
	 </target>
	 <target name="deploy" depends="firstjar">
		 <jar jarfile="${jars.project}" update="true" 
		 	includesfile="sweethome.properties" >
		 </jar>
	 </target>


Result:

...
      [jar] adding entry
com/intel/research/sweethome/webserver/map/IOVarDisplay.class
      [jar] adding entry
com/intel/research/sweethome/webserver/map/NullImageObserver.class

deploy:

compile-camp:
...

Any ideas?

-- Michael


Re: jar properties

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Michael,
I think that what you want is :
 		 <jar jarfile="${jars.project}" update="true"
                     <fileset dir=".">
 		 	 <include name="sweethome.properties" >
                     </fileset> 

 		 </jar>
this is assuming that sweethome.properties is generated in the basedirectory of your Ant project (the same directory as the build file
unless you have put something different in the attribute basedir of the project tag).

the includesfile is meant to be a file listing entries which you
want to add.

Regards,

Antoine

> -------- Original-Nachricht --------
> Datum: Fri, 26 May 2006 08:14:32 -0700
> Von: Labhard, Michael E <mi...@intel.com>
> An: <us...@ant.apache.org>
> Betreff: jar properties
> 
> Unable to add a properties file to a jar file.  Ant task:
> 
> 	 <target name="firstjar" depends="manifest">
> 		 <jar jarfile="${jars.project}" >
> 			<fileset refid="files.sweethome.class" />
> 		 </jar>
> 	 </target>
> 	 <target name="deploy" depends="firstjar">
> 		 <jar jarfile="${jars.project}" update="true" 
> 		 	includesfile="sweethome.properties" >
> 		 </jar>
> 	 </target>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org