You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Chun Ji <CJ...@pro-unlimited.com> on 2006/06/30 20:17:08 UTC
Help with this build.xml
Question:
I want to put some files in a fileset, so that I can build them one by one, such as
<fileset dir="src.dir">
<patternset id="compile.dir">
<include name="com/supplier/domain">
<include name="com/supplier/dao">
<include name="com/manager/domain">
<include name="com/manager/dao">
...
</fileset>
but somehow in ant, "Javac" does not acccept this "<fileset>", do you know a way to work arond.
cj
-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com]
Sent: Friday, June 30, 2006 6:48 AM
To: Ant Users List; jim.fuller@ruminate.co.uk
Subject: Re: help to compile c / c++ files in ant
Importance: Low
Nice. You can also make cc-elements implicit, so that you don't have
to specify it when using <call-cc>. --DD
On 6/30/06, James Fuller <ji...@ruminate.co.uk> wrote:
> Here is a nice illustration in context of using cc with macrodef.
>
> http://ant.apache.org/manual/CoreTasks/macrodef.html
>
>
> definition:
> <macrodef name="call-cc">
> <attribute name="target"/>
> <attribute name="link"/>
> <attribute name="target.dir"/>
> <element name="cc-elements"/>
> <sequential>
> <mkdir dir="${obj.dir}/@{target}"/>
> <mkdir dir="@{target.dir}"/>
> <cc link="@{link}" objdir="${obj.dir}/@{target}"
> outfile="@{target.dir}/@{target}">
> <compiler refid="compiler.options"/>
> <cc-elements/>
> </cc>
> </sequential>
> </macrodef>
>
>
> usage:
>
> <call-cc target="unittests" link="executable"
> target.dir="${build.bin.dir}">
> <cc-elements>
> <includepath location="${gen.dir}"/>
> <includepath location="test"/>
> <fileset dir="test/unittest" includes = "**/*.cpp"/>
> <fileset dir="${gen.dir}" includes = "*.cpp"/>
> <linker refid="linker-libs"/>
> </cc-elements>
> </call-cc>
>
> gl, Jim Fuller
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Help with this build.xml
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Chun Ji,
you should look at the manual http://ant.apache.org/manual/CoreTasks/javac.html
the 4th, 5th and 6th examples show how the XML tags to compile should look like.
instead of this :
<include name="com/manager/domain">
use this
<include name="com/manager/domain/**">
Regards,
Antoine
-------- Original-Nachricht --------
Datum: Fri, 30 Jun 2006 11:17:08 -0700
Von: Chun Ji <CJ...@pro-unlimited.com>
An: Ant Users List <us...@ant.apache.org>
Betreff: Help with this build.xml
>
> Question:
> I want to put some files in a fileset, so that I can build them one by
> one, such as
> <fileset dir="src.dir">
> <patternset id="compile.dir">
> <include name="com/supplier/dao">
> <include name="com/manager/domain">
> <include name="com/manager/dao">
> ...
> </fileset>
>
> but somehow in ant, "Javac" does not acccept this "<fileset>", do you know
> a way to work arond.
>
>
>
> cj
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Help with this build.xml
Posted by pr...@polaris.co.in.
the below reply also works.. otherwise
If i am getting you correct.. Do it this way..
<property name="test-java-dir" location="./test/java"/>
<property name="build-java" location="./build/java"/>
<mkdir dir="${build-java}"/>
<target name="compile-test-java" depends="init" description="compile the
source " >
<javac srcdir="${test-java-dir}" destdir="${build-java}">
<classpath refid="test.classpath"/>
</javac>
</target>
For different modules use the above, & call the target name in order you
wish..
"Res Pons" <po...@hotmail.com>
06/30/2006 11:55 PM
Please respond to "Ant Users List"
To: user@ant.apache.org
cc: (bcc: prashanth.l/Polaris)
Subject: RE: Help with this build.xml
in <include name="com/manager/domain">
if those are classes then they shoule be in the form of com.manager.*
instead of slashes. if they're directories relative to your
project/wroking folder then they need to be more complete than just
<include name="com/manager/domain">
more like <include name="com/manager/domain/*.*">
----Original Message Follows----
From: "Chun Ji" <CJ...@pro-unlimited.com>
Reply-To: "Ant Users List" <us...@ant.apache.org>
To: "Ant Users List" <us...@ant.apache.org>
Subject: Help with this build.xml
Date: Fri, 30 Jun 2006 11:17:08 -0700
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by
bay0-mc9-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Fri,
30
Jun 2006 11:18:47 -0700
Received: (qmail 17931 invoked by uid 500); 30 Jun 2006 18:17:30 -0000
Received: (qmail 17920 invoked by uid 99); 30 Jun 2006 18:17:30 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by
apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jun 2006 11:17:30 -0700
Received: pass (asf.osuosl.org: local policy)
Received: from [67.104.17.130] (HELO exchbg03.prounlimited.corp)
(67.104.17.130) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jun
2006
11:17:29 -0700
X-Message-Info: txF49lGdW42s2VAVLI0fHKjMiQpFW+5lwATp8Skmbi4=
Mailing-List: contact user-help@ant.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <ma...@ant.apache.org>
List-Help: <ma...@ant.apache.org>
List-Post: <ma...@ant.apache.org>
List-Id: "Ant Users List" <user.ant.apache.org>
Delivered-To: mailing list user@ant.apache.org
X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
X-Spam-Check-By: apache.org
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: help to compile c / c++ files in ant
Thread-Index: AcacS878Iu4iu33yQ2OtM7QE2qtKWAAI0CyQ
X-Virus-Checked: Checked by ClamAV on apache.org
Return-Path: user-return-56928-pons32=hotmail.com@ant.apache.org
X-OriginalArrivalTime: 30 Jun 2006 18:18:48.0214 (UTC)
FILETIME=[A18B5B60:01C69C71]
Question:
I want to put some files in a fileset, so that I can build them one by
one,
such as
<fileset dir="src.dir">
<patternset id="compile.dir">
<include name="com/supplier/domain">
<include name="com/supplier/dao">
<include name="com/manager/domain">
<include name="com/manager/dao">
...
</fileset>
but somehow in ant, "Javac" does not acccept this "<fileset>", do you know
a
way to work arond.
cj
-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com]
Sent: Friday, June 30, 2006 6:48 AM
To: Ant Users List; jim.fuller@ruminate.co.uk
Subject: Re: help to compile c / c++ files in ant
Importance: Low
Nice. You can also make cc-elements implicit, so that you don't have
to specify it when using <call-cc>. --DD
On 6/30/06, James Fuller <ji...@ruminate.co.uk> wrote:
> Here is a nice illustration in context of using cc with macrodef.
>
> http://ant.apache.org/manual/CoreTasks/macrodef.html
>
>
> definition:
> <macrodef name="call-cc">
> <attribute name="target"/>
> <attribute name="link"/>
> <attribute name="target.dir"/>
> <element name="cc-elements"/>
> <sequential>
> <mkdir dir="${obj.dir}/@{target}"/>
> <mkdir dir="@{target.dir}"/>
> <cc link="@{link}" objdir="${obj.dir}/@{target}"
> outfile="@{target.dir}/@{target}">
> <compiler refid="compiler.options"/>
> <cc-elements/>
> </cc>
> </sequential>
> </macrodef>
>
>
> usage:
>
> <call-cc target="unittests" link="executable"
> target.dir="${build.bin.dir}">
> <cc-elements>
> <includepath location="${gen.dir}"/>
> <includepath location="test"/>
> <fileset dir="test/unittest" includes = "**/*.cpp"/>
> <fileset dir="${gen.dir}" includes = "*.cpp"/>
> <linker refid="linker-libs"/>
> </cc-elements>
> </call-cc>
>
> gl, Jim Fuller
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
Visit us at http://www.polaris.co.in
RE: Help with this build.xml
Posted by Res Pons <po...@hotmail.com>.
in <include name="com/manager/domain">
if those are classes then they shoule be in the form of com.manager.*
instead of slashes. if they're directories relative to your
project/wroking folder then they need to be more complete than just
<include name="com/manager/domain">
more like <include name="com/manager/domain/*.*">
----Original Message Follows----
From: "Chun Ji" <CJ...@pro-unlimited.com>
Reply-To: "Ant Users List" <us...@ant.apache.org>
To: "Ant Users List" <us...@ant.apache.org>
Subject: Help with this build.xml
Date: Fri, 30 Jun 2006 11:17:08 -0700
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by
bay0-mc9-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Fri, 30
Jun 2006 11:18:47 -0700
Received: (qmail 17931 invoked by uid 500); 30 Jun 2006 18:17:30 -0000
Received: (qmail 17920 invoked by uid 99); 30 Jun 2006 18:17:30 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by
apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jun 2006 11:17:30 -0700
Received: pass (asf.osuosl.org: local policy)
Received: from [67.104.17.130] (HELO exchbg03.prounlimited.corp)
(67.104.17.130) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jun 2006
11:17:29 -0700
X-Message-Info: txF49lGdW42s2VAVLI0fHKjMiQpFW+5lwATp8Skmbi4=
Mailing-List: contact user-help@ant.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <ma...@ant.apache.org>
List-Help: <ma...@ant.apache.org>
List-Post: <ma...@ant.apache.org>
List-Id: "Ant Users List" <user.ant.apache.org>
Delivered-To: mailing list user@ant.apache.org
X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
X-Spam-Check-By: apache.org
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: help to compile c / c++ files in ant
Thread-Index: AcacS878Iu4iu33yQ2OtM7QE2qtKWAAI0CyQ
X-Virus-Checked: Checked by ClamAV on apache.org
Return-Path: user-return-56928-pons32=hotmail.com@ant.apache.org
X-OriginalArrivalTime: 30 Jun 2006 18:18:48.0214 (UTC)
FILETIME=[A18B5B60:01C69C71]
Question:
I want to put some files in a fileset, so that I can build them one by one,
such as
<fileset dir="src.dir">
<patternset id="compile.dir">
<include name="com/supplier/domain">
<include name="com/supplier/dao">
<include name="com/manager/domain">
<include name="com/manager/dao">
...
</fileset>
but somehow in ant, "Javac" does not acccept this "<fileset>", do you know a
way to work arond.
cj
-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com]
Sent: Friday, June 30, 2006 6:48 AM
To: Ant Users List; jim.fuller@ruminate.co.uk
Subject: Re: help to compile c / c++ files in ant
Importance: Low
Nice. You can also make cc-elements implicit, so that you don't have
to specify it when using <call-cc>. --DD
On 6/30/06, James Fuller <ji...@ruminate.co.uk> wrote:
> Here is a nice illustration in context of using cc with macrodef.
>
> http://ant.apache.org/manual/CoreTasks/macrodef.html
>
>
> definition:
> <macrodef name="call-cc">
> <attribute name="target"/>
> <attribute name="link"/>
> <attribute name="target.dir"/>
> <element name="cc-elements"/>
> <sequential>
> <mkdir dir="${obj.dir}/@{target}"/>
> <mkdir dir="@{target.dir}"/>
> <cc link="@{link}" objdir="${obj.dir}/@{target}"
> outfile="@{target.dir}/@{target}">
> <compiler refid="compiler.options"/>
> <cc-elements/>
> </cc>
> </sequential>
> </macrodef>
>
>
> usage:
>
> <call-cc target="unittests" link="executable"
> target.dir="${build.bin.dir}">
> <cc-elements>
> <includepath location="${gen.dir}"/>
> <includepath location="test"/>
> <fileset dir="test/unittest" includes = "**/*.cpp"/>
> <fileset dir="${gen.dir}" includes = "*.cpp"/>
> <linker refid="linker-libs"/>
> </cc-elements>
> </call-cc>
>
> gl, Jim Fuller
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org