Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nar-download in multi-module builds #144

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/github/maven_nar/NarManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 )
Expand Down