if (variantPath == null)
continue contributions;
- if (Files.exists(variantPath)) {
- // a variant was found, let's collect its contributions (also common ones in its
- // parent)
+ // a variant was found, let's collect its contributions (also common ones in its
+ // parent)
+ if (Files.exists(variantPath.getParent())) {
for (Path variantContributionPath : Files.newDirectoryStream(variantPath.getParent())) {
String variantContributionId = variantContributionPath.getFileName().toString();
if (variantContributionId.contains(".")) {
contributions.put(variantContributionPath, contribution);
}
}
+ }
+ if (Files.exists(variantPath)) {
for (Path variantContributionPath : Files.newDirectoryStream(variantPath)) {
String variantContributionId = variantContributionPath.getFileName().toString();
if (variantContributionId.contains(".")) {
} else {
A2Module lastOsgiModule = osgiBranch.last();
int compare = moduleVersion.compareTo(lastOsgiModule.getVersion());
- if (compare > 0) {// update
+ if (compare >= 0) {// update (also if same version)
Bundle bundle = (Bundle) lastOsgiModule.getLocator();
+ if (bundle.getBundleId() == 0)// ignore framework bundle
+ return null;
moduleSource.update(bundle, module);
// TODO make it more dynamic, based on OSGi APIs
// TODO remove old module? Or keep update history?