You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Boué (JIRA)" <ji...@apache.org> on 2016/10/08 18:42:20 UTC
[jira] [Created] (MSHARED-595) In DefaultProjectInstaller, the path
to the local repository should be retrieved from the RepositoryManager
Guillaume Boué created MSHARED-595:
--------------------------------------
Summary: In DefaultProjectInstaller, the path to the local repository should be retrieved from the RepositoryManager
Key: MSHARED-595
URL: https://issues.apache.org/jira/browse/MSHARED-595
Project: Maven Shared Components
Issue Type: Bug
Components: maven-artifact-transfer
Reporter: Guillaume Boué
Fix For: maven-artifact-transfer-3.0.0
The current code retrieving the path of a given artifact from the local repository is currently:
{noformat}
private File getLocalRepoFile( ProjectBuildingRequest buildingRequest, ArtifactRepository artifactRepository,
Artifact artifact )
{
String path = repositoryManager.getPathForLocalArtifact( buildingRequest, artifact );
return new File( artifactRepository.getBasedir(), path );
}
{noformat}
It correctly gets the path of the given artifact inside the current local repository from the {{RepositoryManager}}, but the base directory of the local repository is obtained from the given {{ArtifactRepository}}. If they are not in sync, this won't correctly return the full path to the artifact.
This needs to be modified to get the local repository base directory also from the {{RepositoryManager}}, by invoking {{repositoryManager.getLocalRepositoryBasedir}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)