Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Is it possible to add mockito as a maven dependency to a test plugin?

Tycho can read your target platform so that you don't have to to redefine your dependencies in your POM files (this is called the "MANIFEST-first" mode, as opposed to the "POM-first" mode).

To do so, you have to:

  1. Create a project dedicated to the target plaform
  2. Create the target plaform in it (its name should be the name of the project + ".target")
  3. Create a POM file with the "eclipse-target-definition" packaging
  4. Enable "pomless" build (see

The approach is described by Lars Vogel in its blog:

Le 19/08/2019 à 15:06, Johan Compagner a écrit :
  1. Configure your Tycho build and ask it to rely on the target platform [2], so that JUnit, Mockito and Hamcrest are known at compile-time.
  2. Run mvn verify


when i first read that point about "ask to rely on target platform" i thought wait does tycho really supports this..
But no that is just redefining in the pom file pretty much what i already have in my target

( always have to make sure those are in sync)

It would be nice if that was 1 thing that in the pom file i could do:


So that i don't have exactly the same list 2 twice... (and need to think to update both when changing one)

Ofcourse there is a big difference between those 2, in a target platform you really have to specify which you get (installable units)
and tycho you just say use this dir and figure out what to get...
(i like the tycho way, i would love that the target files also was just a bunch of p2 repo sites and that eclipse just resolves what you need)


tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top