0

I have a local jar being imported into my project through Maven. When I update the jar in my other project, then do maven package, it is not getting updated in the main project.

I have tried everything, cleaning it, forcing dependencies, relaunching IntelliJ, deleting m2 repository, everything. Nothing is working for me.

Any help would be appreciated.

Heres the code from the main project's pom.

    <dependency>
                    <groupId>com.example</groupId>
                    <artifactId>manager</artifactId>
                    <version>2.0.0-SNAPSHOT</version>
                    <type>jar</type>
            </dependency>

EDIT: SOLUTION!

I accidentally had another import of the same project in my dependencies, this time not from maven. Removed that and everything was fixed.

Thanks for everybody's help!

user2977659
  • 79
  • 1
  • 2
  • 9

1 Answers1

3

Your changes needs to be installed into local repository with mvn install to be visible in other project. But you can import second project as module into Intellij. After this two projects can work without install (internal syncing).

Documentation: Creating and importing Maven projects

MariuszS
  • 30,646
  • 12
  • 114
  • 155