You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Knuplesch,
Jürgen <Ju...@icongmbh.de> on 2008/01/24 10:00:09 UTC
Rmic problems
Hi everybody,
I come across with a problem with rmic.
I might have found sth. Like a bug or mysterios behaviour of Ant 1.7.
I was working wit Ant 1.6.5 and still do. But my Eclipse DIE changed to ANT 1.7.
If I run the following rmic task:
<rmic base="${dope.rmic.dest}"
debug="true"
verify="yes"
classpathref="classpath"
stubversion="1.2">
<compilerarg value="-v1.2"/>
<patternset refid="rmic" />
</rmic>
I get errors like:
: Class de.... already defined in D:\..._Stub.java.
The compile ist still successfull, but the build stops.
If I run it a second time, it works.
If i run it with 1.6.5 it works fine.
The problem is my compilerarg that duplicates the stubversion argument. If I delete it like this:
<rmic base="${dope.rmic.dest}"
debug="true"
verify="yes"
classpathref="classpath"
stubversion="1.2">
<patternset refid="rmic" />
</rmic>
Then everything is fine with Ant 1.7
My guess is, that the rmic-Task does sometimes two compiles if both arguments (stubversion and compilerarg value="-v1.2") are included. The first compile works, but the second compile ist shocked, that the stubs are already there and quits the whole build-process.
1.7 is always setting the stubversion attribut (1.6.5 not!). So the problem appears as well, when you only use the compilerarg.
Is this the truth or do I have a different problem?
Greetings
Jürgen
--
Jürgen Knuplesch www.icongmbh.de
icon Systemhaus GmbH Tel. +49 711 806098-275
Sophienstraße 40
D-70178 Stuttgart Fax. +49 711 806098-299
Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Rmic problems
Posted by Steve Loughran <st...@apache.org>.
Knuplesch wrote:
> Hi everybody,
>
> I come across with a problem with rmic.
> I might have found sth. Like a bug or mysterios behaviour of Ant 1.7.
>
> I was working wit Ant 1.6.5 and still do. But my Eclipse DIE changed to ANT 1.7.
>
> If I run the following rmic task:
>
> <rmic base="${dope.rmic.dest}"
> debug="true"
> verify="yes"
> classpathref="classpath"
> stubversion="1.2">
> <compilerarg value="-v1.2"/>
> <patternset refid="rmic" />
> </rmic>
>
> I get errors like:
> : Class de.... already defined in D:\..._Stub.java.
>
> The compile ist still successfull, but the build stops.
>
> If I run it a second time, it works.
>
> If i run it with 1.6.5 it works fine.
>
> The problem is my compilerarg that duplicates the stubversion argument. If I delete it like this:
>
> <rmic base="${dope.rmic.dest}"
> debug="true"
> verify="yes"
> classpathref="classpath"
> stubversion="1.2">
> <patternset refid="rmic" />
> </rmic>
>
> Then everything is fine with Ant 1.7
>
> My guess is, that the rmic-Task does sometimes two compiles if both arguments (stubversion and compilerarg value="-v1.2") are included. The first compile works, but the second compile ist shocked, that the stubs are already there and quits the whole build-process.
>
> 1.7 is always setting the stubversion attribut (1.6.5 not!). So the problem appears as well, when you only use the compilerarg.
>
We made some changes in rmic for ant1.7 to move to java 1.5 more
gracefully...I think it likes to know what version you are having
through stubversion. Looking at the code, if you set stubversion="1.2",
the task adds -v1.2 to the command line, so the extra compilerarg is
needless. Remove it.
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org