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.
I have a Maven project with some runnable files inside. In netbeans 6.5, when I select "Run File" it gets compiled and is run with the Maven dependencies in the classpath. When I try the same in Netbeans 6.7 beta, I get a NoClassDefFound exception with a class that should be in a Maven dependency.
did you customize the action mapping? do you have an external maven setup for use in the IDE? is the class not found coming from a runtime or compilation dependency?
Could you please add more info about your project? I've just checked and even i 6.7 Run File works with common use cases.
In the "Actions" section, I have checked the "Use external maven for build executions". If I uncheck it, it gets checked again automatically the next time that I open the properties dialog. The project that I'm trying to run is a subproject of another but I cannot uncheck it in the parent project either. If I put the mouse on the ckeckbox I get a tooltip that says: "Value is inherited from parent pom or default" In the Maven configuration tab (in Netbeans options). I get two messages: (Embedded Maven Version: 3.0-SNAPSHOT) the External Maven Home input is empty but below it I have: Using Default Maven Version: 2.0.9 (as found on PATH) The class not found is org/apache/commons/logging/LogFactory which is part of Apache Commons Logging. I have this dependency as provided because my project is JBoss specific and I know for sure that it's going to be in the classpath when it executes and I don't want to propagate this dependency. Anyway, the same POM in Netbeans 6.5 executes the file, so it's a problem with Netbeans 6.7.
unfortunately this is unfixable. The fact that is worked in 6.5 is strange and probably a bug. A provided dependency is not put on runtime classpath (in exec- maven-plugin 1.1 - as used in 6.5 - the compilation classpath was used, that was a bug, but seemed to probably cause the "correct" effect for you. the problem is that for execution of the app, the dependency is provided by for the execution via exec-maven-plugin it's not.. I don't see a way to fix it generally, the workaround for you is to setup a profile that defines the dependency as runtime and activate the profile in Run file action mapping. closing as LATER, no way to fix now, we might revisit once (if) we use a different method of execution
NetBeans.org Migration: changing resolution from LATER to WONTFIX