You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by La...@nokia.com on 2003/09/02 12:56:07 UTC
Ant help..
Hi friends,
Thanks for such a live discussion on the thread "how to exclude...". As some of you have suggested it's true that the problem is not with the ant exclude itself but a compiled file is trying to access the file which I was excluding. This was because it's such a big build with 1000's of files most of which are written by someone else.
I have one more Question to the experts...below
I have two ant build files in a single directory namely build.xml and mybuild.xml. If I have a target with the same name ( let's say they are for slightly different purpose ), how can I differentiate which target should be executed. what command ??
And the strange thing for me is little more than this
I have a target called "compile1" in mybuild.xml. When I am executing "ant compile1", it somehow processing build.xml though it do not have compile1 target in it. So how can I execute compile1 target in mybuild.xml if the 2 files are in the same directory ?? What command ??
Thanks..
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: How to direct output (*_Stub.class es) to a destination dir
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 4 Sep 2003, D. Bamud <no...@cad.delhi.nic.in> wrote:
> <move> workaround is fine but I want to put a condition that
> it should not regenerate the *_Stub.class files and move
> everytime I run ant.
True.
> How to avoid this.
Another workaround, <copy> from your final destination to your other
classes before invoking <rmic>. I.e.
<copy todir="build">
<fileset dir="final-location" includes="**/*_Stub.class"/>
</copy>
<rmic/>
<move todir="final-location">
<fileset dir="build" includes="**/*_Stub.class"/>
</move>
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: How to direct output (*_Stub.class es) to a destination dir
Posted by D Bamud <no...@cad.delhi.nic.in>.
<move> workaround is fine but I want to put a condition that
it should not regenerate the *_Stub.class files and move
everytime I run ant. What is happening is that everytime
I make build, the *_Stub.class files are again generated and moved,
no matter if the RMI Impl classes are modified or not. How to
avoid this.
Thanks
----- Original Message -----
From: "Stefan Bodewig" <bo...@apache.org>
To: <us...@ant.apache.org>
Sent: Wednesday, September 03, 2003 12:04 PM
Subject: Re: How to direct <rmic ...> output (*_Stub.class es) to a destination dir
| On Wed, 3 Sep 2003, D. Bamud <no...@cad.delhi.nic.in> wrote:
|
| > My RMI classes are in ${server} dir. If I provide
| > --base="${server}-- (-- not included) in below given target then I
| > get the *_Stub.class files in the "${server}" dir. I want them to
| > go in a separate dir --${stub}--. How to do that.
|
| Vote for <http://issues.apache.org/bugzilla/show_bug.cgi?id=20699> and
| maybe even provide the patch necessary to implement the feature 8-)
|
| <rmic> cannot do that, yet. As a workaround you can simply <move> the
| generated files after <rmic>, simply include **/*_Stub.class.
|
| Stefan
|
| ---------------------------------------------------------------------
| 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: How to direct output (*_Stub.class es) to a destination dir
Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 3 Sep 2003, D. Bamud <no...@cad.delhi.nic.in> wrote:
> My RMI classes are in ${server} dir. If I provide
> --base="${server}-- (-- not included) in below given target then I
> get the *_Stub.class files in the "${server}" dir. I want them to
> go in a separate dir --${stub}--. How to do that.
Vote for <http://issues.apache.org/bugzilla/show_bug.cgi?id=20699> and
maybe even provide the patch necessary to implement the feature 8-)
<rmic> cannot do that, yet. As a workaround you can simply <move> the
generated files after <rmic>, simply include **/*_Stub.class.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
How to direct output (*_Stub.class es) to a destination dir
Posted by D Bamud <no...@cad.delhi.nic.in>.
My RMI classes are in ${server} dir. If I provide --base="${server}--
(-- not included) in below given target then I get the *_Stub.class files in the
"${server}" dir. I want them to go in a separate dir --${stub}--. How
to do that.
<target name="rmi" depends="server" description="Compile RMI Impl server classes">
<mkdir dir="${stub}"/>
<rmic includes="**/*Impl.class"
base="${stub}"
stubversion="1.2"
verify="true">
<classpath path="${server}"/>
</rmic>
<echo level="info">Done</echo>
</target>
I read the manual and it says that "base" provides
"the location to store the compiled files". If I specifically provide
the files to compile and --base="${stub}--then it works fine
but when I use "includes" attribute it doesn't. I also tried providing
<compilerarg><line>... for "-d stub_dir" but no success.
What should I do.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Could not direct output to a destination dir
Posted by D Bamud <no...@cad.delhi.nic.in>.
<target name="rmi" depends="server" description="Compile RMI Impl server classes">
<mkdir dir="${stub}"/>
<rmic includes="**/*Impl.class"
base="${stub}"
stubversion="1.2"
verify="true">
<classpath path="${server}"/>
</rmic>
<echo level="info">Done</echo>
</target>
My RMI classes are in ${server} dir. If I provide --base="${server}--
(-- not included) in above target then I get the *_Stub.class files in the
"${server}" dir. I want then to go in a separate dir --${stub}--. How
to do that.
I read the manual and it says that "base" provides
"the location to store the compiled files". If I specifically provide
the files to compile and --base="${stub}--then it works fine
but when I use "includes" attribute it doesn't. I also tried providing
<compilerarg><line>... for "-d stub_dir" but no success.
What should I do.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant help..
Posted by Antoine Levy-Lambert <an...@antbuild.com>.
----- Original Message -----
From: <La...@nokia.com>
To: <us...@ant.apache.org>
Sent: Tuesday, September 02, 2003 12:56 PM
Subject: Ant help..
> I have two ant build files in a single directory namely build.xml and
mybuild.xml. If I have a target with the same name ( let's say they >are for
slightly different purpose ), how can I differentiate which target should be
executed. what command ??
>And the strange thing for me is little more than this
>I have a target called "compile1" in mybuild.xml. When I am executing "ant
compile1", it somehow processing build.xml though it do >not have compile1
target in it.
When you do not use ant -f [filename], ant assumes you want to use build.xml
When you do ant compile1, ant will execute the root part of build.xml, until
it realizes that the target compile1 does not exist in the file build.xml.
ant never looks spontaneously at several build files in a directory. Some
tasks allow to use other build files ( <ant/>, <subant/>, <import/> ) but
then you know (or should know) what you are doing.
> So how can I execute compile1 target in mybuild.xml if the 2 files are in
the same directory ??
ant -f mybuild.xml compile1
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org