Correct OSGi manifests in source jars
Related: #3886 Motivation: We were including OSGi manifests in sources/javadoc JARs, and OSGi container treats them as correct dependencies when resolving from OBR repository, which is incorrect. Runtime fails with non-descriptive ClassNotFoundException as a result. Modifications: - Do not include the OSGi manifests in sources/javadoc JARs - Include Eclipse-related manifest entries in sources/javadoc JARs Result: Better OSGi compatibility
This commit is contained in:
parent
89fb9e0a5a
commit
24bcc11095
34
pom.xml
34
pom.xml
@ -1122,16 +1122,40 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>parse-version</id>
|
||||||
|
<goals>
|
||||||
|
<goal>parse-version</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
<version>2.2.1</version>
|
<version>2.2.1</version>
|
||||||
|
<!-- Eclipse-related OSGi manifests
|
||||||
|
See https://github.com/netty/netty/issues/3886
|
||||||
|
More information: http://rajakannappan.blogspot.ie/2010/03/automating-eclipse-source-bundle.html -->
|
||||||
<configuration>
|
<configuration>
|
||||||
<!--
|
<archive>
|
||||||
~ Add generated MANIFEST.MF.
|
<manifestEntries>
|
||||||
~ See https://github.com/netty/netty/issues/2058
|
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
|
||||||
-->
|
<Bundle-Name>${name}</Bundle-Name>
|
||||||
<useDefaultManifestFile>true</useDefaultManifestFile>
|
<Bundle-SymbolicName>${groupId}.${artifactId}.source</Bundle-SymbolicName>
|
||||||
|
<Bundle-Vendor>${organization.name}</Bundle-Vendor>
|
||||||
|
<Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>
|
||||||
|
<Eclipse-SourceBundle>${groupId}.${artifactId};version="${parsedVersion.osgiVersion}";roots:="."</Eclipse-SourceBundle>
|
||||||
|
</manifestEntries>
|
||||||
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
<executions>
|
<executions>
|
||||||
<!--
|
<!--
|
||||||
~ This workaround prevents Maven from executing the 'generate-sources' phase twice.
|
~ This workaround prevents Maven from executing the 'generate-sources' phase twice.
|
||||||
|
Loading…
Reference in New Issue
Block a user