Permalink
Browse files

re #19: Introduced type member for EE enumeration and made bndBundle …

…a final lazy val. Also improved some ScalaDoc comments.
  • Loading branch information...
Heiko Seeberger
Heiko Seeberger committed Jul 21, 2010
1 parent 0e540d6 commit 890514a1d026ba0c6002330ad2e39aa643f8a58b
Showing with 10 additions and 8 deletions.
  1. +2 −2 project/build.properties
  2. +4 −4 src/main/scala/BNDPlugin.scala
  3. +4 −2 src/main/scala/properties.scala
View
@@ -1,8 +1,8 @@
#Project properties
-#Thu Jul 01 09:48:19 CEST 2010
+#Wed Jul 21 11:37:40 CEST 2010
project.organization=com.weiglewilczek.bnd4sbt
project.name=bnd4sbt
sbt.version=0.7.4
-project.version=1.0.0.RC4
+project.version=1.0.0.RC5
build.scala.versions=2.7.7
project.initialize=false
@@ -22,9 +22,9 @@ import sbt.DefaultProject
trait BNDPlugin extends DefaultProject with BNDPluginProperties {
/** Creates an OSGi bundle out of this project by using BND. Initialized by bndBundleAction which can be overridden in order to modify the behavior. */
- lazy val bndBundle = bndBundleAction
+ final lazy val bndBundle = bndBundleAction
- /** Creates an OSGi bundle out of this project by using BND. Override to modify the behavior of the bndBundle action. */
+ /** Creates an OSGi bundle out of this project by using BND. Attention: If you override this, you might loose the bnd4sbt functionality. */
protected def bndBundleAction =
task {
try {
@@ -38,11 +38,11 @@ trait BNDPlugin extends DefaultProject with BNDPluginProperties {
}
} dependsOn compile describedAs "Creates an OSGi bundle out of this project by using BND."
- /** Overrides the package action with the bndBundle action. */
+ /** Overrides the package action with the bndBundle action. Attention: If you override this, you might loose the bnd4sbt functionality. */
override protected def packageAction = bndBundle
/** This SBT project. */
- override protected val project = this
+ final override protected[bnd4sbt] val project = this
private def createBundle() {
val builder = new Builder
@@ -14,6 +14,7 @@ import scala.collection.immutable.Set
* Execution environments available for bnd4sbt. As Scala relies on Java 5, only Java 5 and later are supported.
*/
object ExecutionEnvironments extends Enumeration {
+ type ExecutionEnvironments = Value
val Java5 = Value("J2SE-1.5")
val Java6 = Value("JavaSE-1.6")
}
@@ -22,6 +23,7 @@ object ExecutionEnvironments extends Enumeration {
* Properties for BND with sensible defaults.
*/
private[bnd4sbt] trait BNDPluginProperties extends ProjectAccessor {
+ import ExecutionEnvironments._
/**
* The value for Bundle-SymbolicName. Defaults to projectOrganization.projectName with duplicate subsequences
@@ -55,7 +57,7 @@ private[bnd4sbt] trait BNDPluginProperties extends ProjectAccessor {
protected def bndBundleLicense: Option[String] = None
/** The value for Bundle-RequiredExecutionEnvironment. Defaults to empty set, i.e. no execution environments are defined. */
- protected def bndExecutionEnvironment = Set[ExecutionEnvironments.Value]()
+ protected def bndExecutionEnvironment = Set[ExecutionEnvironments]()
/** The value for Private-Package. Defaults to "*", i.e. contains everything. */
protected def bndPrivatePackage = Seq("*")
@@ -119,5 +121,5 @@ private[bnd4sbt] trait BNDPluginProperties extends ProjectAccessor {
private[bnd4sbt] trait ProjectAccessor {
/** The SBT project. */
- protected val project: DefaultProject
+ protected[bnd4sbt] val project: DefaultProject
}

0 comments on commit 890514a

Please sign in to comment.