简体   繁体   中英

Passing arguments to dependency eclipse plugins when using mvn-tycho

I am trying to write unit test cases for an eclipse plugin. Went through http://www.vogella.com/tutorials/EclipseTycho/article.html#run-the-build-with-the-tests and created a eclipse-test-plugin.

So, the test plugin (let's call is plugin-b) has a dependency on another plugin for which the test is written (plugin-a). When I run mvn clean install, I can see that tycho-surefire is trying to run the tests and in the process is trying to launch plugin-a. However, plugin-a requires a set of VM args to start correctly. Am trying to pass the arguments like below: mvn -Dabc.properties=bridge\\bundles\\com.blah.blah.blah.blah.bridge\\abc.properties clean install

but they aren't going through to plugin-a.

Any help is greatly appreciated.

Finally figured this out:

mvn clean install -Dtycho.testArgLine="-Dabc.properties=../../bundles/com.blah.blah.blah.blah.bridge/abc.properties"

That'll pass the system properties to the test runtime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM