Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
10.0
-
None
-
None
-
Product Version: Apache NetBeans IDE 10.0 (Build incubator-netbeans-release-380-on-20181217)
Updates: Updates available to version NetBeans 8.2 Patch 2
Java: 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9
Runtime: OpenJDK Runtime Environment 11.0.2+9
System: Windows 8.1 version 6.3 running on amd64; Cp1252; en_US (nb)
Build Tool: Maven 3.6.0Product Version: Apache NetBeans IDE 10.0 (Build incubator-netbeans-release-380-on-20181217) Updates: Updates available to version NetBeans 8.2 Patch 2 Java: 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9 Runtime: OpenJDK Runtime Environment 11.0.2+9 System: Windows 8.1 version 6.3 running on amd64; Cp1252; en_US (nb) Build Tool: Maven 3.6.0
Description
I have a Maven project that is built with compiler source and target version 8. Because the source directory includes module-info.java, this project won't compile unless I exclude it from the build:
<properties> <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> </properties> <build> <sourceDirectory>../src/main/java</sourceDirectory> <pluginManagement> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <excludes>module-info.java</excludes> </configuration> </plugin> </plugins> </pluginManagement> </build>
The project builds correctly, but the Source Packages node still includes the file, and displays it as containing errors because it requires at least Java 9.
It would be nice if source files excluded from the build would also be excluded from the Source Packages node, or at least grayed out and without displaying errors.