Skip to content
Advertisement

Tag: scala

Ways to make maven build faster?

I have a multi module java project. Maven takes almost around 40 secs to build it. I have tried maven with multi threaded builds too by specifying -T and -C args for no of threads and cores to be used. But I haven’t seen any significant improvement in wall time of my builds. I am using maven 3.2.3 and sometimes

Difference between Java Optional and Scala Option

At the very end, this article introducing to new Java 8 Optional, states that Optional is not nearly as powerful as Option[T] in Scala (but at least it doesn’t allow wrapping null). The API is not as straightforward as null-handling and probably much slower. But the benefit of compile-time checking plus readability and documentation value of Optional used consistently greatly

What is the advantage of using scala pattern matching instead of java switch case?

Everybody says that pattern matching is a great feature in functional languages. Why? Can’t I simple use ifs and switch cases for everything? I’d like to understand the advantages of using pattern matching instead of regular procedural programming ifs and switch cases Answer I’d first like to note that you don’t use pattern matching “instead” of switch statements. Scala doesn’t

Creating a Java Enum in Scala

My workplace has been experimenting in moving from Java to Scala for some tasks, and it works well for what we’re doing. However, some preexisting logging methods expect a java.lang.Enum. The logging method is defined in the (Java) base class, and the subclasses can define their own enums, which the logger will track across all instances in multiple threads/machines. It

Running jacocoReport

I’m using Gradle 1.7 and Jacoco plugin. My project uses Java and Scala plugins. When I run gradlew -i clean jacocoTestReport Report is not created and I see in the log What does it mean? Why report is not created? Answer The task will only run if coverage data is available. You can make sure of that by also running

Maven package works but Intellij’s build fails

I have a JDK 1.7 project with a maven dependency to a local jar in my maven repo. I’m unable to build the project using Intellij, with the errors that a symbol cannot be found (the symbol is a class importing packages from the local jar) But I can successfully build the project using ‘mvn package’. I’ve spent so much

Advertisement