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 243049

Summary: TomEE: Debugging via maven doesn't work as expected
Product: serverplugins Reporter: tandraschko
Component: TomEEAssignee: issues@serverplugins <issues>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description tandraschko 2014-03-19 11:22:00 UTC
Maven Plugin:
        <plugins>
            <plugin>
                <groupId>org.apache.openejb.maven</groupId>
                <artifactId>tomee-maven-plugin</artifactId>
                <version>1.6.0</version>
                <configuration>
                    <tomeeVersion>1.6.0</tomeeVersion>
                    <tomeeClassifier>plus</tomeeClassifier>
                </configuration>
            </plugin>
        </plugins>

NetBeans action:

    Goals: clean package tomee:debug
    Properties: jpda.listen=maven


If you start now, NetBeans/Maven console prints:

NetBeans: JPDA Listening Start...
JPDA Address: Dev-4:58262
Port:58262
..... maven build process...
Listening for transport dt_socket at address: 5005


As the port is different, it can't work.

It's possible to synchronize the ports via:
        <plugins>
            <plugin>
                <groupId>org.apache.openejb.maven</groupId>
                <artifactId>tomee-maven-plugin</artifactId>
                <version>1.6.0</version>
                <configuration>
                    <tomeeVersion>1.6.0</tomeeVersion>
                    <tomeeClassifier>plus</tomeeClassifier>
                    <debugPort>${jpda.address}</debugPort>
                </configuration>
            </plugin>
        </plugins>


So AFAICS, NetBeans listens to right port and TomEE openend the right but it doesn't work.
If you now connect to TomEE via: Menu -> Debug -> Attach Debugger, with the right port, it works.