wordnik/swagger-core — pull request #648 by guofengzh (2014-08-11 07:57:59+00:00)
Title: Use Sbt to cross-build swagger-core for 2.11.x and 2.10.x

Using different branches for various Scala versions are not easier for maintaining the code base. This pull request add Sbt to build the swagger-core.

1. What changed:
(1) added a project folder
(2) added the launcher script sbt(linux), sbt.bat(windows), laucher.jar in the root folder.
I build the modules code using the build successfully, That is, the develop_scala_2.11 branch works well for Scala 2.11.x and Scala 2.10.3/4

The Sbt is 0.13.5

2, The build can be used to build the projects in modules and some projects in samples.

3. To use the build, first run "sbt" command to launch Sbt. On linux, you please make sure that the sbt script file has execution permission.

4, On the Sbt console, run:
>projects
to list the projects that the build can build for.
The "root" project is a aggregate project. Running a task on the aggregate project will also run it on the aggregated projects. see http://www.scala-sbt.org/0.13/tutorial/Multi-Project.html.

5, To build a specific project, run:
>project
to go to the specific project, for example,
>project swagger-core

6, To build for Scala 2.11 and 2.10, run
>+compile/package/publish
see http://www.scala-sbt.org/0.13/docs/Cross-Build.html

7, use
>+publish
to do the publishing, but you need to create a .credential file in .ivy directory. see http://www.scala-sbt.org/0.13/docs/Publishing.html

8, The OSGi bundle is generated for the core and annotation when run the "publish/publishLocal" task. see https://github.com/sbt/sbt-osgi

9, To build using a specific Scala version, for example, 2.11.2
>++ 2.11.2

Comments on the sample projects
1. for java-play2/scala-play2, run
>project
to go to one of the play project, then run
>run
to launch Play. see http://www.playframework.com/documentation/2.3.x/Migration23

2, for java-dropwizard, go the the project, then run
>assembly
to generate the executable jar. see https://github.com/sbt/sbt-assembly

3, for other Java Servlet projects, run in the project
>container:start
to start the web container (Jetty 9.2.1.v20140609), or run
>packge
to generate the war. see https://github.com/earldouglas/xsbt-web-plugin.