My verticle implementation should make use of the class
HashCodeBuilder from the apache lib commons-lang.
But the problem is that "clean compile vertx:runMod" results in a compile failure.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project mymodule-vertx: Compilation failure: Compilation failure:
[ERROR] /.../TestVerticle.java:[25,39] package org.apache.commons.lang.builder does not exist
[ERROR] /.../TestVerticle.java:[63,17] cannot find symbol
[ERROR] symbol: class HashCodeBuilder
So I added the dendency to the pom.xml (super pom):
</dependencies>
...
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
This compiles fine. But this way I get a NoClassDefFoundError at runtime:
SEVERE: Exception in Java verticle
java.lang.NoClassDefFoundError: org/apache/commons/lang/builder/HashCodeBuilder
How to do it the right way?