X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.osgi.boot%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fboot%2Fa2%2FFsA2Source.java;h=a8e79d4574b1b82f327a6429841d23688a42aced;hb=25eec0a9cc31c67740ba4131ed40951a028a7669;hp=6fc25c1127f98d8adf93d390b6e072d99ae15b8f;hpb=6d6fd0f20eda4331d35e7beb5d14aacdb3a98ad8;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.osgi.boot/src/org/argeo/osgi/boot/a2/FsA2Source.java b/org.argeo.osgi.boot/src/org/argeo/osgi/boot/a2/FsA2Source.java index 6fc25c112..a8e79d457 100644 --- a/org.argeo.osgi.boot/src/org/argeo/osgi/boot/a2/FsA2Source.java +++ b/org.argeo.osgi.boot/src/org/argeo/osgi/boot/a2/FsA2Source.java @@ -11,6 +11,7 @@ import java.util.TreeSet; import org.argeo.osgi.boot.OsgiBootUtils; import org.osgi.framework.Version; +/** A file system {@link ProvisioningSource} in A2 format. */ public class FsA2Source extends ProvisioningSource { private final Path base; @@ -43,9 +44,11 @@ public class FsA2Source extends ProvisioningSource { if (!"jar".equals(ext)) continue modules; String moduleName = moduleFileName.substring(0, lastDot); - int firstDash = moduleName.indexOf('-'); - String versionStr = moduleName.substring(firstDash + 1); - String componentName = moduleName.substring(0, firstDash); + if (moduleName.endsWith("-SNAPSHOT")) + moduleName = moduleName.substring(0, moduleName.length() - "-SNAPSHOT".length()); + int lastDash = moduleName.lastIndexOf('-'); + String versionStr = moduleName.substring(lastDash + 1); + String componentName = moduleName.substring(0, lastDash); // if(versionStr.endsWith("-SNAPSHOT")) { // versionStr = readVersionFromModule(modulePath); // }