[
https://issues.apache.org/jira/browse/IVY-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maarten Coene resolved IVY-1275.
--------------------------------
Resolution: Not A Problem
Assignee: Maarten Coene
This behaviour is correct according to the <exclude> documentation which is
saying: 'It enables to restrict the artifacts required, by excluding artifacts
being published by the dependency or any of its transitive dependencies'.
I guess you'll have to change your exclude regular expression to be more
specific about what to exclude. When you want to exclude all spring-*.jar
files, except for the spring-security-core.jar, you could use the following:
{code:xml}
<dependency org="org.springframework.security" name="spring-security-core"
rev="3.0.2.RELEASE">
<exclude name="spring-(?!security-core).*" matcher="regexp"/>
</dependency>
{code}
Maarten
> Dependency exclude with a regexp can exclude the target artifact
> ----------------------------------------------------------------
>
> Key: IVY-1275
> URL: https://issues.apache.org/jira/browse/IVY-1275
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.2.0
> Reporter: Andy Kriger
> Assignee: Maarten Coene
>
> Setup a depedency like
> <dependency org="org.springframework.security" name="spring-security-core"
> rev="3.0.2.RELEASE">
> <include name="spring-security-.*" matcher="regexp"/>
> <exclude name="spring-.*" matcher="regexp"/>
> </dependency>
> You will exclude spring-security-core as well as the spring related
> dependencies of spring-security. Include/exclude should not affect the target
> dependency only the dependencies of the target dependency.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira