I am attempting to debug unit tests in Netbeans 7 on classes that make use of the EclipseLink static weaving. If I turn off static weaving I can get debug a unit test, but I cannot get a non-debug run of the tests to build (as expected). If I turn static weaving on I cannot debug the tests.
I have this in my pom.xml:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-classes</phase>
<configuration>
<tasks>
<java classname="org.eclipse.persistence.tools.weaving.jpa.StaticWeave"
classpathref="maven.runtime.classpath" fork="true">
<arg line="-loglevel FINE -persistenceinfo src/main/resources target/classes target/classes"/>
</java>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<开发者_StackOverflow/executions>
</plugin>
I am guessing I need to have the static weaving get picked up when debugging? Any ideas?
A hack fix seems to be to turn dynamic weaving on for the unit tests while leaving it as static for the release version... ick.
精彩评论