Surefire Scala Support Reactor

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

License

License

Categories

Categories

Scala Languages React User Interface Web Frameworks Reactor Container Microservices Reactive libraries
GroupId

GroupId

com.vast
ArtifactId

ArtifactId

surefire-scala-reactor
Last Version

Last Version

0.3.3
Release Date

Release Date

Type

Type

pom
Description

Description

Surefire Scala Support Reactor
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Download surefire-scala-reactor

How to add to project

<!-- https://jarcasting.com/artifacts/com.vast/surefire-scala-reactor/ -->
<dependency>
    <groupId>com.vast</groupId>
    <artifactId>surefire-scala-reactor</artifactId>
    <version>0.3.3</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.vast/surefire-scala-reactor/
implementation 'com.vast:surefire-scala-reactor:0.3.3'
// https://jarcasting.com/artifacts/com.vast/surefire-scala-reactor/
implementation ("com.vast:surefire-scala-reactor:0.3.3")
'com.vast:surefire-scala-reactor:pom:0.3.3'
<dependency org="com.vast" name="surefire-scala-reactor" rev="0.3.3">
  <artifact name="surefire-scala-reactor" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.vast', module='surefire-scala-reactor', version='0.3.3')
)
libraryDependencies += "com.vast" % "surefire-scala-reactor" % "0.3.3"
[com.vast/surefire-scala-reactor "0.3.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • scala-surefire-maven-plugin
  • surefire-scalatest19
  • surefire-scalatest20

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.

<plugin>
    <groupId>com.vast</groupId>
    <artifactId>scala-lifecycle-plugin</artifactId>
    <version>3.2.0</version>
    <extensions>true</extensions>
</plugin>

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 version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.vast</groupId>
    <artifactId>simple-scala-project</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>scala-jar</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>2.10.3</version>
        </dependency>

        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.10</artifactId>
            <version>2.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
	<build>
		<plugins>
		    <plugin>
		        <groupId>com.vast</groupId>
		        <artifactId>scala-lifecycle-plugin</artifactId>
		        <version>3.2.0</version>
		        <extensions>true</extensions>
		    </plugin>
		</plugins>
	</build>
</project>

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.

Versions

Version
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.0