0

I've got a simple Java project with Maven.

By default dependencies loaded through Maven end up in a "Maven dependencies" library which is added to the class-path.

In eclipse it looks like this:
enter image description here

For whatever reason, I need those dependencies in the module-path, like so: enter image description here

My Problem is that every time i run maven update, it resets the "Maven Dependencies" library to class-path.

How can the project or pom file be configured to keep the libary in module-path?

Ivan Tomić
  • 171
  • 6
  • Do you have a `module-info.java` file? – khmarbaise Sep 28 '19 at 06:40
  • Of course, that's the whole point – Ivan Tomić Sep 28 '19 at 11:57
  • Does your build work on plain command line? Which Eclipse do you use ? – khmarbaise Sep 28 '19 at 14:09
  • yes it does... well, when the dependencies are in module-path. Eclipse version 4.12.0 – Ivan Tomić Sep 28 '19 at 15:31
  • So maybe I misunderstand this but it sounds as it is an Eclipse issue? Why do you need them in module path in Eclipse? What is the real problem here? – khmarbaise Sep 28 '19 at 18:45
  • I'm not sure if it's an eclipse issue, or not... the problem is that i have no idea how to configure pom to ensure the autogenerated "Maven dependencies" library is kept in Module path – Ivan Tomić Sep 30 '19 at 11:22
  • So in the ned you don't know what kind of issue you have except that it is not shown in Module path in Eclipse? – khmarbaise Sep 30 '19 at 12:27
  • alright, let's try this one more time... the basic issue is that mvn update moves my dependecies from module path to class path... all i'm looking for is a way to configure pom to keep dependencies in modulepath. not sure why i need to have any more issues for it to become a valid problem. however, to give a bit more clarity to the issue, i'm trying to write a modular (as in java modules with module-info.java and all that) api structured into modular subdependencies, and for whatever reason not relevant to the issue at hand, the dependencies need to be in module path. – Ivan Tomić Sep 30 '19 at 12:44

0 Answers0