Error:(3, 36) java: package io.sjm.sjmlib.datastructures does not exist

Answered

So I have a Java library I've written called sjmlib. It uses Gradle as the build system and a JAR is installed in the local Maven repository.

I cannot for the life of me get this IDEA project with a dependency on sjmlib to build. Whenever I try to build the project I get errors like:

Error:(3, 36) java: package io.sjm.sjmlib.datastructures does not exist


The strange thing is I get no errors in the IDE itself.

I have sjmlib added as a library in the project structure. IDEA couldn't find the Maven package so I had to resort to just adding the directory. This then got automatically added as a dependency in the Modules section.

Am I doing something wrong? For some reason I find the whole Project Structure system incredibly confusing and counter-intuitive.

2 comments
Comment actions Permalink

It would help if you could attach a library project and the main project that will reproduce the problem.

0
Comment actions Permalink

I decided to just use Gradle to manage any project with dependencies, no matter how simple. The IDEA project management stuff is just too confusing and unreliable.

0

Please sign in to leave a comment.