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.
The problem is when I execute the main class from the project node I have the compile Classpath and not the runtime classpath. On the contrary when I execute directly fom the file node I have the good runtime classpath. Example : From the project node : mvn.bat -Dexec.args=-classpath %classpath org.laurentforet.runtimecpapi.Service - Dexec.executable=C:\JIde\jdks\jdk1.5\bin\java.exe -Dnetbeans.execution=true process-classes org.codehaus.mojo:exec- maven-plugin:1.1.1:exec' [exec:exec] [INFO] Service - -from Log4j or not Log4j ? It seems that log4j is not used. But from the file node (the same command line) mvn.bat -Dexec.classpathScope=runtime -Dexec.args=-classpath %classpath org.laurentforet.runtimecpapi.Service - Dexec.executable=C:\JIde\jdks\jdk1.5\bin\java.exe -Dnetbeans.execution=true process-classes org.codehaus.mojo:exec- maven-plugin:1.1.1:exec [exec:exec] INFO [Really using Log4j] Service:9 - from Log4j or not Log4j ? Here log4j is used. I will attach my sample project. Best regards. Laurent Forêt.
Created attachment 83570 [details] Sample project
the workaround is to put exec.classpathScope=runtime as a property for the Run/Debug action mappings. That property of exec-maven-plugin seems to default to "compile" scope which is strange for execution plugin. See http://jira.codehaus.org/browse/MEXEC-62 http://hg.netbeans.org/main/rev/da26a33d3481
Ok the turnaround work fine. Thanls Laurent.
Integrated into 'main-golden', will be available in build *200906170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/da26a33d3481 User: Milos Kleint <mkleint@netbeans.org> Log: #167084 default scope in exec-plugin 1.1.1 is compile, which is wrong, it should be runtime, we need to set in action mapping for now
v.
The fix has been ported into the release67_fixes repository. http://hg.netbeans.org/release67_fixes/rev/c7e7242e4070
Product Version: NetBeans IDE 6.7.1 RC (Build 200907162301) Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) Verified in 6.7.1 RC