This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 146287 - Debug maven projects when argLine is set on surefire plugin
Summary: Debug maven projects when argLine is set on surefire plugin
Status: REOPENED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-05 10:08 UTC by arneand
Modified: 2017-08-25 21:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arneand 2008-09-05 10:08:27 UTC
When debuging a test case in a maven project which has the surefire-configuration argLine specified, debuging doesn't 
seem to work. (see related case in http://jira.codehaus.org/browse/MEVENIDE-435). This suggest that the maven plugin 
passes debugging information through the argLine parameter to the surefire plugin. However the 2.4.3 release of the 
plugin has a 'debugForkedProcess', ${maven.surefire.debug} property that seems better suited for that goal.

Example configuration:
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.4.3</version>
    <configuration>
        <includes>
            <include>**/*Test.java</include>
        </includes>
        <argLine>-Xmx512M</argLine>
    </configuration>
</plugin>

This setup won't let the debugger connect. Removing the argLine configuration solves the problem.
Comment 1 Milos Kleint 2008-10-03 08:29:51 UTC
done for netbeans.next (after 6.5)
http://hg.netbeans.org/maven-dev/rev/2f6ef9d18287
Comment 2 Quality Engineering 2008-10-17 05:00:53 UTC
Integrated into 'main-golden', will be available in build *200810170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2f6ef9d18287
User: Milos Kleint <mkleint@netbeans.org>
Log: #146287, MEVENIDE-435 - the default property carrying the debug switches is the maven.surefire.debug property, instead of argLine. for surefire versions < 2.4, use argline, for versions >=2.4, convert any custom argLine mappings to the new property
Comment 3 Milos Kleint 2008-10-17 07:24:33 UTC
done
Comment 4 jcrada 2015-06-15 01:49:25 UTC
In Netbeans 8.0.2, this issue is still present.
Comment 5 jcrada 2015-06-15 01:58:13 UTC
(In reply to jcrada from comment #4)
> In Netbeans 8.0.2, this issue is still present.

Update: In Netbeans 8.0.2, this issue is still present as long as <forkCount>0</forkCount>. For values greater than zero, the debugging works fine.
Comment 6 Martin Balin 2016-07-07 08:37:33 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 7 RampantBadger 2017-08-25 21:33:20 UTC
This problem has come back in with regards to the newish maven @{argLine} variable in the argLine element in the pom. Currently experiencing problem in 8.2
Not only does debugging of single test class fail, but also running a single test file

Example:
<argLine>@{argLine} -Dfile.encoding=UTF-8 -Xmx1g -Xms1g -XX:+PrintGCDetails</argLine>