Grails

Dependency exclusions specified via pom are not processed

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.2 final
  • Fix Version/s: 1.2.1
  • Component/s: None
  • Labels:
    None

Description

Dependency exclusions can be specified via the DSL but are ignored if specified in the POM. I believe that Ivy 2.0.0 is parsing out this information and returning it to Grails but its not making it through to resolution.

A related bug is that if the dependencies are specified in a parent POM, they will also not be processed. In this case, it may be an issue with Ivy which may be addressed in 2.1.0 (see http://issues.apache.org/jira/browse/IVY-974).

Assuming that you don't want to include libraries and have a need to support Maven, you need to replicate the dependencies in both the POM and the DSL. This therefore appears to be a blocker for production use of the POM to specify dependencies. The need to replicate the dependencies in each leaf POM is not optimal but can be worked around but not the exclusions.

Activity

Hide
Graeme Rocher added a comment -

please attach an example that reproduces the problem

Show
Graeme Rocher added a comment - please attach an example that reproduces the problem
Hide
Gabe Beged-Dov added a comment -

Hi Graeme,

You can find an example on Github (see below). Run "grails dependency-report" and it should fail on a linkage error. You can see in the logging output for the resolver (if you set to debug or above) that the excludes in the POM are being ignored. Another thing I noticed is that the Dependencies DSL is being processed even when in Maven mode (pom true). See comment in BuildConfig. If you turn on pom processing and include the DSL, the DSL excludes will be processed and mask the fact that the POM exclusions are ignored.

http://github.com/gabe97330/grails-extras/tree/master/test/jira/grails-5710/

Show
Gabe Beged-Dov added a comment - Hi Graeme, You can find an example on Github (see below). Run "grails dependency-report" and it should fail on a linkage error. You can see in the logging output for the resolver (if you set to debug or above) that the excludes in the POM are being ignored. Another thing I noticed is that the Dependencies DSL is being processed even when in Maven mode (pom true). See comment in BuildConfig. If you turn on pom processing and include the DSL, the DSL excludes will be processed and mask the fact that the POM exclusions are ignored. http://github.com/gabe97330/grails-extras/tree/master/test/jira/grails-5710/

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: