Maven project as "plugin" for another Maven project

63 views Asked by At

I have two Maven projects:

  • one of them is a simple (Quartz based) Scheduling framework
  • the other one is a more heavier project, full of dependencies and resource files. During build time, these are packaged outside of the jar file in separate directories (and the classpath of the project is configured to these dependencies)

I would like to the second one to be periodically called by the first one - but with keeping them separate as possible, and without messing up the resources and dependencies folder.

What is the best way to do this?

Thanks, krisy

2

There are 2 answers

0
Albert Sadowski On

I think that you need a parent Maven project in which you declare both projects you already have. Then in the pom files of child projects you can refer them each other.

1
khmarbaise On

You need a thing which is called a multi-module project with the following structrue:

  +-- root (pom.xml)
       +-- mod-quartz (pom.xml)
       +-- mod-much (pom.xml)

The mod-much might have a dependency on mod-quartz or vice versa.