Question

If we have a multiple module project,

Parent Project
  Model Module
  Services Module
  Web Module

And the parent project pom.xml, lists the 3 modules in <modules>...

And then Services pom.xml has a dependency on Model, and Web Module pom.xml has a dependency on Services...what does this mean?

Does it mean I can't reference in my Web Module, any of the Model classes?

i.e. does the dependency chain in Maven impact this type of scoping?

So I cant in appContext.xml in my web module control any of the injection of beans outside of Services/Web Module?

Many thanks (sorry for noob question)

i

Was it helpful?

Solution

Your question is not very clear but what I could gather is that you want to ask whether in your web module you can access your model class. Definitely you can because of transitive nature of your dependencies. Since Service module depends on Model and Web model depends on Service, you can definitely access Model classes in Web module. You can understand this better if you run the mvn dependency:tree command on your Web module. The Model would show up in the dependency tree or if you are using Eclipse Maven plugin you can view the Effective dependecy in a tree structure which is visually better to understand.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top