I am using the spring-boot-maven-plugin to create a WAR file. I am also using IntelliJ the newest version.
When i try to start it as a JAR Application it wont work because of this error:
"C:\Program Files\Java\jdk1.7.0_79\bin\java"
-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:49904,suspend=y,server=n
-Xmx2048m -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.1\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.1\lib\util.jar" -Dfile.encoding=windows-1252 com.intellij.rt.execution.CommandLineWrapper
C:\Users\test\AppData\Local\Temp\classpath0.tmp -jar
C:\development\ui\target\ui-2.0.0-SNAPSHOT.war
Connected to the target VM, address: '127.0.0.1:49904', transport:
'socket' Exception in thread "main" java.lang.ClassNotFoundException:
-jar
In the command line when i am doing java -jar C:\development\ui\target\ui-2.0.0-SNAPSHOT.war
, it works quite fine.
I have really no clue why it doesnt work, because the war file exists, and the mainClass is in the right place where i defined it in my pom.
EDIT: Ah i disabled the dynamic.classpath and now it works. Does anyone know why this doesnt work with the dynamic classpath turned on?