diff --git a/tycho-baseline-plugin/src/main/java/org/eclipse/tycho/baseline/DependencyCheckMojo.java b/tycho-baseline-plugin/src/main/java/org/eclipse/tycho/baseline/DependencyCheckMojo.java index 65c780dcc2..1e85c65047 100644 --- a/tycho-baseline-plugin/src/main/java/org/eclipse/tycho/baseline/DependencyCheckMojo.java +++ b/tycho-baseline-plugin/src/main/java/org/eclipse/tycho/baseline/DependencyCheckMojo.java @@ -165,6 +165,12 @@ public void execute() throws MojoExecutionException, MojoFailureException { IInstallableUnit unit = packageProvidingUnit.get(); Optional matchedPackageVersion = ArtifactMatcher .getPackageVersion(unit, packageName); + if (matchedPackageVersion.isEmpty() + || matchedPackageVersion.get().equals(org.eclipse.equinox.p2.metadata.Version.emptyVersion)) { + log.warn("Package " + packageName + + " has no version exported and can not be checked for compatibility"); + continue; + } matchedPackageVersion.filter(v -> v.isOSGiCompatible()).ifPresent(v -> { Version current = new Version(v.toString()); allPackageVersion.computeIfAbsent(packageName, nil -> new TreeSet<>()).add(current);