Monday, March 26, 2012

Building Eclipse plugins and RCP applications with Tycho

An entry-level session but I was able to pick up some tidbits. I also now believe we're using it correctly.

Some highlights:
  • Tycho is a p2 artifact/metadata consumer and producer.
  • Maven build frontend with a p2 repository backend.
  • 0.14.1 latest.
  • We created an e4 application, modified the wizard-provided AboutHandler, converted to Maven project with package type "eclipse-plugin", added test fragment with package type "eclipse-test-plugin" and AboutHandlerTest.
  • Tycho runs all tests in OSGi runtime, same as "Run JUnit Plugin Test".
  • Test class names must have suffix "Test"! Otherwise ignored.
  • maven-release plugin not well supported - too many assumptions would have to be made about SCM and its structure so there are no plans to implement it. There's a tycho BOF on Wednesday night where I hope to hear how others are, if at all, releasing.
  • component.xml set with version 0.0.0 doesn't need updating! We currently use an ant script to keep it updated unnecessarily I believe.
  • We created a .product file and simply added it to our tychodemo.repository project, next to its category.xml.
  • Add start level for plugins on product's configuration tab. This is necessary when running through maven though it's automatic when running product through PDE (launch product).
    • add org.eclipse.e4.rcp and org.eclipse.rcp features.
    • product editor "add required" and "validate" button useful
  • Repository build then builds site and includes unevaluated .product file. Need to use tycho-p2-director-plugin with <goal>materialize-products</goal>
  • Features' build.properties - add "root=somethingToAddToRootOfApplication" to add, e.g. JRE or other resources at root of built product.

1 comment:

  1. component.xml set with version 0.0.0 doesn't need updating!

    Cool, I will try this today and remove this ant task! Thanks Craig.

    ReplyDelete