You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Jing Xue <ji...@digizenstudio.com> on 2007/04/03 04:51:15 UTC

regex not working in dependency exclude?

Hi,

Same trunk build from 4/1 as my last message.

I have this fragment:
<dependency org="org.springframework" name="spring-hibernate3" rev="2.0.3" conf="build->default">
  <exclude module="jta" />
  <exclude module="spring-*" />
</dependency>

The idea is to exclude the spring-* module jars, because I have already
got spring.jar.

That pattern didn't work though. I had to do:
<dependency org="org.springframework" name="spring-hibernate3" rev="2.0.3" conf="build->default">
  <exclude module="jta" />
  <exclude module="spring-core" />
  <exclude module="spring-dao" />
  <exclude module="spring-beans" />
  <exclude module="spring-jdbc" />
  <exclude module="spring-context" />
</dependency>

What am I missing? Thanks in advance for any hint.
-- 
Jing Xue

Re: regex not working in dependency exclude?

Posted by Xavier Hanin <xa...@gmail.com>.
On 4/3/07, Jing Xue <ji...@digizenstudio.com> wrote:
>
> Hi,
>
> Same trunk build from 4/1 as my last message.
>
> I have this fragment:
> <dependency org="org.springframework" name="spring-hibernate3" rev="2.0.3"
> conf="build->default">
>   <exclude module="jta" />
>   <exclude module="spring-*" />
> </dependency>
>
> The idea is to exclude the spring-* module jars, because I have already
> got spring.jar.
>
> That pattern didn't work though. I had to do:
> <dependency org="org.springframework" name="spring-hibernate3" rev="2.0.3"
> conf="build->default">
>   <exclude module="jta" />
>   <exclude module="spring-core" />
>   <exclude module="spring-dao" />
>   <exclude module="spring-beans" />
>   <exclude module="spring-jdbc" />
>   <exclude module="spring-context" />
> </dependency>
>
> What am I missing? Thanks in advance for any hint.


 First, the documentation is misleading, I've just fixed it, because Ivy
uses a pattern matcher to match your exclusion expression, so you have to
set another attribute to recognize regular expression:
<dependency org="org.springframework" name="spring-hibernate3" rev="2.0.3"
conf="build->default">
  <exclude module="jta" />
  <exclude module="spring-*" pattern="regexp"/>
</dependency>
Second, I've faced some issues on the trunk with exclusion, so I think there
is a bug. I'll try to reproduce it in my own environment, and keep you
informed.

- Xavier

-- 
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/