Feature-rich & self-contained functional programming in Java™ 8 and above.
There's also a blog.
Projects that include Javaslang need to target Java 1.8 at minimum.
The .jar is available at Maven Central.
compile "com.javaslang:javaslang:2.0.0-RC2"
<dependency>
<groupId>com.javaslang</groupId>
<artifactId>javaslang</artifactId>
<version>2.0.0-RC2</version>
</dependency>
Because Javaslang does not depend on any libraries (other than the JVM) you can easily add it as standalone .jar to your classpath.
Developer versions can be found here.
Ensure that your ~/.m2/settings.xml
contains the following:
<profiles>
<profile>
<id>allow-snapshots</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
Javaslang needs to be compiled with jdk 1.8.0_40 at minimum, which fixes many type inference bugs of the java compiler.
Fork the GitHub, send a pull request and keep your fork in sync with the upstream repository.
Refer to CONTRIBUTING.md for guidelines.
- Executing tests:
mvn clean test
- Executing doclint:
mvn javadoc:javadoc
- Executing code coverage report:
mvn -P ci clean test jacoco:report
- Create -javadoc.jar:
mvn javadoc:jar
- Create -source.jar:
mvn source:jar
- Update version properties:
mvn versions:update-properties
- Check for new plugin version:
mvn versions:display-plugin-updates
See http://central.sonatype.org/pages/ossrh-guide.html
Sonatype-Nexus specific maven configuration: ~/.m2/settings.xml
<settings>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
</servers>
</settings>
mvn clean deploy
The snaphot is deployed to https://oss.sonatype.org/content/repositories/snapshots/
mvn release:clean
mvn release:prepare
mvn release:perform