https://github.com/vast-engineering/scala-maven-tools
A set of build tools for Maven and Scala
https://github.com/vast-engineering/scala-maven-tools
Last synced: 5 months ago
JSON representation
A set of build tools for Maven and Scala
- Host: GitHub
- URL: https://github.com/vast-engineering/scala-maven-tools
- Owner: vast-engineering
- License: other
- Created: 2013-05-09T18:01:23.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-04-26T21:37:02.000Z (about 12 years ago)
- Last Synced: 2025-03-24T09:46:47.669Z (about 1 year ago)
- Language: Java
- Size: 316 KB
- Stars: 5
- Watchers: 39
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a set of useful tools for Maven and Scala.
# scala-lifecycle-plugin
This is a plugin that adds a new packaging type ('scala-jar') to maven with a better default lifecycle. This lifecycle binds net.alchim31.maven:scala-maven-plugin:compile to the 'compile' phase by default while also retaining an invocation of maven-compiler-plugin. Additionally, com.vast:scala-surefire-maven-plugin:test is bound to the 'test' phase. This allows native and seamless use of ScalaTest in your build.
This project's releases are deployed to the maven central repository, so to use it, just add the following to the plugins section in your build.
````xml
com.vast
scala-lifecycle-plugin
3.2.0
true
````
Here's an example of a minimal POM that will compile all scala (and Java) in src/main/(scala|java) and run any JUnit or ScalaTest suites found in src/test/(scala|java). The key bit is the inclusion of the scala-lifecycle-plugin with extensions set to true. This tells Maven to use any lifecycles and/or custom packaging definitions it finds in the plugin.
````xml
4.0.0
com.vast
simple-scala-project
1.0-SNAPSHOT
scala-jar
UTF-8
1.6
1.6
org.scala-lang
scala-library
2.10.3
org.scalatest
scalatest_2.10
2.0
test
com.vast
scala-lifecycle-plugin
3.2.0
true
````
# surefire-scala
This is a subclass of the maven-surefire-plugin that adds ScalaTest to the default list of 'known' test providers. If ScalaTest is detected in your test classpath, this provider will be used by default. As a bonus, this provider will also run any JUnit tests it finds in your build. The version of scala and ScalaTest is detected automatically from your build, assuming that there's a dependency to 'scala-library' somewhere in your test classpath.
The plugin is built with the intention of adding more Scala test providers to it eventually - right now, there is only support for ScalaTest (both 1.9.x and 2.0.x), but adding Specs would not be a difficult exercise.