diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-22 00:44:24 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-22 00:44:24 +0000 |
commit | 4cd2e0d12154a16eec306bb277a8631482ba3095 (patch) | |
tree | e77f09351381c6b29f7125d099c32bcb91efc00f /branches/sca-equinox/tools/maven/maven-bundle-plugin/src | |
parent | 85c97ce64b4b1866869c6704154182735addd0c5 (diff) |
Adjust the calculation of version
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@706823 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/tools/maven/maven-bundle-plugin/src')
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); |