I am using Maven for the first time.
I want to use org.json and I have added the dependency to my pom.xml:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency>
</dependencies>
Running mvn package
works fine.
When trying to execute, I get the following error message:
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONObject
I have tried to change the scope and double check API-documentation/xml-tags.
Any help is greatly appreciated.
EDIT: This answer solved it for me :-)