You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2025/04/12 15:28:00 UTC
[jira] [Comment Edited] (GROOVY-11607) Nested in Ant task is not handled nicely
[ https://issues.apache.org/jira/browse/GROOVY-11607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943830#comment-17943830 ]
Eric Milles edited comment on GROOVY-11607 at 4/12/25 3:27 PM:
---------------------------------------------------------------
The groovyc task works very much like [javac|https://ant.apache.org/manual/Tasks/javac.html]. The nested {{src}} element is a path-like structure. So you can have:
{code:xml}
<groovyc ...>
<src path="test" excludes="foo.groovy"/>
</groovyc>
{code}
or
{code:xml}
<groovyc ...>
<src path="test"/>
<exclude name="foo.groovy"/>
</groovyc>
{code}
or
{code:xml}
<groovyc ...>
<src path="test">
<exclude name="foo.groovy"/>
</src>
</groovyc>
{code}
https://github.com/apache/groovy/commit/6be0b681afca827218bd931764daeb0207e4fcdf
https://github.com/apache/groovy/blob/6be0b681afca827218bd931764daeb0207e4fcdf/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml#L191
was (Author: emilles):
The groovyc task works very much like [javac|https://ant.apache.org/manual/Tasks/javac.html]. The nested {{src}} element is a path-like structure. So you can have:
{code:xml}
<groovyc ...>
<src path="test"/>
<exclude name="foo.groovy"/>
</groovyc>
{code}
or
{code:xml}
<groovyc ...>
<src path="test">
<exclude name="foo.groovy"/>
</src>
</groovyc>
{code}
https://github.com/apache/groovy/commit/6be0b681afca827218bd931764daeb0207e4fcdf
https://github.com/apache/groovy/blob/6be0b681afca827218bd931764daeb0207e4fcdf/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml#L191
> Nested <src> in <groovyc> Ant task is not handled nicely
> --------------------------------------------------------
>
> Key: GROOVY-11607
> URL: https://issues.apache.org/jira/browse/GROOVY-11607
> Project: Groovy
> Issue Type: Bug
> Components: Ant integration
> Affects Versions: 4.0.26
> Reporter: Björn Kautler
> Assignee: Eric Milles
> Priority: Major
>
> I tried to configure {{groovyc}} Ant task so that a specific Groovy file is not compiled.
> But it seems all nested `src` results are always treated as directories, not as what they are.
> I for example tried using
> {code:xml}
> <groovy:src>
> <fileset dir="test">
> <exclude name="foo.groovy"/>
> </fileset>
> </groovy:src>
> {code}
> but that gave an error that {{otherfile.groovy}} is not a directory.
> And the task also has no other means of including or excluding files as far as I have seen.
> If the {{src}} would have been treated correctly, that wouldn't have been a problem though.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)