0

I have a project, my-project, that has a submodule, wala. Wala in turn has several sub-projects. Like this:

my-project
| pom.xml
| wala
  | pom.xml
  | wala.foo
    | pom.xml
  | wala.bar
    | pom.xml
  | wala.baz
    | pom.xml

my-project only depends on wala.foo and wala.baz and does not depend on wala.bar. In fact, wala.bar has build problems currently that are beyond my control.

Is there a way that my-project/pom.xml can depend on wala.foo and wala.baz without depending on wala.bar?

Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
  • I looked at that link, but I still don't see how to do it, given that the modules I don't want to build are two levels down. I want to avoid editing wala/pom.xml if I can and only edit my-project/pom.xml. – Paul Reiners Feb 23 '16 at 18:50
  • Look at the second answer: it uses the `-pl !` notation that would work here. Something like `mvn -pl !wala.bar clean install` – Tunaki Feb 23 '16 at 18:51
  • So you have to do it on the command-line? It's not possible to do it solely within my-project/pom.xml? – Paul Reiners Feb 23 '16 at 18:59
  • I must be missing something, can't you just rearrange your directories so that wala.foo and wala.baz are the sub-modules of my-project, and change my-project's pom.xml to reflect that? – Jibby Feb 23 '16 at 19:19

0 Answers0