You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "chin (JIRA)" <ji...@apache.org> on 2017/05/20 18:40:04 UTC

[jira] [Commented] (IVY-1311) Module wide exclude must be at the end?

    [ https://issues.apache.org/jira/browse/IVY-1311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16018585#comment-16018585 ] 

chin commented on IVY-1311:
---------------------------

Looks like this is intentional, see https://github.com/apache/ant-ivy/blob/master/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java#L281

If that's the case, then the doc should mention this.

> Module wide exclude must be at the end?
> ---------------------------------------
>
>                 Key: IVY-1311
>                 URL: https://issues.apache.org/jira/browse/IVY-1311
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.0
>            Reporter: Feiyi Wang
>
> While I try to turn off commons-logging from Spring using IVY's module wide exclude.
> If I {{put}} *exclude* right after <dependencies>
> {code:xml}
>    <dependencies>
>       <exclude module="commons-logging" conf="*" />
>       <dependency org="org.springframework" name="spring-context"
>             rev="${spring.version}" transitive="true" conf="base->default">
>       </dependency>
>       ....
>    </dependencies>
> {code}
> then, ivy:resolve will issue a parsing error:
> {noformat}
> dep:
> [ivy:resolve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
> [ivy:resolve] [xml parsing: ivy.xml:17:55: cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependency'. One of '{exclude, override, conflict}' is expected. in file:/Users/oliver/test/ivy.xml
> [ivy:resolve] ]
> BUILD FAILED
> {noformat}
> However, if I move the exclude to the end, right before the closing tag, the error goes away.
> I think this is some sort of bug, please confirm.
> {code:xml}
>    <dependencies>
>       <dependency org="org.springframework" name="spring-context"
>             rev="${spring.version}" transitive="true" conf="base->default">
>       </dependency>
>       ....
>       <exclude module="commons-logging" conf="*" />
>    </dependencies>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)