ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Louis BOUDART" <jeanlouis.boud...@gmail.com>
Subject Re: EasyAnt <use>/<extends> vs <import>
Date Thu, 13 Nov 2008 07:13:16 GMT
I'm using <import>, but it seems that aliases are also applied on <import> i
thought it was what you were excepecting. In our first patch <import> was'nt
prefixed.
I'll try to give you details

<project name="userBuild">
<import file="build-std-java"/>
</project>

<project name="org.apache.easyant#build-std-java">
<import file="phase"/>
<include file="compile-java" as="compile"/>
...
<include file="whatever" as"myPrefix"/>
</project>


<project name="org.apache.easyant#compile-java">
<target name="iLikeToCompileJavaClasses" description="i like to compile java
classes :)"/>
</project>


<project name="org.apache.easyant#whatever">
<target name="plop" description="foo bar"/>
</project>

by typing ant -p i can see
org.apache.easyant#build-std-java.compile.iLikeToCompileJavaClasses --> i
like to compile java classes :)
org.apache.easyant#build-std-java.myPrefix.plop --> foo bar

As you can see it seems that even using <import> without as attribute, it
seems that my <import> has been prefixed with ant project name.
In my case i want to see build-std-java target as if it was my current build
script (ie without prefix) :
compile.iLikeToCompileJavaClasses --> i like to compile java classes :)
myPrefix.plop --> foo bar



2008/11/13 Stefan Bodewig <bodewig@apache.org>

> On 2008-11-12, Jean-Louis BOUDART <jeanlouis.boudart@gmail.com> wrote:
>
> > In addition to this, i think that we should add a way to disable
> prefixing,
> > i have a use case in easyant where i don't want to use prefix.
>
> Why don't you use <import> instead of <include> in that case?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message