ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Hilka" <thi...@vps.de>
Subject AW: AW: AW: Retrieve ignores exclude property of dependency
Date Wed, 01 Sep 2010 07:09:12 GMT
Hello Maarten,

thank you for pointing me tot he right direction. The simplified example worked. But when
I add all my other dependencies, the juel jar comes back again. Actually there was another
dependency that brought in the same third party dependency. So, the problem was on our side
(of course ;-)).

But then there is another question: Is it possible to exclude some dependency in general within
one ivy file?

In our example we have the main project that bundles everything together, and there are two
dependencies that bring in some unwanted library. Do we have to exclude the unwanted dependency
from both our direct dependencies or is there a way to exclude some jar in general?

Thanks for your help,

Tobias

-----Ursprüngliche Nachricht-----
Von: Maarten Coene [mailto:maarten_coene@yahoo.com] 
Gesendet: Dienstag, 31. August 2010 21:09
An: ivy-user@ant.apache.org
Betreff: Re: AW: AW: Retrieve ignores exclude property of dependency

Very strange, when I try your example (with name attribute or module attribute) 
I don't get the juel.jar retrieved.
Could you also try your simplified example to make sure it fails for you (and 
maybe clean your cache first just to be sure)

Maarten



----- Original Message ----
From: Tobias Hilka <thilka@vps.de>
To: ivy-user@ant.apache.org
Sent: Tue, August 31, 2010 5:55:55 PM
Subject: AW: AW: Retrieve ignores exclude property of dependency

Hi Maarten,

changing the name attribute to module attribute does not help. Still the jar is 
retrieved.

-----Ursprüngliche Nachricht-----
Von: Maarten Coene [mailto:maarten_coene@yahoo.com] 
Gesendet: Dienstag, 31. August 2010 17:13
An: ivy-user@ant.apache.org
Betreff: Re: AW: Retrieve ignores exclude property of dependency

I think I've found the problem.
Your exclude rule says that the "juel.jar" should be excluded, not the juel 
module itself.

To exclude the whole juel module, you should define your exclude as:

    <dependency org="myorg" name="B" rev="0.1" conf="default->default" 
changing="true">
        <exclude org="juel" module="juel"></exclude>
    </dependency>

Maarten




----- Original Message ----
From: Tobias Hilka <thilka@vps.de>
To: ivy-user@ant.apache.org
Sent: Tue, August 31, 2010 4:10:17 PM
Subject: AW: Retrieve ignores exclude property of dependency

Here are the (simplified) versions of my two ivy.xml files:

For module A:

<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
  
  <info organisation="myorg" module="A" status="integration" revision="0.1" />

  <configurations>
    <conf name="default" description="provide the jar only" />
    <conf name="test" extends="default" visibility="public" description="for 
testing" />
    <conf name="provided" extends="default" visibility="public" description="for 

compiling with provided jars" />
  </configurations>

  <publications>
    <artifact conf="default"/>
    <artifact type="source" ext="zip" />
  </publications>

  <dependencies>
    <dependency org="myorg" name="B" rev="0.1" conf="default->default" 
changing="true">
        <exclude org="juel" name="juel"></exclude>
    </dependency>
  </dependencies>

</ivy-module>


And for module B:

<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
  
  <info organisation="myorg" module="B" status="integration" revision="0.1" />

  <configurations>
    <conf name="default" description="provide the jar only" />
    <conf name="test" extends="default" visibility="public" description="for 
testing" />
    <conf name="provided" extends="default" visibility="public" description="for 

compiling with provided jars" />
  </configurations>

  <publications>
    <artifact conf="default"/>
    <artifact type="source" ext="zip" />
    <artifact type="javadoc" ext="zip" />
  </publications>

  <dependencies>
      <dependency org="org.activiti" name="activiti-engine" rev="5.0.alpha4" 
conf="default->default"/>
  </dependencies>

</ivy-module>

The third party dependency is the real dependency. The repository we are using 
to retrieve it:

<ibiblio name="activitirepo" m2compatible="true" checksums=""
            
root="http://maven.alfresco.com/nexus/content/repositories/activiti/" 

            
pattern="[organization]/[module]/[revision]/[artifact]-[revision].[ext]" />


Hope this information helps.

Tobias

-----Ursprüngliche Nachricht-----
Von: Maarten Coene [mailto:maarten_coene@yahoo.com] 
Gesendet: Dienstag, 31. August 2010 12:02
An: ivy-user@ant.apache.org
Betreff: Re: Retrieve ignores exclude property of dependency

Could you also post the relevant parts of the ivy.xml of project A and B?

Maarten




________________________________
From: Tobias Hilka <thilka@vps.de>
To: ivy-user@ant.apache.org
Sent: Tue, August 31, 2010 11:57:05 AM
Subject: Retrieve ignores exclude property of dependency

  
Hello,

We have a project with some third party dependency, which in turn has some 
transitive dependencies. We want to exclude one special dependency of these 
transitive dependencies. But the retrieve ant task seems to ignore the exclude 
task.

More detailed:

Project A packs the war file.
Project B has dependency to third party library (with transitive dependencies X 
and Y)

In project A we include the artifact published by Project B (transitive=“true“) 
and exclude Y.

When we call retrieve, we still end up with a lib directory containing B.jar, 
X.jar and Y.jar. What we expect would be to only have B.jar and X.jar.

We are using version 2.2.0.cr1_20100629224905 from within eclipse.

Is this a known issue?

Thanks,

Tobias


      

Mime
View raw message