forked from MINDoSOFT/ensime-sbt-cmd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
85 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Copyright (c) 2010 - 2014, Aemon Cannon | ||
Copyright (c) 2010 - 2014, ENSIME Contributors | ||
https://github.com/ensime/ensime-sbt/graphs/contributors | ||
|
||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of ENSIME nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AEMON CANNON OR | ||
THE ENSIME CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | ||
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | ||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | ||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,51 @@ | ||
# ENSIME-sbt | ||
An sbt plugin that supports integration with the ENSIME server. | ||
# ENSIME SBT | ||
|
||
This [sbt](http://github.com/sbt/sbt) plugin generates a `.ensime` | ||
file for use with an | ||
[ENSIME server](http://github.com/ensime/ensime-server). | ||
|
||
## Versions | ||
The ENSIME ecosystem is actively developed and always looking for new | ||
contributors. This is a fairly small and easy to understand plugin, so | ||
please consider sending us a Pull Request if you have any feature | ||
request ideas. | ||
|
||
__For use with ENSIME 0.9+__ | ||
|
||
* 0.1.4 for scala 2.10 and sbt 0.13 | ||
* 0.1.1 for scala 2.9/2.10 and sbt 0.12 | ||
## Installation | ||
|
||
ENSIME is effectively using a rolling release strategy until version | ||
1.0. Therefore, the latest plugin is available by adding the following | ||
to your `project/plugins.sbt`: | ||
|
||
## How to Install | ||
Add the following to your `~/.sbt/0.13/plugins/plugins.sbt` (ommit the `0.13` part for older versions of `sbt`) or `YOUR_PROJECT/project/plugins.sbt`: | ||
|
||
addSbtPlugin("org.ensime" % "ensime-sbt" % "VERSION") | ||
```scala | ||
resolvers += Resolver.sonatypeRepo("snapshots") | ||
|
||
Adding the line above to YOUR_PROJECT/build.sbt won't activate the plugin, you must add it one level above, to either YOUR_PROJECT/project/plugins.sbt or YOUR_PROJECT/project/build.sbt. | ||
addSbtPlugin("org.ensime" % "ensime-sbt" % "0.1.5-SNAPSHOT") | ||
``` | ||
|
||
## How to Use | ||
The above automatically adds the `ensime generate` command to your sbt build. This command will write a .ensime file to your project's root directory. | ||
Only sbt 0.13.x is supported. | ||
|
||
The `ensime generate -s` command causes sbt to download the source jars of your project's dependencies (as with `update-classifiers`) and include their paths in the .ensime file. This is only useful with a recent version of Ensime that can navigate to source jars. | ||
An older 0.1.1 release is available for sbt 0.12, but we don't | ||
recommend it. | ||
|
||
Note: Currently, it may be necessary to first delete your project/target directories before running 'ensime generate'. | ||
|
||
### Use locally compiled version | ||
Clone the repository to your local machine and run | ||
## Using | ||
|
||
sbt publishLocal | ||
Type `sbt 'ensime generate -s'` or, from the sbt prompt: | ||
|
||
Change the plugin version in your `plugins.sbt` file to the one declared in the `ensime-sbt/build.sbt`. | ||
``` | ||
ensime generate -s | ||
``` | ||
|
||
## License | ||
BSD License | ||
leave off the `-s` if you don't want source jars to be downloaded and | ||
referenced in the resulting `.ensime` file. | ||
|
||
|
||
## Developers / Workarounds | ||
|
||
Fork and clone this repository, (optionally: add awesomeness), and | ||
then: | ||
|
||
``` | ||
sbt publishLocal | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
import bintray.Keys._ | ||
import com.typesafe.sbt.SbtGit._ | ||
name := "ensime-sbt" | ||
|
||
versionWithGit | ||
organization := "org.ensime" | ||
|
||
git.baseVersion := "0.1.4" | ||
version := "0.1.5-SNAPSHOT" | ||
|
||
sbtPlugin := true | ||
|
||
name := "ensime-sbt" | ||
|
||
organization := "org.ensime" | ||
|
||
publishMavenStyle := false | ||
|
||
bintrayPublishSettings | ||
|
||
bintrayOrganization in bintray := Some("ensime") | ||
licenses := Seq("BSD 3 Clause" -> url("http://opensource.org/licenses/BSD-3-Clause")) | ||
|
||
repository in bintray := "sbt-plugins" | ||
homepage := Some(url("http://github.com/ensime/ensime-server")) | ||
|
||
licenses += ("BSD", url("http://opensource.org/licenses/BSD-3-Clause")) | ||
publishTo <<= version { v: String => | ||
val nexus = "https://oss.sonatype.org/" | ||
if (v.contains("SNAP")) Some("snapshots" at nexus + "content/repositories/snapshots") | ||
else Some("releases" at nexus + "service/local/staging/deploy/maven2") | ||
} | ||
|
||
credentials += Credentials( | ||
"Sonatype Nexus Repository Manager", "oss.sonatype.org", | ||
sys.env.get("SONATYPE_USERNAME").getOrElse(""), | ||
sys.env.get("SONATYPE_PASSWORD").getOrElse("") | ||
) |
This file was deleted.
Oops, something went wrong.