I have a multi-module Gradle project that compiles fine and runs all tests from
the command line.
Building and testing (right-click on the project, then choosing "Test") also
works fine from within NetBeans.
However, one Test has the following imports:
import
org.springframework.boot.test.context.ConfigDataApplicationContextInitializer;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
But NetBeans claims the packages don't exist.
build.gradle includes the following modules:
// Test
testCompile("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
testImplementation ("org.springframework.boot:spring-boot-starter-test")
testImplementation ("org.freemarker:freemarker:${freemarkerVersion}")
when I add the spring boot version:
testImplementation
("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
then NetBeans is happy again.
This is a sub-module of a multi-module project and springBootVersion is defined
in the properties of the main project, not the module.
I am not really experienced with Gradle, so I don't know whether this is
incorrect in Gradle to begin with (but apparently "tolerated" because the
project builds) and NetBeans just follows that, or if this is a problem in
NetBeans.
Thanks
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists