[
https://issues.apache.org/jira/browse/FELIX-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781360#action_12781360
]
Stuart McCulloch commented on FELIX-1886:
-----------------------------------------
The bundle symbolic name was always meant to be computed by the shared
"Maven2OsgiConverter" component, as documented on the bundleplugin site:
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
Unfortunately there was a bug in the version used in 1.4.3 which threw an
exception, causing us to fall back to the naive "groupId.artifactId" symbolic
name.
This bug is fixed since 2.0.0, courtesy of FELIX-850 - which is listed in the
changelog.txt:
http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-2.0.0/doc/changelog.txt
Which is why you see a difference compared to the broken default in 1.4.3.
There's not much value in introducing a special switch for this, given that a)
the old behavior was broken and b) you can already use custom instructions:
{code}
<configuration>
<instructions>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
</instructions>
</configuration>
{code}
This was one of the reasons the major version was bumped - several changes that
improved stability / default settings broke backwards compatibility.
Note that these breaking changes were discussed extensively on the mailing
lists, and the main differences documented on the doc site and the FAQ:
http://felix.apache.org/site/apache-felix-bundle-plugin-faq.html
Unfortunately this particular change wasn't highlighted given that it was
aligning the (broken) code with the existing, published documentation.
> Bundle-SymbolicName generated with maven-bundle-plugin 2.0.0 is not the same
> as with 1.4.3
> ------------------------------------------------------------------------------------------
>
> Key: FELIX-1886
> URL: https://issues.apache.org/jira/browse/FELIX-1886
> Project: Felix
> Issue Type: Bug
> Components: Maven Bundle Plugin
> Affects Versions: maven-bundle-plugin-2.0.0
> Reporter: Bertrand Delacretaz
>
> I have noticed this with the jackrabbit-jcr-commons 2.0-beta3 module.
> 1) Build as is, uses maven-bundle-plugin 2.0.0, resulting MANIFEST.MF
> contains:
> Tool: Bnd-0.0.311
> Bundle-SymbolicName: org.apache.jackrabbit.jcr-commons
> (not sure if the version of bnd makes a difference)
> 2) Modify pom.xml to use maven-bundle-plugin 1.4.3, rebuild, resulting
> MANIFEST.MF contains:
> Tool: Bnd-0.0.255
> Bundle-SymbolicName: org.apache.jackrabbit.jackrabbit-jcr-commons
> The new symbolic name looks nicer, but the change is surprising - that
> should be documented (did I miss that?), and having a way to use the old
> Bundle-SymbolicName generation rules might be good.
> [1]
> http://svn.apache.org/repos/asf/jackrabbit/tags/2.0-beta3/jackrabbit-jcr-commons/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.