ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Weighill-Smith <phil.weighill-sm...@volantis.com>
Subject Re: getting files name by a text file and doing a jar
Date Thu, 11 Nov 2004 15:53:18 GMT
Sorry, I think someone else who uses Ant on NT will have to help from
this point on...

Don't know why you should have trouble with "/" (Ant leverages Java's
file name management feature that automatically adapts filenames between
UNIX and Windows forms).

I can only guess that this problem is due to the directory scanner in
the fileset being initialized with "/" or "E:/" then finding that the
include patterns also start with "E:/".

Not sure how to get round this issue without doing something nasty like
using <replace> to remove the "E:/" (or "E:\") from the list file
filenames. Maybe there's some form of "selector" that you can use
instead...?

Phil :n.

On Thu, 2004-11-11 at 15:44, gdilem@libero.it wrote:

> i'm working on windos NT .It does not recognize "/"....
> It does not work.If I add E: (the volume where all the file paths starts)does not work
as well
> Help
> 
> ---------- Initial Header -----------
> 
> From      : "Phil Weighill-Smith" phil.weighill-smith@volantis.com
> To          : "Ant Developers List" dev@ant.apache.org
> Cc          : 
> Date      : Thu, 11 Nov 2004 14:46:51 +0000
> Subject : Re: getting files name by a text file and doing a jar
> 
> > Sorry, I misread your example (didn't spot the includesfile attribute on
> > the jar element and just saw the fileset! Assuming that all your
> > filenames in the ${file.set.toJar} file are absolute filenames you
> > probably need to change basedir:
> > 
> > <jar destfile="${jar.name}" basedir="/" includesfile="${file.set.toJar}"
> > >
> >     <fileset file="${jar.manifest.dir}"/>
> >     <manifest>
> >         <attribute name="Built-By" value="${build.by.jar}"/>
> >         <attribute name="Manifest-Version" value="1.0"/>
> >         <attribute name="Class-Path" value="${jar.classpath.dir}"/>
> >     </manifest>
> > </jar>
> > 
> > 
> > > On Thu, 2004-11-11 at 14:33, gdilem@libero.it wrote:
> > > sorry I'm not sure to understand you ....
> > > a line like that  <jar destfile="${jar.name}"  basedir="." includesfile="${file.set.toJar}"
>
> > > is not what u mean?
> > > Could you write me the xml line please
> > > Regards
> > > 
> > > 
> > > 
> > > ---------- Initial Header -----------
> > > 
> > > From      : "Phil Weighill-Smith" phil.weighill-smith@volantis.com
> > > To          : "Ant Developers List" dev@ant.apache.org
> > > Cc          : 
> > > Date      : Thu, 11 Nov 2004 14:26:40 +0000
> > > Subject : Re: getting files name by a text file and doing a jar
> > > 
> > > > You must use the includesfile attribute, not the file attribute. You
> > > > will also have to specify a dir attribute that the files in the
> > > > includesfile are relative to... if they aren't relative, you could try
> > > > "/" as the directory for the fileset.
> > > > 
> > > > On Thu, 2004-11-11 at 14:17, gdilem@libero.it wrote:
> > > > 
> > > > > get problem!! It does a jar but does not include all the files described
in file.set.toJar.Take a look please!
> > > > > I post you my build xml
> > > > > 
> > > > > <?xml version="1.0"?>
> > > > > <!DOCTYPE project [       
> > > > > ]>
> > > > > <project name="Automatic Packager" basedir=".">
> > > > >    <property file="${basedir}/automaticPackager.properties"/>
> > > > >    <property name="jar.output.dir"  	value="${jar.output.dir}"/>
> > > > >    <property name="jar.name"  			value="${jar.name}"/>
> > > > >    <property name="jar.base.dir"  		value="${jar.base.dir}"/>
> > > > >    <property name="jar.manifest.file"   value="${jar.manifest.file}"/>
> > > > >    <property name="build.by.jar" 		value="${build.by.jar}"/>
> > > > >    <property name="jar.classpath.dir" 	value="${jar.classpath.dir}"/>
> > > > >    <!-- file.set.toJar e il file di test che contiene tutti i
file da jarrare! -->
> > > > >    <property name="file.set.toJar" 	value="${file.set.toJar}"/>
> > > > >    <!-- ===================================================================
-->
> > > > >    <!-- Make jar file                                        
          -->
> > > > >    <!-- ===================================================================
-->
> > > > >    <target name="jar">
> > > > > 	    <mkdir dir="${jar.output.dir}"/>
> > > > > 			<jar destfile="${jar.name}"  basedir="." includesfile="${file.set.toJar}"
>
> > > > > 		    	<fileset file="${jar.manifest.dir}"/>
> > > > > 				<manifest>
> > > > > 				<attribute name="Built-By" value="${build.by.jar}"/>
> > > > > 				<attribute name="Manifest-Version" value="1.0"/>
> > > > > 				<attribute name="Class-Path" value="${jar.classpath.dir}"/>
> > > > > 			</manifest>
> > > > > 		</jar>
> > > > >    </target>
> > > > > </project> 
> > > > > 
> > > > > ---------- Initial Header -----------
> > > > > 
> > > > > From      : "Phil Weighill-Smith" phil.weighill-smith@volantis.com
> > > > > To          : "Ant Developers List" dev@ant.apache.org
> > > > > Cc          : 
> > > > > Date      : Thu, 11 Nov 2004 13:47:23 +0000
> > > > > Subject : Re: getting files name by a text file and doing a jar
> > > > > 
> > > > > > Can't you just use a <jar> task with a nested <fileset>
with the
> > > > > > includesfile attribute set to point to your file containing
the list of
> > > > > > filenames?
> > > > > > 
> > > > > > Phil :n.
> > > > > > 
> > > > > > On Thu, 2004-11-11 at 13:42, gdilem@libero.it wrote:
> > > > > > 
> > > > > > > Hi all
> > > > > > > I'd like to read from a text file a sequence of files to
add to a jar.Actually I do not know how ant can help me.
> > > > > > > What I want is a build.xml that real all the lines of a
text file (each rows describe a file name to jar)
> > > > > > > and doing a unique jar.
> > > > > > > Is it possible?
> > > > > > > Regards
> > > > > > > Giovanni
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > ____________________________________________________________
> > > > > > > Libero ADSL: navighi gratis a 1.2 Mega, senza canone e
costi di attivazione. 
> > > > > > > Abbonati subito su http://www.libero.it
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > > > > > > For additional commands, e-mail: dev-help@ant.apache.org
> > > > > > 
> > > > > > -- 
> > > > > > Phil Weighill-Smith <phil.weighill-smith@volantis.com>
> > > > > > Volantis Systems
> > > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > ____________________________________________________________
> > > > > Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione.

> > > > > Abbonati subito su http://www.libero.it
> > > > > 
> > > > > 
> > > > > 
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > > > > For additional commands, e-mail: dev-help@ant.apache.org
> > > > 
> > > > -- 
> > > > Phil Weighill-Smith <phil.weighill-smith@volantis.com>
> > > > Volantis Systems
> > > > 
> > > 
> > > 
> > > 
> > > ____________________________________________________________
> > > Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione.

> > > Abbonati subito su http://www.libero.it
> > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > > For additional commands, e-mail: dev-help@ant.apache.org
> > 
> > -- 
> > Phil Weighill-Smith <phil.weighill-smith@volantis.com>
> > Volantis Systems
> > 
> 
> 
> 
> ____________________________________________________________
> Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione. 
> Abbonati subito su http://www.libero.it
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org

-- 
Phil Weighill-Smith <phil.weighill-smith@volantis.com>
Volantis Systems

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