Skip to content

Commit

Permalink
Issue eclipse-tycho#723 fix missing resolved file for SNAPSHOT depend…
Browse files Browse the repository at this point in the history
…encies.
  • Loading branch information
laeubi committed Mar 7, 2022
1 parent 237aeb9 commit 7a68a9b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
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 7a68a9b

Please sign in to comment.