static void qualifyVersions(ProductConfiguration productConfiguration, String buildQualifier) { // we need to expand the version otherwise the published artifact still has the '.qualifier' // TODO is this still necessary? if this code was on the OSGi class loader side, we could have a // unit test verify that the published IU is correct... String productVersion = productConfiguration.getVersion(); if (productVersion != null) { productVersion = replaceQualifier(productVersion, buildQualifier); productConfiguration.setVersion(productVersion); } // now same for the features and bundles that version would be something else than "0.0.0" for (FeatureRef featRef : productConfiguration.getFeatures()) { if (featRef.getVersion() != null && featRef.getVersion().endsWith(VersioningHelper.QUALIFIER)) { String newVersion = replaceQualifier(featRef.getVersion(), buildQualifier); featRef.setVersion(newVersion); } } for (PluginRef plugRef : productConfiguration.getPlugins()) { if (plugRef.getVersion() != null && plugRef.getVersion().endsWith(VersioningHelper.QUALIFIER)) { String newVersion = replaceQualifier(plugRef.getVersion(), buildQualifier); plugRef.setVersion(newVersion); } } }
static void extractRootFeatures(ProductConfiguration product, List<DependencySeed> seeds) { final String productId = product.getId(); // add root features as special dependency seed which are marked as "add-on" for the product DependencySeed.Filter filter = new DependencySeed.Filter() { public boolean isAddOnFor(String type, String id) { return ArtifactType.TYPE_ECLIPSE_PRODUCT.equals(type) && productId.equals(id); } }; for (FeatureRef feature : product.getFeatures()) { if (feature.getInstallMode() == FeatureRef.InstallMode.root) { // TODO 372780 get feature version from target platform that matches the specification; // picking any version will no longer work once the the director installs from the target // platform instead of from the resolved dependencies seeds.add( new DependencySeed(ArtifactType.TYPE_ECLIPSE_FEATURE, feature.getId(), null, filter)); } } product.removeRootInstalledFeatures(); }