1

This seems to be a classic dilemma, but I haven't figured it out. Maven works fine from outside intellij, but intellij uses its own maven instance which seems to work in general.

However, when trying to debug it doesn't get as far as finding the launcher, which definitely sounds like a classpath issue. Looking at the output of 'ps' (edited for readability), this is what intellij is running:

/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java \
-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:63700,suspend=y,server=n \
-Dmaven.home='/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3' \
-Dclassworlds.conf='/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/bin/m2.conf' \
-Dfile.encoding=UTF-8 \
-classpath \
'/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.4.jar:\
/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/idea_rt.jar' \
org.codehaus.classworlds.Launcher \
-Didea.version=15.0.2 \
scala:run \
-DmainClass=redangus.nce.Inserter

For some reason that is lost on me, when I remove the 2nd line, (the debug info), I can run it fine from the command line and it has no issue with finding the launcher.

I would be very pleased to have someone help get my mind right.

Hmm, I have a hunch that server option should be 'y'. I wonder how I change that ...

Well, I built a Hello World maven app using the standard net.alchim31.maven:scala-archetype-simple archetype and after fixing the imports so it compiles I find that it doesn't actually work in the debugger, either. Sigh. I give up. Yay, print statements

user3416742
  • 168
  • 1
  • 1
  • 7

1 Answers1

2

Look this question, just try

Looks like you have an exception breakpoint on ClassNotFoundException. Please try to open Run | View Breakpoints... and uncheck the breakpoint under "Java Exception Breakpoints".

I check the breakpoint by misktake, and cause the problem.

Community
  • 1
  • 1
XY WANG
  • 71
  • 6