-
Nov 28th, 2012, 03:54 AM
#1
Running a debug configuration in STS on a Maven profile
Hi,
I have a build with a Maven profile and I can run in as a Run configuration from within STS, the Spring Source Tool Suite Eclipse version.
I can also run it from the command line with the command:
mvn clean install -Pmysql-test -Dtest=NavbarLanguageDaoTest
But when I want to run it as a Debug configuration from within STS, it runs as a Run configuration, that is, it runs fine to the end but does not stop to any of the breakpoints.
In the Debug perspective, I can see the breakpoints in the pane listing the breakpoints and all of them are ticked.
Why is it that no breakpoint is being stopped at ?
Kind Regards,
Stephane
-
Nov 28th, 2012, 10:37 AM
#2
How are you launching in STS? What kind of launch configuration are you using?
You would be best off using "Debug as Java Application" launch type.
-
Nov 28th, 2012, 05:01 PM
#3
Hi Andrew,
Thanks for the watch tour. It's a Maven Build type debug configuration. The Maven runtime is an external one, the one used on the command line.
Stephane
-
Nov 28th, 2012, 05:04 PM
#4
Hi Andrew,
Thanks for the watch tour. It's a Maven Build type debug configuration. The Maven runtime is an external one, the one used on the command line.
I provided it with the goals "clean instal" and the same profile used on the command line.
Stephane
-
Nov 28th, 2012, 05:50 PM
#5
Could it be that you are running your tests as an external process?
I would recommend that you launch as a Java app instead of using a maven launch if at all possible. Launching through maven, as you can already see, includes all sort of strangeness that is really not relevant to debugging your tests.
-
Nov 29th, 2012, 04:16 AM
#6
I wonder what Java class to specify when creating a Java Application debug configuration.
Say, to run the suite of integration tests...
Stephane
-
Nov 29th, 2012, 10:45 AM
#7
I was a little mistaken. You should not choose Java Application. Rather, choose your src/test/java folder, right-click -> Run as -> JUnit test.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules