You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Cloudor Pu <cl...@etang.com> on 2002/06/05 22:20:35 UTC
[ant]how to use and in ?
hello,
Can anybody show me an example?
I got messages as :
------
BUILD FAILED
/.../build.xml:25: Class org.apache.tools.ant.types.PatternSet$NameEntry
doesn't support the nested "mapper" element.
------
when i run a build.xml containing :
-------------------------------------------------------
<patternset id="src.files">
<include name="foo"/>
<include name="bar"/>
<include name="bla"/>
</patternset>
<!-- ..... -->
<javac destdir="${build.classes.dir}">
<src path="${src.dir}"/>
<include>
<mapper type="glob" from="*" to="*.java"/>
<patternset refid="src.files"/>
</include>
</javac>
--------------------------------------------------------
thanks in advance!
Cloudor
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [ant]how to use and in ?
Posted by Stefan Bodewig <bo...@apache.org>.
On 20 Jun 2002, Cloudor Pu <cl...@etang.com> wrote:
> I want to make a patternset without file suffix and specify the
> suffix when using this patternset in different cases, say, <javac>,
> <copy>, <delete>, <jar> etc.
Something like this should do it (Ant 1.5):
<selector id="the stuff I want without extension">
<filename name="foo.*" />
...
</selector>
<selector id="java files">
<and>
<selector refid="the stuff I want without extension" />
<filename name="*.java" />
</and>
</selector>
<selector id="class files">
<and>
<selector refid="the stuff I want without extension" />
<filename name="*.class" />
</and>
</selector>
<javac ...>
<selector refid="java files" />
</javac>
<jar ...>
<selector refid="class files" />
</jar>
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [ant]how to use and in ?
Posted by Cloudor Pu <cl...@etang.com>.
> > I want to use the patternset id in a <javac> then use it in a <jar>
> > with different file suffixes--".java" and ".class".
>
> <include name="foo.*" /> ?
>
> Stefan
>
But i don't want to include all foo.* in my jar, only foo.class.
I want to make a patternset without file suffix and specify the suffix
when using this patternset in different cases, say, <javac>, <copy>,
<delete>, <jar> etc.
regards,
Cloudor
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [ant]how to use and in ?
Posted by Stefan Bodewig <bo...@apache.org>.
On 19 Jun 2002, Cloudor Pu <cl...@etang.com> wrote:
> I want to use the patternset id in a <javac> then use it in a <jar>
> with different file suffixes--".java" and ".class".
<include name="foo.*" /> ?
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [ant]how to use and in ?
Posted by Cloudor Pu <cl...@etang.com>.
在 2002-06-12 三 的 05:05, Diane Holt --写道:
> --- Cloudor Pu <cl...@etang.com> wrote:
> > What i am trying to do is to:
> > do <mapper> on a <patternset>, then use the result in <javac>.
> > For example, there are some files named "foo.java", "bar.java" and
> > "bla.java", and i define a patternset without their suffix ".java"
> > like this:
> > <patternset id="names">
> > <include name="foo"/>
> > <include name="bar"/>
> > <include name="bla"/>
> > </patternset>
> > I want to use the id of the patternset in a <javac>. How to do?
>
> Well, the short answer is: You can't -- not along with a <mapper> anyway.
> But the question still remains: Why are you setting your pattern without
> the .java extension -- what is it that you're actually trying to do?
I want to use the patternset id in a <javac> then use it in a <jar> with
different file suffixes--".java" and ".class".
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [ant]how to use and in ?
Posted by Diane Holt <ho...@yahoo.com>.
--- Cloudor Pu <cl...@etang.com> wrote:
> What i am trying to do is to:
> do <mapper> on a <patternset>, then use the result in <javac>.
> For example, there are some files named "foo.java", "bar.java" and
> "bla.java", and i define a patternset without their suffix ".java"
> like this:
> <patternset id="names">
> <include name="foo"/>
> <include name="bar"/>
> <include name="bla"/>
> </patternset>
> I want to use the id of the patternset in a <javac>. How to do?
Well, the short answer is: You can't -- not along with a <mapper> anyway.
But the question still remains: Why are you setting your pattern without
the .java extension -- what is it that you're actually trying to do?
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [ant]how to use and in ?
Posted by Cloudor Pu <cl...@etang.com>.
Hello,
i am sorry for my unclear question.
What i am trying to do is to:
do <mapper> on a <patternset> ,then use the result in <javac>.
For example, there are some files named "foo.java", "bar.java" and
"bla.java", and i define a patternset without their suffix ".java"
like this:
<patternset id="names">
<include name="foo"/>
<include name="bar"/>
<include name="bla"/>
</patternset>
I want to use the id of the patternset in a <javac>. How to do?
Thank you.
Regards,
Cloudor
在 2002-06-05 三 的 21:46, Diane Holt 写道:
> What is it you're actually trying to do?
>
> Diane
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [ant]how to use and in ?
Posted by Diane Holt <ho...@yahoo.com>.
What is it you're actually trying to do?
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>