Intellij + springboot + maven + spring-loaded
Asked Answered
Q

2

11

I have an issue where debugging stops working in Intellij, when applying Spring-loaded as a dependency to the maven plugin.

Situation 1 (working):

Using a autogenerated spring-boot maven (pom.xml) file with a declared "Spring-boot-maven-plugin" I can debug my my app using the debug-maven command in intellij. The pom file looks like this:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

Situation 2 (not working):

Following the guide lines here: spring-boot-hot-swapping one should add a dependency for spring-loaded, to make use of spring-loaded. The pom file now looks like:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <dependencies>
                <dependency>
                    <groupId>org.springframework</groupId>
                    <artifactId>springloaded</artifactId>
                    <version>1.2.3.RELEASE</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>

Debugging the same run-configuration as before does not work. The break-points simply never turns into a "checkmark" and the code never suspends. Code is now hotswapping as one would expect... If I remove the plugin-dependency again, debugging starts working again...

Please help me make situation two work!

IntelliJ 14.1.3 Ultimate, Java 7, Spring boot 1.2.4, Spring loaded 1.2.3

Quotha answered 23/6, 2015 at 18:22 Comment(0)
Q
4

Since it seems there is no one with an answer to this (nor in IntelliJ forums) i've created an issue: https://youtrack.jetbrains.com/issue/IDEA-142078

Quotha answered 3/7, 2015 at 11:44 Comment(0)
S
3

Did you try with spring-devtools (since 1.2.3) ? Use this dependency :

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
</dependency>

There is already a ticket here, it seams the same issue.

Su answered 3/7, 2015 at 20:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.