You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by T Master <tm...@iknowledgeinc.com> on 2001/08/10 00:56:47 UTC

jar not working with fileset?

I have a target to jar up my classes.
I have a patternset in use with a fileset.  Yet an empty jar file is being
produced.

What am I doing wrong?


    <target name="jarProject" depends="init, compileProject">
        <jar jarfile="${dist.dir}/${app.name}.jar">
            <fileset dir="${basedir}">
                <patternset refid="appserver.build.classes"/>
            </fileset>
        </jar>
    </target>

T Master


Re: jar not working with fileset?

Posted by T Master <tm...@iknowledgeinc.com>.
The patternset works for compiling though, that's what is so mysterious.

I have a target to jar up my classes.
I have a patternset in use with a fileset.  Yet an empty jar file is being
produced.

What am I doing wrong?

The property paths are correct as they work for delete and javac.

    <patternset id="appserver.build.classes" >
        <include name="${project.build.dir}/**/*.class" />
        <include name="${project.build.dir}/api/**/*.class" />
    </patternset>

    <target name="jarProject" depends="init, compileProject">
        <jar jarfile="${dist.dir}/${app.name}.jar">
            <fileset dir="${basedir}">
                <patternset refid="appserver.build.classes"/>
            </fileset>
        </jar>
    </target>


If i use jar's attribute includes with the same pattern, everything works!

T Master


----- Original Message ----- 
From: "Ylan Segal" <yl...@digiworks.tv>
To: <an...@jakarta.apache.org>
Sent: Thursday, August 09, 2001 6:11 PM
Subject: RE: jar not working with fileset?


> > What am I doing wrong?
> Can you post the rest also the patternset?
> I bet your problem is there. 
> 
> Ylan



RE: jar not working with fileset?

Posted by Ylan Segal <yl...@digiworks.tv>.
> What am I doing wrong?
Can you post the rest also the patternset?
I bet your problem is there. 

Ylan

> 
> 
>     <target name="jarProject" depends="init, compileProject">
>         <jar jarfile="${dist.dir}/${app.name}.jar">
>             <fileset dir="${basedir}">
>                 <patternset refid="appserver.build.classes"/>
>             </fileset>
>         </jar>
>     </target>
> 
> T Master
>