Skip to content

Commit c1bf352

Browse files
committed
First pass at Build.scala. Updated .gitignore to ignore target.
1 parent 039d607 commit c1bf352

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
\#*\#
44
build/*
55
dist/*
6+
target/
7+
68

79

810

project/Build.scala

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import sbt._
2+
3+
object MchangeCommonsJavaBuild extends Build {
4+
5+
val nexus = "https://oss.sonatype.org/"
6+
val nexusSnapshots = nexus + "content/repositories/snapshots";
7+
val nexusReleases = nexus + "service/local/staging/deploy/maven2";
8+
9+
val projectName = "mchange-commons-java"
10+
11+
val mySettings = Seq(
12+
Keys.organization := "com.mchange",
13+
Keys.name := projectName,
14+
Keys.version := "0.2.5-SNAPSHOT",
15+
Keys.autoScalaLibrary := false, // this is a pure Java library, don't depend on Scala
16+
Keys.crossPaths := false, //don't include _<scala-version> in artifact names
17+
Keys.publishTo <<= Keys.version {
18+
(v: String) => {
19+
if (v.trim.endsWith("SNAPSHOT"))
20+
Some("snapshots" at nexusSnapshots )
21+
else
22+
Some("releases" at nexusReleases )
23+
}
24+
},
25+
Keys.resolvers += ("snapshots" at nexusSnapshots ),
26+
//Keys.scalacOptions += "-deprecation",
27+
Keys.pomExtra := pomExtraXml
28+
);
29+
30+
val dependencies = Seq(
31+
//"com.typesafe" % "config" % "1.0.0"
32+
);
33+
34+
override lazy val settings = super.settings ++ mySettings;
35+
36+
lazy val mainProject = Project(
37+
id = projectName,
38+
base = file("."),
39+
settings = Project.defaultSettings ++ (Keys.libraryDependencies ++= dependencies)
40+
);
41+
42+
val pomExtraXml = (
43+
<url>https://github.com/swaldman/mchange-commons-java</url>
44+
<licenses>
45+
<license>
46+
<name>GNU Lesser General Public License, Version 2.1</name>
47+
<url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
48+
<distribution>repo</distribution>
49+
</license>
50+
<license>
51+
<name>Eclipse Public License, Version 1.0</name>
52+
<url>http://www.eclipse.org/org/documents/epl-v10.html</url>
53+
<distribution>repo</distribution>
54+
</license>
55+
</licenses>
56+
<scm>
57+
<url>git@github.com:swaldman/mchange-commons-java.git</url>
58+
<connection>scm:git:git@github.com:swaldman/mchange-commons-java.git</connection>
59+
</scm>
60+
<developers>
61+
<developer>
62+
<id>swaldman</id>
63+
<name>Steve Waldman</name>
64+
<email>swaldman@mchange.com</email>
65+
</developer>
66+
</developers>
67+
);
68+
}
69+

0 commit comments

Comments
 (0)