Skip to content

Commit

Permalink
Issue #723 fix missing resolved file for SNAPSHOT dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Mar 30, 2022
1 parent 71177ae commit dcfdd25
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -93,6 +93,11 @@ PomDependencyCollector collectPomDependencies(MavenProject project, Collection<A
if (logger.isDebugEnabled()) {
logger.debug("P2resolver.addMavenArtifact " + artifact.toString());
}
if (artifact.getFile() == null) {
//FIXME this should not be necessary... why do we have this case see Issue #723 for where it causes problems
Artifact find = session.getLocalRepository().find(artifact);
artifact.setFile(find.getFile());
}
result.addMavenArtifact(new MavenArtifactFacade(artifact), allowGenerateOSGiBundle);
} else {
failDueToPartialP2Data(artifact, p2Data);
Expand All @@ -102,8 +107,7 @@ PomDependencyCollector collectPomDependencies(MavenProject project, Collection<A
}

private void failDueToPartialP2Data(Artifact artifact, P2DataArtifacts p2Data) {
String p2MetadataFileName = TychoConstants.CLASSIFIER_P2_METADATA + "."
+ TychoConstants.EXTENSION_P2_METADATA;
String p2MetadataFileName = TychoConstants.CLASSIFIER_P2_METADATA + "." + TychoConstants.EXTENSION_P2_METADATA;
String p2ArtifactsFileName = TychoConstants.CLASSIFIER_P2_ARTIFACTS + "."
+ TychoConstants.EXTENSION_P2_ARTIFACTS;
String artifactGAV = artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion();
Expand Down

0 comments on commit dcfdd25

Please sign in to comment.