I am working on a java based project in IntelliJ IDEA, I assume I have an issue with my project setup...
The project consists of the "modules" (maybe I miss use that feature?):
- a library meant to be the common base for the two following modules
- a spring boot based test application
- an android app
I succeeded in getting the library to build, creating a jar
.
However I fail to build the spring application, I receive this error:
error: package org.XXXX.XXX.lib.config does not exist
import org.XXXX.XXX.lib.config.Config;
where org.XXXX.XXX.lib.config.Config
refers to a class in the library and org.XXXX.XXX.lib.config
is defined as a package in that library.
The funny thing: the parser succeeds, auto unclusion (Alt-Enter) succeeds in finding the class, creates the import
statement, no errors or warnings are shown in the editor. So the code inspection is happy. But then at build time above error is thrown.
To be able to use that library in the spring application I added the libraries source folders to the module implementing the spring application in IDEA's project settings. Also I added the created jar
file and the library itself as a module dependency (which probably is all wrong...).
This is my first non trivial, private java based project and I have to acknowledge that I am a but at a loss. I don't really know how to proceed, how to tackle down that issue.
Anyone got a hint for me?