I installed a jar with the library I needed in maven local with the following command:

mvn install:install-file -Dfile=/home/IdeaProjects/webstruct/build/libs/webstruct-0.0.2.jar -DgroupId=ru.xpendence -DartifactId=webstruct -Dversion=0.0.2 -Dpackaging=jar -DgeneratePom=true 

Everything seems to be OK, the library appeared in the .m2. Next, I added a dependency to build.gradle :

 compile group: 'ru.xpendence', name: 'webstruct',version: '0.0.2' 

But when I try to apply classes from the library, for example, to inherit from abstract classes, the desired class appears in the import:

enter image description here

But when I import it, the import does not appear, the class tries to be imported as follows, and, as we see, IDEA cannot recognize the package:

enter image description here

At the same time, the library is in dependencies:

enter image description here

Tell me, what's the problem? Jarnik collected through the build.

  • And what does the gradl say if you try to compile the project through it, rather than using the idea? - aleshka-batman
  • says error: package ru.xpendence.webstruct.entity does not exist - Vyacheslav Chernyshov
  • It is likely that the problem with the assembled grill. Try to unpack the collected heat and see what's inside. - aleshka-batman
  • Inside it is all the same as expected. - Vyacheslav Chernyshov
  • By the way, such a question. When assembling, gradle shoves into the spring library. How to make so that dependencies of the library are not added to the jar, and pulled up when adding the library? - Vyacheslav Chernyshov

0