summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/BundleUtil.java2
-rw-r--r--branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ThirdPartyBundleDistroMojo.java5
2 files changed, 2 insertions, 5 deletions
diff --git a/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/BundleUtil.java b/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/BundleUtil.java
index d145f0c7b2..216d4a3c60 100644
--- a/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/BundleUtil.java
+++ b/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/BundleUtil.java
@@ -365,7 +365,7 @@ final class BundleUtil {
* @param jarFile
* @return
*/
- private static String version(String jarFile) {
+ static String version(String jarFile) {
String version = "1.0.0";
boolean found = false;
Matcher matcher = pattern2.matcher(jarFile);
diff --git a/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ThirdPartyBundleDistroMojo.java b/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ThirdPartyBundleDistroMojo.java
index c607a57ad8..b5aadf710a 100644
--- a/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ThirdPartyBundleDistroMojo.java
+++ b/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ThirdPartyBundleDistroMojo.java
@@ -104,10 +104,7 @@ public class ThirdPartyBundleDistroMojo extends AbstractMojo {
ids.add(bundleName);
} else {
log.info("Adding third party jar: " + artifact);
- String version = artifact.getVersion();
- if (version.endsWith(Artifact.SNAPSHOT_VERSION)) {
- version = version.substring(0, version.length() - Artifact.SNAPSHOT_VERSION.length() - 1);
- }
+ String version = BundleUtil.version(artifactFile.getPath());
Set<File> jarFiles = new HashSet<File>();
jarFiles.add(artifactFile);