[ http://jira.codehaus.org/browse/MECLIPSE-107?page=comments#action_80585 ]
Damien Lecan commented on MECLIPSE-107:
---------------------------------------
I have looked at the code and this bad resolution comes from theses lines of
code :
{code:title=AbstractIdeSupportMojo.java, rev474384|borderStyle=solid}
Map managedVersions = createManagedVersionMap( getArtifactFactory(),
project.getId(),
project.getDependencyManagement() );
...
artifactResolutionResult = artifactCollector.collect(
getProjectArtifacts(), project.getArtifact(),
managedVersions, localRepo, project.getRemoteArtifactRepositories(),
getArtifactMetadataSource(), null, listeners );
{code}
The list of artifacts to add in .classpath is filtered by managed dependencies.
I don't understand why managed dependency have to be taken into account to
build .classpath ? This file may be build with just real dependencies ?
> Dependency Version Incorrectly Taken from DependencyManagement
> --------------------------------------------------------------
>
> Key: MECLIPSE-107
> URL: http://jira.codehaus.org/browse/MECLIPSE-107
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Components: dependency resolution
> Affects Versions: 2.2
> Reporter: Stephen Duncan Jr
> Priority: Critical
> Attachments: dmtest.zip
>
>
> The version used when generating .classpath is taken from
> dependencyManagement even though the child pom sets the dependency version,
> which should override what is in dependencyManagement. This is a regression
> from the correct behaviour in 2.1.
> The attached project demonstrates the problem. The .classpath file generated
> for the "child" project should specify log4j-1.2.13, but instead specifies
> 1.28.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira