sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konrad Windszus <konra...@gmx.de>
Subject Bundle version for SNAPSHOTs generated by bnd-maven-plugin
Date Fri, 06 Apr 2018 06:32:26 GMT
I am just migrating the OSGi Installer HC (https://github.com/apache/sling-org-apache-sling-installer-hc/)
to the bnd-maven-plugin and I observed one difference to the maven-bundle-plugin:

The bundle version for SNAPSHOTs by default looks like "1.0.1.<Timestamp>" instead of
"1.0.1.SNAPSHOT" (as it was with the maven-bundle-plugin).
The reason for that is this line: https://github.com/bndtools/bnd/blob/d7511968b0ec96f1bec5bd3de59f8010cb3cb9f1/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BndMavenPlugin.java#L262
wich
sets the snapshot instruction to the timestamp (http://bnd.bndtools.org/instructions/snapshot.html).
This leads to the SNAPSHOT qualifier in the version being replaced by the timestamp in the
generated bundle version.

This is IMHO problematic in combination with the OSGi Installer, as that behaves differently
when it detects a SNAPSHOT (https://github.com/apache/sling-org-apache-sling-installer-core/blob/1561f5e626bab4859b4c060ef1bec06026018f18/src/main/java/org/apache/sling/installer/core/impl/tasks/BundleInfo.java#L109).


Should we configure all our bundles in a way that SNAPSHOT in the version is not being replaced,
or can we come up with a more intelligent solution in the OSGi Installer?
I noticed that in the manifest we have in addition still "Implementation-Version: 1.0.1-SNAPSHOT"
on which we could maybe base the SNAPSHOT detection of the OSGi Installer.

WDYT?
Konrad



Mime
View raw message