diff --git a/.gitignore b/.gitignore
index 7e73c966..ba0b2b4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,4 @@
target/
-!scalariform.update/target/
-lib_managed/
-src_managed/
bin/
.history
.cache
diff --git a/scalariform/META-INF/MANIFEST.MF b/MANIFEST.MF.prototype
similarity index 92%
rename from scalariform/META-INF/MANIFEST.MF
rename to MANIFEST.MF.prototype
index b22fa284..108dd560 100644
--- a/scalariform/META-INF/MANIFEST.MF
+++ b/MANIFEST.MF.prototype
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Scalariform
Bundle-SymbolicName: scalariform
-Bundle-Version: 0.2.5.qualifier
+Bundle-Version: version.qualifier
Require-Bundle: org.scala-lang.scala-library,
org.scala-lang.modules.scala-xml
Bundle-ClassPath: .
diff --git a/build.sbt b/build.sbt
index a16c710e..62858f00 100644
--- a/build.sbt
+++ b/build.sbt
@@ -91,20 +91,29 @@ lazy val scalariform = (project
libraryDependencies ++= scala2_11Dependencies.value,
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test",
// sbt doesn't automatically load the content of the MANIFST.MF file, therefore
- // we have to do it here by ourselves Furthermore, the version format in the
- // MANIFEST.MF is `x.y.z.qualifier` but we need to replace the `qualifier` part
- // with a unique identifier otherwise OSGi can't find out which nightly build
- // is newest and therefore not all caches are updated with the correct version
- // of a nightly.
+ // we have to do it here by ourselves. Furthermore, the version format in the
+ // MANIFEST.MF is `version.qualifier`, which means that we have to replace
+ // `version` by the actual version and `qualifier` with a unique identifier
+ // otherwise OSGi can't find out which nightly build is newest and therefore
+ // not all caches are updated with the correct version of a nightly.
packageOptions in Compile in packageBin += {
- val m = Using.fileInputStream(file("scalariform/META-INF/MANIFEST.MF")) { in =>
+ val m = Using.fileInputStream(new java.io.File("MANIFEST.MF.prototype")) { in =>
val manifest = new java.util.jar.Manifest(in)
val attr = manifest.getMainAttributes
val key = "Bundle-Version"
val versionSuffix = scalaBinaryVersion.value.replace('.', '_')
+ // get the version but get rid of "-SNAPSHOT" suffix if it exists
+ val v = {
+ val v = version.value
+ val i = v.lastIndexOf('-')
+ if (i > 0)
+ v.substring(0, i)
+ else
+ v
+ }
val date = new java.text.SimpleDateFormat("yyyyMMddHHmm").format(new java.util.Date)
val sha = "git rev-parse --short HEAD".!!.trim
- attr.putValue(key, attr.getValue(key).replace("qualifier", s"$versionSuffix-$date-$sha"))
+ attr.putValue(key, attr.getValue(key).replace("version.qualifier", s"$v.$versionSuffix-$date-$sha"))
manifest
}
Package.JarManifest(m)
diff --git a/scalariform.feature/build.properties b/scalariform.feature/build.properties
deleted file mode 100644
index 64f93a9f..00000000
--- a/scalariform.feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/scalariform.feature/feature.xml b/scalariform.feature/feature.xml
deleted file mode 100644
index 35a67875..00000000
--- a/scalariform.feature/feature.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- Scala Code formatter
-
-
-
- The MIT License
-
-Copyright (c) 2010 Matthew D. Russell
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and
-to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
-FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/scalariform.feature/pom.xml b/scalariform.feature/pom.xml
deleted file mode 100644
index 8deb9e33..00000000
--- a/scalariform.feature/pom.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- 4.0.0
- scalariform.feature
- eclipse-feature
-
- scalariform.parent
- org.scalariform
- 0.2.5
-
-
diff --git a/scalariform.update/pom.xml b/scalariform.update/pom.xml
deleted file mode 100644
index f7b0a74b..00000000
--- a/scalariform.update/pom.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- 4.0.0
- scalariform.update
- eclipse-update-site
-
- scalariform.parent
- org.scalariform
- 0.2.5
-
-
diff --git a/scalariform.update/site.xml b/scalariform.update/site.xml
deleted file mode 100644
index 128e251e..00000000
--- a/scalariform.update/site.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- Scalariform Update Site
-
-
-
-
-
-
diff --git a/scalariform.update/target/site.zip b/scalariform.update/target/site.zip
deleted file mode 100644
index da6256a9..00000000
Binary files a/scalariform.update/target/site.zip and /dev/null differ
diff --git a/scalariform.update/target/site/artifacts.jar b/scalariform.update/target/site/artifacts.jar
deleted file mode 100644
index 3bc24044..00000000
Binary files a/scalariform.update/target/site/artifacts.jar and /dev/null differ
diff --git a/scalariform.update/target/site/content.jar b/scalariform.update/target/site/content.jar
deleted file mode 100644
index 5d2c0b5a..00000000
Binary files a/scalariform.update/target/site/content.jar and /dev/null differ
diff --git a/scalariform.update/target/site/features/scalariform.feature_0.2.5.jar b/scalariform.update/target/site/features/scalariform.feature_0.2.5.jar
deleted file mode 100644
index c8ce62f4..00000000
Binary files a/scalariform.update/target/site/features/scalariform.feature_0.2.5.jar and /dev/null differ
diff --git a/scalariform.update/target/site/plugins/scalariform_0.2.5.jar b/scalariform.update/target/site/plugins/scalariform_0.2.5.jar
deleted file mode 100644
index 26c473e4..00000000
Binary files a/scalariform.update/target/site/plugins/scalariform_0.2.5.jar and /dev/null differ
diff --git a/scalariform.update/target/site/site.xml b/scalariform.update/target/site/site.xml
deleted file mode 100644
index 128e251e..00000000
--- a/scalariform.update/target/site/site.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- Scalariform Update Site
-
-
-
-
-
-
diff --git a/scalariform.update/target/site_assembly.zip b/scalariform.update/target/site_assembly.zip
deleted file mode 100644
index dd1e9f36..00000000
Binary files a/scalariform.update/target/site_assembly.zip and /dev/null differ