- Artifact osgiArtifact = new DefaultArtifact(
- sourcesArtifact.getGroupId(),
- sourcesArtifact.getArtifactId(),
- sourcesArtifact.getExtension(),
- sourcesArtifact.getVersion());
- String osgiPath = MavenConventionsUtils.artifactPath(
- artifactBasePath, osgiArtifact);
- osgiBinary = session.getNode(osgiPath).getNode(Node.JCR_CONTENT)
- .getProperty(Property.JCR_DATA).getBinary();
-
- NameVersion nameVersion = RepoUtils.readNameVersion(osgiBinary
- .getStream());
+ Artifact osgiArtifact = new DefaultArtifact(sourcesArtifact.getGroupId(), sourcesArtifact.getArtifactId(),
+ sourcesArtifact.getExtension(), sourcesArtifact.getVersion());
+ String osgiPath = MavenConventionsUtils.artifactPath(artifactBasePath, osgiArtifact);
+ osgiBinary = session.getNode(osgiPath).getNode(Node.JCR_CONTENT).getProperty(Property.JCR_DATA).getBinary();
+
+ NameVersion nameVersion = RepoUtils.readNameVersion(osgiBinary.getStream());
+ if (nameVersion == null) {
+ log.warn("Cannot package PDE sources for " + osgiPath + " as it is probably not an OSGi bundle");
+ return;
+ }