[
https://issues.apache.org/jira/browse/IVY-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15731049#comment-15731049
]
jaikiran pai commented on IVY-1551:
-----------------------------------
Can you paste the effective pom generated by Maven for this?
> Ivy incorrectly enforces improper version of a dependency in case of usage of
> <dependencyManagement>
> ----------------------------------------------------------------------------------------------------
>
> Key: IVY-1551
> URL: https://issues.apache.org/jira/browse/IVY-1551
> Project: Ivy
> Issue Type: Bug
> Environment: sbt 0.13.13
> Reporter: Pavel S.
>
> I have sbt project, which refers a dependency from a hosted Maven repository.
> In the parent pom of the dependency there is {{dependencyManagement}} and
> {{dependencies}} sections declared:
> {code}
> <dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>org.springframework.cloud</groupId>
> <artifactId>spring-cloud-starter-parent</artifactId>
> <version>Angel.SR4</version>
> <type>pom</type>
> <scope>import</scope>
> </dependency>
> <dependency>
> <groupId>org.projectlombok</groupId>
> <artifactId>lombok</artifactId>
> <version>1.14.8</version>
> </dependency>
> // ...
> </dependencies>
> </dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>org.projectlombok</groupId>
> <artifactId>lombok</artifactId>
> </dependency>
> </dependencies>
> {code}
> I have a subproject with the pom like so:
> {code}
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <parent>
> <artifactId>starter-kafka</artifactId>
> <groupId>com.test.parent</groupId>
> <version>2.0.0-SNAPSHOT</version>
> </parent>
> <modelVersion>4.0.0</modelVersion>
> <artifactId>starter-kafka-core</artifactId>
> <dependencies>
> <dependency>
> <groupId>org.apache.kafka</groupId>
> <artifactId>kafka-clients</artifactId>
> </dependency>
> <dependency>
> <groupId>org.springframework.hateoas</groupId>
> <artifactId>spring-hateoas</artifactId>
> </dependency>
> </dependencies>
> </project>
> {code}
> When I'm referencing my artifact {{starter-kafka}} from a maven project
> lombok dependency version is set to 0.14.8 as it declared in the
> {{dependencyManagement}} section of the parent pom of my dependency.
> When I'm referencing {{starter-kafka}} from a sbt project lombok dependency
> version is almost always set to 0.12.6, as it declared in spring's parent pom
> {{dependencyManagement}} section (but sometimes it may be set to a proper
> value).
> In case I set lombok version explicitly in both of my parent pom everything
> works fine for both Maven and sbt:
> {code}
> <dependencies>
> <dependency>
> <groupId>org.projectlombok</groupId>
> <artifactId>lombok</artifactId>
> <version>1.14.8</version>
> </dependency>
> </dependencies>
> {code}
> Also please note that effective pom is the same in both the cases. So the
> problem is how Ivy interprets the pom.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)