- Node artifactVersion = artifactVersions.nextNode();
- if (artifactVersion
- .isNodeType(SlcTypes.SLC_ARTIFACT_VERSION_BASE))
- for (NodeIterator files = artifactVersion.getNodes(); files
- .hasNext();) {
- Node file = files.nextNode();
- if (file.isNodeType(SlcTypes.SLC_BUNDLE_ARTIFACT)) {
- preProcessBundleArtifact(file);
- file.getSession().save();
- if (log.isDebugEnabled())
- log.debug("Pre-processed " + file.getName());
+ Node aVersion = aVersions.nextNode();
+ if (aVersion.isNodeType(SlcTypes.SLC_ARTIFACT_VERSION_BASE)) {
+ if (highestAVersion == null) {
+ highestAVersion = aVersion;
+ if (allArtifactsHighestVersion == null)
+ allArtifactsHighestVersion = aVersion;
+
+ } else {
+ Version currVersion = extractOsgiVersion(aVersion);
+ Version currentHighestVersion = extractOsgiVersion(highestAVersion);
+ if (currVersion.compareTo(currentHighestVersion) > 0) {
+ highestAVersion = aVersion;
+ }
+ if (currVersion
+ .compareTo(extractOsgiVersion(allArtifactsHighestVersion)) > 0) {
+ allArtifactsHighestVersion = aVersion;