You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jon Baer <jo...@digitalanywhere.com> on 2001/03/16 06:25:43 UTC

.properties and .xml files

Sorry if this is a "newbie" question but I recently wrote a build.xml for my
open source project and I noticed that any .properties file and .xml files
including under my /src directory were not transfered over or included with my
.jar.

Is there a setting Im suppose to be looking @ for including these files?

Thanks.

- Jonm


Re: .properties and .xml files

Posted by Nico Seessle <ni...@apache.org>.
----- Original Message -----
From: "Jon Baer" <jo...@digitalanywhere.com>
To: <an...@jakarta.apache.org>
Sent: Friday, March 16, 2001 6:25 AM
Subject: .properties and .xml files


> Sorry if this is a "newbie" question but I recently wrote a build.xml for
my
> open source project and I noticed that any .properties file and .xml files
> including under my /src directory were not transfered over or included
with my
> .jar.
>
> Is there a setting Im suppose to be looking @ for including these files?
>

How does the part of the build.xml that "does not work" look like? Normally
Ant simply does everthing you tell it to do and should not exclude files
(other than documented here
http://jakarta.apache.org/ant/manual/dirtasks.html for some tasks).

Nico



Re: .properties and .xml files

Posted by Peter Donald <do...@apache.org>.
At 12:25  16/3/01 -0500, Jon Baer wrote:
>Sorry if this is a "newbie" question but I recently wrote a build.xml for my
>open source project and I noticed that any .properties file and .xml files
>including under my /src directory were not transfered over or included
with my
>.jar.
>
>Is there a setting Im suppose to be looking @ for including these files?

nope. Just use the copy task something like

    <copy todir="${build.classes}">
      <fileset dir="${java.dir}">
        <include name="**/*.properties"/>
        <include name="**/*.xml"/>
      </fileset>
    </copy>

or

    <copy todir="${build.classes}">
      <fileset dir="${java.dir}">
        <exclude name="**/*.java"/>
      </fileset>
    </copy>
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*