NetBeans Gradle shadow dependency not added at runtime

89 Views Asked by At

I've imported a Gradle project into NetBeans 12.4. This project uses shadow plugin and sets the JDBC driver as a shadow excluded dependency:

shadow files('lib/sqljdbc.jar')

When I hit the Run or Debug button in NetBeans, the program fails when trying to load the JDBC driver. How can I tell NetBeans or Gradle to include "shadow" dependencies when running?

1

There are 1 best solutions below

0
On BEST ANSWER

In the file "gradle.properties", add the following line:

action.run.args=runShadow ${javaExec.jvmArgs} ${javaExec.args}