How to reference mockito within tycho?

狂风中的少年 提交于 2019-11-29 07:07:41
Martin Ellis

If mockito isn't in your target platform (and you don't have it in a p2 repository), the easiest thing to do is probably to re-add the dependency back into your pom (without removing the mockito import from your manifest).

I think you'll also need to specify the following in the pom, in the configuration for the target-platform-configuration plugin:

  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <version>${tycho-version}</version>
    <configuration>
      <pomDependencies>consider</pomDependencies>
    </configuration>
  </plugin>

See the instructions on adding a dependency on a pom-first artifact. (I'm not sure whether you'll need to specify the resolver).

Regarding support for p2 repositories in Nexus, my understanding is that the p2 plugin for Nexus has since been open-sourced:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!