Digimead Artifacts

You are welcome ;)))
Maven Central:
libraryDependencies += "###ORG###" % "###ARTIFACT###" % "###VERSION###"
<dependency>
  <groupId>###ORG###</groupId>
  <artifactId>###ARTIFACT###</artifactId>
  <version>###VERSION###</version>
</dependency>
<dependency org="###ORG###" name="###ARTIFACT###" rev="###VERSION###" />
@Grapes(
    @Grab(group='###ORG###', module='###ARTIFACT###', version='###VERSION###')
)
'###ORG###:###ARTIFACT###:###VERSION###'
'###ORG###:###ARTIFACT###:jar:###VERSION###'

You may add Maven repository:
resolvers += "digimead-maven" at "http://storage.googleapis.com/maven.repository.digimorg/"
Or you may add Ivy repository:
resolvers += Resolver.url("digimead-ivy", url("http://storage.googleapis.com/ivy.repository.digimead.org/"))(Resolver.defaultIvyPatterns)
And then
addSbtPlugin("###ORG###" % "###ARTIFACT###" % "###VERSION###")
Or you may create a
project/project/Build.scala
file that looks like the following:
import sbt._
object PluginDef extends Build {
  override def projects = Seq(root)
  lazy val root = Project("plugins", file(".")) dependsOn(plugin)
  lazy val plugin = uri("git://github.com/###ORG###/###ARTIFACT###.git#TagOrCommit")
}
You may find more information about Build.scala in SBT documentation

Mr. Alexey Aksenov aka ЁЖ

Primary email
Secondary email
Skype
ICQ
Russian phone
United Kindom phone
WorldWide SIP

Repositories:
Digimead Ivy located at http://storage.googleapis.com/ivy.repository.digimead.org/
Digimead Maven located at http://storage.googleapis.com/maven.repository.digimead.org/
SBT OSGi Manager - Usage

Usage 

If you want to enable extra run-time debugging use OSGiManagerWithDebug(Equinox TCP port) instead of OSGiManager. Also put .options file to your project directory.

You may find the plugin usage examples at https://github.com/ezh/. Look at build.sbt of Digi- libraries.

Please note, that OSGi infrastructure has no dependency organization field as Ivy or Maven has. The bundle symbolic name and the bundle version identify a unique artifact.

Generate bundle manifest 

To generate bundle manifest:

  1. Add necessary information your project. Look at Modify bundle properties
  2. Check bundle settings. Look at List actual properties per project
  3. Create your artifact as usual. The plugin will intercept packageOptions in (Compile, packageBin) and will inject OSGi headers to the generated manifest.

Modify bundle properties 

You may alter bundle properties with complex block

inConfig(OSGiConf)({
  import OSGiKey._
  Seq[Project.Setting[_]](
    osgiBndBundleActivator := "org.example.Activator",
    osgiBndBundleSymbolicName := "org.example",
    osgiBndBundleCopyright := "Copyright © 19xx-23xx N. All rights reserved.",
    osgiBndExportPackage := List("org.example.*"),
    osgiBndImportPackage := List("!org.aspectj.*", "*"),
    osgiBndBundleLicense := Seq("http://www.gnu.org/licenses/agpl.html;description=GNU Affero General Public License",
      "http://example.org/CommercialLicense.txt;description=Commercial License").mkString(","),
    resolvers += typeP2("Eclipse P2 update site" at "http://eclipse.nn.nn"),
    resolvers += typeOBR("Local OBR repository" at sys.env("OBR_REPOSITORY"))
  )
})

You may alter bundle properties as single line from SBT settings.

OSGiKey.osgiBndBundleActivator in OSGiConf := "org.example.Activator"

List actual properties per project 

You may inspect OSGi properties with SBT show command or to use osgi-show report.

Resolve OSGi dependencies 

TODO doc

Resolve OSGi dependencies against P2 update site 

TODO doc

inConfig(OSGiConf)({
import OSGiKey._
  Seq[Project.Setting[_]](
    resolvers += typeP2("Eclipse P2 update site" at "http://eclipse.ialto.com/eclipse/updates/4.2/R-4.2.1-201209141800/"),
    libraryDependencies += typeP2((OSGi.ECLIPSE_PLUGIN % "org.eclipse.ui" % OSGi.ANY_VERSION).withSources),
    libraryDependencies += typeP2((OSGi.ECLIPSE_PLUGIN % "org.eclipse.core.runtime" % OSGi.ANY_VERSION).withSources))
})

osgi-resolve

Resolver OSGi dependencies against OBR R5 repository 

TODO doc

inConfig(OSGiConf)({
  import OSGiKey._
  Seq[Project.Setting[_]](
    resolvers += typeOBR("Local OBR repository" at "file:/path/to/obr"),
    libraryDependencies += typeOBR((OSGi.ANY_ORGANIZATION % "org.digimead.digi.lib" % OSGi.ANY_VERSION).withSources))
})

osgi-resolve

Current state

I Like It

Versions

Correctness

Orphus system
Select spelling error with your mouse and press Ctrl+Enter
This information is provided in the hope that it will be useful and help people with their first steps, even if it is written in broken English... Would you have preferred well written Russian? :-) Please, correct it, if you find something inappropriate.
Fork me on GitHub