New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to boot:run in "non-forked" process. #1412

Closed
pgiles opened this Issue Aug 20, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@pgiles

pgiles commented Aug 20, 2014

I use IntelliJ (13.1.4) to execute the spring-boot-maven-plugin. With earlier versions of Spring Boot (1.0.1.RELEASE) I was able to debug my application in the same debugger/console and found this to be a very nice, one step, one window means of debugging. But, the change to the maven plugin to fork a new process for :run made this process more cumbersome (http://docs.spring.io/spring-boot/docs/1.1.5.RELEASE/maven-plugin/examples/run-debug.html).

Perhaps this is more of a feature request, but I'd love the ability to choose to run the plugin in a "non-forked" mode (via Optional Parameter?). For now, to get the desired behavior, I'm using this:

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>1.0.1.RELEASE</version>
            </plugin>

But I would surely like to get any other fixes/enhancements in the future.

@philwebb

This comment has been minimized.

Show comment
Hide comment
@philwebb

philwebb Aug 20, 2014

Member

See also #1138

Member

philwebb commented Aug 20, 2014

See also #1138

@snicoll

This comment has been minimized.

Show comment
Hide comment
@snicoll

snicoll Sep 1, 2014

Member

The suggestion is to add a new fork attribute to the RunMojo that is false by default unless a java agent has been configured (as this requires forking and was the first reason why we did that switch).

When a java agent is set (available) or when the fork attribute has been set to true, everything works as of now. In the other case, we run the application without forking.

This requires an update of the plugin documentation as well as an example of explicit forking since now it's no longer the default. A work on the impact of forking would be a good idea as well as a lot of users had integration issues since we did that switch.

Member

snicoll commented Sep 1, 2014

The suggestion is to add a new fork attribute to the RunMojo that is false by default unless a java agent has been configured (as this requires forking and was the first reason why we did that switch).

When a java agent is set (available) or when the fork attribute has been set to true, everything works as of now. In the other case, we run the application without forking.

This requires an update of the plugin documentation as well as an example of explicit forking since now it's no longer the default. A work on the impact of forking would be a good idea as well as a lot of users had integration issues since we did that switch.

liujiong1982 added a commit to liujiong1982/spring-boot that referenced this issue Sep 2, 2014

spring-boot-1412: add option fork
add option fork for run, default false
fixes: spring-projects#1412

@philwebb philwebb closed this in 9bf1c89 Nov 4, 2014

@philwebb philwebb added this to the 1.2.0.RC1 milestone Nov 4, 2014

philwebb referenced this issue Dec 20, 2014

Fix Maven Spring Loaded detection logic
Ensure that the Maven plugin RunMojo attempts to detect the Spring
Loaded agent before deciding if the JVM should be forked.

Fixes gh-2140
@pgiles

This comment has been minimized.

Show comment
Hide comment
@pgiles

pgiles Jun 30, 2015

Thank you everyone.

pgiles commented Jun 30, 2015

Thank you everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment