0

I have a maven multi module project where two modules of mine should be assembled through the maven plugin for deployment on top of a container.

Let's say my hierarchy is the following

  • module1
  • module2
  • testmodule

I have a test case inside the test module which should retrieve the module1 and module2 assembled jars and try to deploy them on top of a container. Is it possible to do it programmatically, i.e. to walk the maven project through its API and retrieve the filenames of the assembled jars from the project?

Peter Mularien
  • 2,578
  • 1
  • 25
  • 34
Edmondo
  • 19,559
  • 13
  • 62
  • 115

1 Answers1

0

It is possible because mvn simply calls a Maven startup class but a cleaner way would be to write a plugin that executes as part of the install lifecycle that does the test. That way your "test" of the assembly itself is just an element of the build setup.

Καrτhικ
  • 3,833
  • 2
  • 29
  • 42