diff --git a/src/main/java/com/github/maven_nar/AbstractDependencyMojo.java b/src/main/java/com/github/maven_nar/AbstractDependencyMojo.java index b70bf4516..a1f0dfa16 100644 --- a/src/main/java/com/github/maven_nar/AbstractDependencyMojo.java +++ b/src/main/java/com/github/maven_nar/AbstractDependencyMojo.java @@ -135,8 +135,7 @@ public final NarInfo getNarInfo(Artifact dependency) getLog(), dependency.getFile()); } - File file = new File(getLocalRepository().getBasedir(), - getLocalRepository().pathOf(dependency)); + File file = dependency.getFile(); if (!file.exists()) { getLog().debug("Dependency nar file does not exist: " + file); return null; diff --git a/src/main/java/com/github/maven_nar/NarManager.java b/src/main/java/com/github/maven_nar/NarManager.java index d52216701..de2560762 100644 --- a/src/main/java/com/github/maven_nar/NarManager.java +++ b/src/main/java/com/github/maven_nar/NarManager.java @@ -279,7 +279,7 @@ public final NarInfo getNarInfo(Artifact dependency) // of getBaseVersion, called in pathOf. dependency.isSnapshot(); - File file = new File( repository.getBasedir(), repository.pathOf( dependency ) ); + File file = dependency.getFile(); if ( !file.exists() ) { return null; @@ -324,8 +324,7 @@ public final File getNarFile(Artifact dependency) // FIXME reported to maven developer list, isSnapshot changes behaviour // of getBaseVersion, called in pathOf. dependency.isSnapshot(); - return new File( repository.getBasedir(), NarUtil.replace( "${aol}", defaultAOL.toString(), - repository.pathOf( dependency ) ) ); + return dependency.getFile(); } private List getDependencies( String scope )