Skip to content

Commit

Permalink
Prepared first release.
Browse files Browse the repository at this point in the history
  • Loading branch information
lefou committed Feb 25, 2014
1 parent 8ee9c81 commit 46ebf17
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 39 deletions.
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= SBuild Aether Plugin
Tobias Roeser
:sbuildversion: 0.7.1
:pluginversion: 0.0.9000
:pluginversion: 0.1.0
:toc:
:toc-placement: preamble
:toclevels: 1
Expand All @@ -17,8 +17,8 @@ The SBuild Aether Plugin can be downloaded from http://repo1.maven.org/maven2/or
You need a recent version of SBuild.

----
git clone https://github.com/SBuild-org/sbuild-aether.git
cd sbuild-aether/org.sbuild.plugins.aether
git clone https://github.com/SBuild-org/sbuild-aether-plugin.git
cd sbuild-aether-plugin/org.sbuild.plugins.aether
sbuild all
----

Expand Down Expand Up @@ -132,6 +132,6 @@ class Test(implicit _project: Project) {

== Changelog

=== SBuild Aether Plugi 0.1.0 - _not released yet_
=== SBuild Aether Plugi 0.1.0 - 2014-02-25

* Initial release.
68 changes: 33 additions & 35 deletions org.sbuild.plugins.aether/SBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ import de.tototec.sbuild.ant.tasks._
@version("0.7.1")
@classpath(
"mvn:org.apache.ant:ant:1.8.4",
"mvn:org.sbuild:org.sbuild.plugins.sbuildplugin:0.3.0"
"mvn:org.sbuild:org.sbuild.plugins.sbuildplugin:0.3.0",
"mvn:org.sbuild:org.sbuild.plugins.mavendeploy:0.1.0"
)
class SBuild(implicit _project: Project) {

val namespace = "org.sbuild.plugins.aether"
val version = "0.0.9100"
val version = "0.1.0"
val url = "https://github.com/SBuild-org/sbuild-aether-plugin"

val jar = s"target/${namespace}-${version}.jar"
val sourcesJar = s"target/${namespace}-${version}-sources.jar"
val sourcesDir = "src/main/scala"

val aetherVersion = "0.9.0.M4"
val aetherConnectorVersion = "0.9.0.M2"
Expand Down Expand Up @@ -63,44 +69,36 @@ class SBuild(implicit _project: Project) {
)
}

val sbuildVersion = "0.7.0"
val scalaVersion = "2.10.3"
val jar = s"target/${namespace}-${version}.jar"
val sourcesZip = s"target/${namespace}-${version}-sources.jar"
val sources = "scan:src/main/scala"

Target("phony:all") dependsOn sourcesZip ~ jar

Target(sourcesZip) dependsOn sources ~ "LICENSE.txt" exec { ctx: TargetContext =>
Target(sourcesJar) dependsOn s"scan:${sourcesDir}" ~ "LICENSE.txt" exec { ctx: TargetContext =>
AntZip(destFile = ctx.targetFile.get, fileSets = Seq(
AntFileSet(dir = Path("src/main/scala")),
AntFileSet(dir = Path(sourcesDir)),
AntFileSet(file = Path("LICENSE.txt"))
))
}

// Target("phony:scaladoc").cacheable dependsOn scalaCompiler ~ compileCp ~ sources exec {
// addons.scala.Scaladoc(
// scaladocClasspath = scalaCompiler.files,
// classpath = compileCp.files,
// sources = sources.files,
// destDir = Path("target/scaladoc"),
// deprecation = true, unchecked = true, implicits = true,
// docVersion = sbuildVersion,
// docTitle = s"SBuild Experimental API Reference"
// )
// }
import org.sbuild.plugins.mavendeploy._
Plugin[MavenDeploy] configure { _.copy(
groupId = "org.sbuild",
artifactId = namespace,
version = version,
artifactName = Some("SBuild Aether Plugin"),
description = Some("An SBuild Plugin that provides a SchemeHandler based on Eclipse Aether (Maven) to transitively resolve dependencies from Maven repositories."),
repository = Repository.SonatypeOss,
scm = Option(Scm(url = url, connection = url)),
developers = Seq(Developer(id = "TobiasRoeser", name = "Tobias Roeser", email = "[email protected]")),
gpg = true,
licenses = Seq(License.Apache20),
url = Some(url),
files = Map(
"jar" -> s"target/${namespace}-${version}.jar",
"sources" -> sourcesJar,
"javadoc" -> "target/fake.jar"
)
)}

// Target(jar) dependsOn "compile" ~ "LICENSE.txt" exec { ctx: TargetContext =>
// AntJar(
// destFile = ctx.targetFile.get,
// baseDir = Path("target/classes"),
// fileSet = AntFileSet(file = Path("LICENSE.txt")),
// manifestEntries = Map(
// "SBuild-ExportPackage" -> namespace,
// "SBuild-Plugin" -> s"""${namespace}.Aether=${namespace}.AetherPlugin;version="${version}"""",
// "SBuild-Classpath" -> aetherCp.map("raw:" + _).mkString(",")
// )
// )
// }
Target("target/fake.jar") dependsOn "LICENSE.txt" exec { ctx: TargetContext =>
import de.tototec.sbuild.ant._
tasks.AntJar(destFile = ctx.targetFile.get, fileSet = AntFileSet(file = "LICENSE.txt".files.head))
}

}

0 comments on commit 46ebf17

Please sign in to comment.