Build Error for CS-230 Project Gameauth Application

The issue with the assignment prompt is that we are told to follow the Dropwizard Hello World instructions for running the application.

Begin by importing the file into Eclipse as a new Maven project. If you have not already practiced using Maven, be sure to follow the instructions in the Dropwizard Hello World Tutorial.

SNHU CS0230 Module Four

The problem with the instructions is that it fails to mention that the application only works on Java 8 as noted on and on

You will need Java 8 to run the examples given in this code which are developed using dropwizard version 1.0.0.

When you try to build the application, you will get a build error.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0-M1:jar (attach-javadocs) on project gameauth: Execution attach-javadocs of goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0-M1:jar failed: Cannot invoke "org.apache.commons.lang3.JavaVersion.atLeast(org.apache.commons.lang3.JavaVersion)" because "org.apache.commons.lang3.SystemUtils.JAVA_SPECIFICATION_VERSION_AS_ENUM" is null -> [Help 1]

If you Google the issue, you will land on many Stack Overflow discussions suggesting that you surpass the error by editing the POM file. But if you do suppress the error, you will get a NoClassDefFoundError.

So, What should you do?

You have two options. The easy option is to edit your POM file and the tedious option is to change your version of Java to Java 8.

Towards the end of the POM file, add a source tag (<source>8</source>) to the configuration tag of maven-javadoc-plugin. This is how the plugin element should look:



Next, change the dropwizard.version element to the latest version. Change it from this <dropwizard.version>1.0.0</dropwizard.version> to this <dropwizard.version>2.0.11</dropwizard.version>.

You can find the the dropwizard.version element in the properties element near the top of the POM file. This is how it should look:


Updating the POM file by following the steps above should let you build your application, but if this doesn’t work for you, you’ll need to use Java 8.

Lastly, use the Dropwizard Hello World tutorial for building your application.

Let me know if you have questions.