Hello there, I migrating my Java 11 Modular Project to work with Maven in Netbeans 12.0: I have split it down into the projects shown.
DT.FrontEndFX depends up on DT.Core and DT.Reader, both of which build fine. When I come to build DT.FrontEndFX, I get a run of "Can not find symbol" errors which is confusing me as the missing symbols are all present in the project!! It is probably my inexperience, but I would be grateful for some help. Output below: cd C:\Users\User\Documents\NetBeansProjects\DT.FrontEndFX; "JAVA_HOME=C:\\Program Files\\Java\\jdk-11.0.7" cmd /c "\"C:\\Program Files\\NetBeans-12.0\\netbeans\\java\\maven\\bin\\mvn.cmd\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans-12.0\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 clean install" Scanning for projects... -----------------< com.diagrammer.tools:DT.FrontEndFX >----------------- Building DT.FrontEndFX 1.0-SNAPSHOT --------------------------------[ jar ]--------------------------------- --- maven-clean-plugin:2.5:clean (default-clean) @ DT.FrontEndFX --- Deleting C:\Users\User\Documents\NetBeansProjects\DT.FrontEndFX\target --- maven-resources-plugin:2.6:resources (default-resources) @ DT.FrontEndFX --- Using 'UTF-8' encoding to copy filtered resources. Copying 2 resources --- maven-compiler-plugin:3.8.0:compile (default-compile) @ DT.FrontEndFX --- Required filename-based automodules detected. Please don't publish this project to a public artifact repository! Changes detected - recompiling the module! Compiling 15 source files to C:\Users\User\Documents\NetBeansProjects\DT.FrontEndFX\target\classes ------------------------------------------------------------- COMPILATION ERROR : ------------------------------------------------------------- com/diagrammer/tools/dt/app/mvc/CreateCommands.java:[10,42] cannot find symbol symbol: class ConsoleController location: package com.diagrammer.tools.dt.frontendfx com/diagrammer/tools/dt/app/mvc/CreateCommands.java:[20,19] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.mvc.CreateCommands com/diagrammer/tools/dt/app/mvc/CreateCommands.java:[22,27] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.mvc.CreateCommands com/diagrammer/tools/dt/app/commands/ImportCrewDiagrams.java:[8,42] cannot find symbol symbol: class ConsoleController location: package com.diagrammer.tools.dt.frontendfx com/diagrammer/tools/dt/app/commands/ImportCrewDiagrams.java:[21,19] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportCrewDiagrams com/diagrammer/tools/dt/app/commands/ImportCrewDiagrams.java:[23,24] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportCrewDiagrams com/diagrammer/tools/dt/app/commands/ImportDiagramFactory.java:[8,42] cannot find symbol symbol: class ConsoleController location: package com.diagrammer.tools.dt.frontendfx com/diagrammer/tools/dt/app/commands/ImportDiagramFactory.java:[17,19] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportDiagramFactory com/diagrammer/tools/dt/app/commands/ImportDiagramFactory.java:[19,33] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportDiagramFactory com/diagrammer/tools/dt/app/commands/ImportUnitDiagrams.java:[8,42] cannot find symbol symbol: class ConsoleController location: package com.diagrammer.tools.dt.frontendfx com/diagrammer/tools/dt/app/commands/ImportUnitDiagrams.java:[21,19] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportUnitDiagrams com/diagrammer/tools/dt/app/commands/ImportUnitDiagrams.java:[24,24] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportUnitDiagrams 12 errors ------------------------------------------------------------- ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 2.271 s Finished at: 2020-07-11T16:57:01+01:00 ------------------------------------------------------------------------ Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project DT.FrontEndFX: Compilation failure: Compilation failure: com/diagrammer/tools/dt/app/mvc/CreateCommands.java:[10,42] cannot find symbol symbol: class ConsoleController location: package com.diagrammer.tools.dt.frontendfx com/diagrammer/tools/dt/app/mvc/CreateCommands.java:[20,19] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.mvc.CreateCommands com/diagrammer/tools/dt/app/mvc/CreateCommands.java:[22,27] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.mvc.CreateCommands com/diagrammer/tools/dt/app/commands/ImportCrewDiagrams.java:[8,42] cannot find symbol symbol: class ConsoleController location: package com.diagrammer.tools.dt.frontendfx com/diagrammer/tools/dt/app/commands/ImportCrewDiagrams.java:[21,19] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportCrewDiagrams com/diagrammer/tools/dt/app/commands/ImportCrewDiagrams.java:[23,24] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportCrewDiagrams com/diagrammer/tools/dt/app/commands/ImportDiagramFactory.java:[8,42] cannot find symbol symbol: class ConsoleController location: package com.diagrammer.tools.dt.frontendfx com/diagrammer/tools/dt/app/commands/ImportDiagramFactory.java:[17,19] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportDiagramFactory com/diagrammer/tools/dt/app/commands/ImportDiagramFactory.java:[19,33] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportDiagramFactory com/diagrammer/tools/dt/app/commands/ImportUnitDiagrams.java:[8,42] cannot find symbol symbol: class ConsoleController location: package com.diagrammer.tools.dt.frontendfx com/diagrammer/tools/dt/app/commands/ImportUnitDiagrams.java:[21,19] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportUnitDiagrams com/diagrammer/tools/dt/app/commands/ImportUnitDiagrams.java:[24,24] cannot find symbol symbol: class ConsoleController location: class com.diagrammer.tools.dt.app.commands.ImportUnitDiagrams -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [image: image.png]