I tried to run my multi module maven application with
mvn -f pom.xml -DskipTests clean install
java -jar modules/mainmodule/target/mainmodule-1.0-SNAPSHOT.jar
The build works without problems and all modules are available in my .m2 repository, but when running the application I get that error:
Exception in thread "main" java.lang.NoClassDefFoundError: de/peyrer/indexmodule/Indexmodule
This isn't the only dependency java can't find, it can't find any dependency. To me it seems that java can`t find my local maven repository. So what am I doing wrong?