Failed import of Maven project into IntelliJ

Something went wrong with the import of the Maven project into IntelliJ.

Try again.

  1. Delete .idea and myapp.iml items from project folder.
  2. Re-import Maven project into IntelliJ.
  3. Build project.
    Perhaps context-click in the code editor and choose Recompile MyApp.java
  4. Debug.
    Click the green-bug to debug, or context-click to choose Debug 'MyApp.main()'

Then debugger works as expected, stopping on breakpoints.


Tip: Before importing a Maven project, edit the POM to specify a Java version as the compiler source & target. If omitted you get Maven's default of compiling as Java 5 (1.5) code. Per the Maven page, Setting the -source and -target of the Java Compiler inject these four lines into your POM file, a pair of tags inside a properties tag.

Here we specify Java 8 (1.8) be used by the compiler.

<project>
  [...]
  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>
  [...]
</project>
Answer from Basil Bourque on Stack Overflow
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 6796164198546-Intellij-not-stopping-at-breakpoints
Intellij not stopping at breakpoints – IDEs Support (IntelliJ Platform) | JetBrains
If you really need to use Maven goal for debugging you need to add debug arguments to the process which runs the boot run maven goal, see https://docs.spring.io/spring-boot/docs/2.0.3.RELEASE/maven-plugin/examples/run-debug.html And then connect ...
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206983175-Maven-Debug-does-not-stop-at-breakpoints
Maven Debug does not stop at breakpoints – IDEs Support (IntelliJ Platform) | JetBrains
The reason this happens is that IntelliJ cannot connect to debugger in forked failsafe thread. So, you need to run maven to start a debugger on port 5005:
🌐
Reddit
reddit.com › r/intellijidea › intellij debugger no longer stops at breakpoints
r/IntelliJIDEA on Reddit: IntelliJ debugger no longer stops at breakpoints
February 8, 2023 -

Using IntelliJ Community Edition 2022.3.2 for Windows, I was debugging just fine until I decided to run some unit tests manually by going to the file in the proyect explorer, double clicking it and selecting "run". As a result, the debugger (Remote JVM Debug) no longer stops at breakpoints.

My best guess is that running the unit test created another JVM or Java Project and the debugger attachs to it whenever I run it but I tried restarting my PC to kill all processes and did´t work. Also tried uninstalling Tomcat and IntelliJ because I notice that before running the unit test, it built the proyect and that´s something I never do using the IntelliJ Build Project tool, I always do it via CMD

I created a post in StackOverflow but got no answer. Pelase feel free to check the post asi i added a lot more information there.

Any kind of information or workaround I can try is welcome, i have been struggling with this issue for 2 days now.

🌐
Reddit
reddit.com › r/intellijidea › intellij community edition breakpoint not working issue
r/IntelliJIDEA on Reddit: intellij community edition breakpoint not working issue
May 16, 2025 -

Hello everyone, intellij noob here...

my eclipsed kept freezing so i had to transition to intellij community edition mid project to finish a time sensitive project for my client. so i imported my javafx project as "maven project" into intellij and everything was fine and i was cheering, until i encountered an exception and wanted to setup breakpoints to evaluate... the execution never stops...

i've been battling with this whole morning with grok which provided a bunch of all kinds of suggestions, none worked so far. of course grok keeps telling to ensure breakpoints are not muted, don't have conditions, are set in reachable lines, pom.xml is correct, code is up-to-date etc etc, of course they are... these are so "basic", the problem must be some intellij-specific config i'm missing but i don't know what or where...

so first i tried:

these are supposed to be imported from my eclipse so i figured this was fine. but no, debugger never worked. then i added a "remote jvm debug":

i have to point out that in intellij my "run" button works no problem, and it also works fine in eclipse (...argh) even in debug mode, so it's not a pom, proj config or code problem i'm 99.99% sure.

in the project structure window, in "project" i have the correct project and sdk, in "modules" i have all the needed javafx dependencies, and in "library" or "paths" tab, it correctly targets the \target\classes path, and all relevant folders are listed there, so it's not a path issue either... and according to grok i don't need to edit "attach to process" since everything should be automatic.

i really don't understand why it's seem so impossible for intellinj to halt execution on breakpoints in debug mode while eclipse can... since intellij seems successfully imported my maven project from eclipse, these things should be a non-issue... anyway, i've wasted hours and haven't eaten anything, i'm out of ideas, and if you guys can't help me either, i think i'll give up on intellij and go back to eclipse... what a dream come false...

🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 10000635378450-IntelliJ-debugger-no-longer-stops-at-breakpoints
IntelliJ debugger no longer stops at breakpoints – IDEs Support (IntelliJ Platform) | JetBrains
February 8, 2023 - Try debugging with the command line jdb tool. Does it work? What are the breakpoint properties? Make sure Suspend option is enabled. ... I'm starting to think this might be a bug of some sort, but it caught my attention that it persists even ...
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206825095-Breakpoints-don-t-work-when-debugging-maven-project
Breakpoints don't work when debugging maven project? – IDEs Support (IntelliJ Platform) | JetBrains
I am trying to debug a unit test in a Maven project. Normally I would just set up a JUnit test configuration in Intellj and set a breakpoint on the line I'm interested in. Unfortunately this particular bug only shows when a certain Maven profile is used. I have set up a Maven test configuration and can run it (with the profile) and duplicate the bug, but none of my breakpoints ever activate.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206993325-Debugger-not-stopping-at-breakpoints-after-first-time
Debugger not stopping at breakpoints after first time – IDEs Support (IntelliJ Platform) | JetBrains
Removing the Javarebel Debugger plugin solved this problem. ... There is a new version of the plugin available (either use the update site or here is the link http://plugins.intellij.net/plugin/?id=1699).
🌐
javaspring
javaspring.net › blog › intellij-idea-13-debugger-don-t-stop-on-breakpoint-in-java-for-maven-project
IntelliJ IDEA 13 Debugger Not Stopping on Breakpoints in Java Maven Project: Fix for Ignored Breakpoints When Code Executes (Maven exec:exec, mvnDebug) — javaspring.net
Ignored breakpoints in IntelliJ IDEA 13 with Maven are typically caused by misconfigured debug arguments, source mismatches, or missing remote debugger setups. By: Ensuring debug JVM arguments are passed to exec:exec, ... Aligning JDKs and ...
Find elsewhere
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 12637593520402-Breakpoints-not-working-in-spring-boot-app
Breakpoints not working in spring boot app – IDEs Support (IntelliJ Platform) | JetBrains
When I debug sprint boot project, program does not stop on breakpoints, it continues to run as if no breakpoints were set. What is causing this issue? The project is maven based and is configured to use sprint-boot:run command when the project is run (click on play button on top right of the IDE. to debug I click on bug icon on top right. ... Hi, The Maven `sprint-boot:run` runs the app in a forked process which can be debugged from the IDEA side directly.
🌐
GitHub
github.com › openjfx › javafx-maven-plugin › issues › 164
Breakpoint debugging does not work with IntelliJ IDEA · Issue #164 · openjfx/javafx-maven-plugin
February 24, 2023 - When I pressing the "Stop debugging button" it disconect the socket communication like expected · Disconnected from the target VM, address: '127.0.0.1:7998', transport: 'socket' Process finished with exit code 130 but the application is still running. Please let me know if anyone has workaround settings for debugging Intellij IDEA ... You can’t perform that action at this time.
Author   buedi
🌐
JetBrains
youtrack.jetbrains.com › issue › IDEA-65411 › IntelliJ-does-not-stop-at-breakpoint-with-local-tomcat-deployment
IntelliJ does not stop at breakpoint with local tomcat ...
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
Top answer
1 of 4
10

I figured out what my issue was and I think the problem is specific to me and the nature of my application. Actually I should call it a self induced issue. Let me explain the nature of events.

  1. I have been using eclipse to develop and have a local install of weblogic instance. My application needs coherence cache server and I have few other JVM parameters that I pass when starting the domain. Therefore I had added a line at the start of the $DOMAIN_HOME/bin/setDomainEnv.sh file like so

    JAVA_OPTIONS="- Dtangosol.coherence.distributed.localstorage=false -Dtangosol.coherence.wka=devmachine and blah blah blah

  2. I switched to intellij and started working on this project and then configured the weblogic plugin and run configuration etc.

  3. I noticed that intellij adds a JAVA_OPTIONS in the startup/connection tab in Run/Debug Configurations like so

  1. However the JAVA_OPTIONS that was being passed by intellij was not being used by weblogic. I believe it was overridden with what was in the setDomainEnv.sh which is why I saw the following logs.

java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) Starting WLS with line: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -client -Xms512m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/Users/dparupud/omw/oracle/middleware/weblogic_10.3.6/wlserver_10.3/server/lib/weblogic.policy -Dtangosol.coherence.distributed.localstorage=false -Dtangosol.coherence.wka=devmachine blah blah blah......

  1. When I went and removed the JAVA_OPTIONS from setDomainEnv.sh and restarted the server from intellij I saw the following log

starting weblogic with Java version: java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) Starting WLS with line: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -client -Xms512m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/Users/dparupud/omw/oracle/middleware/weblogic_10.3.6/wlserver_10.3/server/lib/weblogic.policy - agentlib:jdwp=transport=dt_socket,address=127.0.0.1:65501,suspend=y,server=n

Now the log showed that the jdwp agent was in action. I did notice that I did not see that particular log before I asked the Question on SO but I thought maybe IntelliJ was doing something inside the covers because JAVA_OPTIONS was being passed and intellij does not allow you to mess with that ( it is readonly).

I guess I can either pass all my jvm parameters either from intellij or add the jdwp agent info in the setDomainEnv.sh.

Now I am able to debug.

2 of 4
5

To setup WebLogic debugging on IntelliJ:

  1. Find the WebLogic Debug Port: this is the port on WebLogic exposed for debugging. The default debug port is 8453 but if it was changed you can find it in the config.xml (under the config folder in your domain home) or the setDomainEnv.sh look for DEBUG_PORT (I assume it is .sh and not .bat as you appear to be using Mac OS X).

  2. Remote Debugger Configuration: go to the configuration and choose new, then select "Remote" ,type in any name that is sensible and under the port (orange block in image) type in the value you found in 1. For host (the green block) type localhost [a side note: you can connect to a remote server by typing that servers host name or IP if the debug port is exposed].

  3. Start debugger: Start the debug configuration you just setup, the debug window will pop up and if the port is correct it will say it has connected to remote host and you are good to go debugging.

--Edit 1--

Read your question again missed the part about you already having setup the remote config.

It may be missing the breakpoint if your program is multi-threaded the breakpoint may not be hit on the current thread you are on.

There is a drop down in the debugger when you have the remote configuration working where you should be able to select the thread to debug on.

-- Edit 2 --

Added the image for the remote debugger settings

Top answer
1 of 3
8

Update 2021:

Nowadays, on most situations, debugging should work out of the box.

Newer versions of IntelliJ IDEA (tested with 2020.3) can now auto-detect maven exec configurations and add the proper options to enable debugging. See IDEA-189973 for further info. Thanks @Gili for opening a ticket for this functionality back in 2018.

Nevertheless my original answer bellow can still be useful for older versions of IntelliJ, Remote Debugging or to debug while using certain Maven / Gradle plugins that Fork the VM and require debugging options to be manually passed downstream (adjust configuration accordingly).


My solution:

Considering that you have a program that depends on system properties:

package com.mycompany.app;


public class App {

    private static final String GREETING = System.getProperty("greeting", "Hi");

    public static void main(String[] args) {
        int x = 10;
        System.out.println(GREETING);
    }
}

And you are running it with exec:exec:

mvn exec:exec -Dexec.executable=java "-Dexec.args=-classpath %classpath -Dgreeting=\"Hello\" com.mycompany.app.App"

With some "inception magic" we can debug the process started by Mavenexec:exec.

Maven

Change your exec:exec goal to enable remote debugging. I'm using suspend=y and server=n, but feel free to configure the JDWP Agent as you please:

-agentlib:jdwp=transport=dt_socket,server=n,address=127.0.0.1:8000,suspend=y`

This will not be passed directly to the maven JVM, instead it will be passed to exec.args which will be used by exec:exec:

mvn exec:exec -Dexec.executable=java "-Dexec.args=-classpath %classpath -agentlib:jdwp=transport=dt_socket,server=n,address=127.0.0.1:8000,suspend=y -Dgreeting=\"Hello\" com.mycompany.app.App"

IntelliJ IDEA

Create a Remote configuration (again I'm using a Listen strategy. You should adjust it accordingly):

Now toggle your breakpoints and Debug your remote configuration. Using the settings above it will wait until your process starts:

Finally run the exec:exec line above and debug your application at will:


So basically you need two "Run/Debug" configurations for this to work:

  1. A Maven configuration for exec:exec with the system properties and JDWP agent configuration:

  1. The remote configuration acting as a client.
2 of 3
1

The exec goal will execute your program in a separate process, so the debugger may not be connecting to the right JVM. Instead try using the java goal, e.g.:

mvnDebug install exec:java 

This will execute your program in the same process and hopefully you will hit your breakpoint.

🌐
Stack Overflow
stackoverflow.com › questions › 27351090 › intellij-debugger-not-hitting-breakpoints-in-a-maven-java-google-app-engine-proj
IntelliJ debugger not hitting breakpoints in a Maven Java Google App Engine project (Eclipse works) - Stack Overflow
I think you may have had the same problem I had.Intellij debugger does not stop at breakpoints · Are you sure your server is exposing the 8000 port for debugger to listen when it started.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206417539-Maven-debug-break-point
Maven debug break point – IDEs Support (IntelliJ Platform) | JetBrains
... Make sure you are connecting to the correct JVM, sources in the IDE must be in sync with the classes loaded by the JVM. Breakpoint will get a check mark after remote debugger connection if the code is found where you've set the breakpoint.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360000417780-Test-Class-Breakpoint-does-not-stop
Test Class Breakpoint does not stop – IDEs Support (IntelliJ Platform) | JetBrains
When I add breakpoints to my Junit 5, works with TestNG, test cases the debugger doesn't stop on them. Breakpoints in my main code or third party code does cause the debugger to stop and I can then...