views:

190

answers:

4

I'm trying to get Tycho working with m2eclipse. Problem is that all I find are outdated sites and old versions to download. I've found my way to http://github.com/sonatype/sonatype-tycho and downloaded the source. Problem is that the guide at https://docs.sonatype.org/display/TYCHO/BuildingTycho isn't of much help. When trying to build I run into an error message saying I'm using invalid syntax..... And there seems to be nowhere to ask for further guidance.

So are there anyone out there who actually got this working? Or got a better alternative for continuous integration / automatic build solution for eclipse plug-ins?

A: 

Tycho is a maven plugin, so you don't need to download it, just declare it in your pom.xml files.

See http://github.com/sonatype/sonatype-tycho/tree/master/tycho-its/projects/tycho001/ for details of a simple project.

Robert Munteanu
A: 

Robert, if I want to generate my pom from an Eclipse-project like this:

mvn -X org.codehaus.tycho:maven-tycho-plugin:generate-poms -DgroupId=my.org -Dtycho.targetPlatform=/Applications/eclipse/3.5.2

(from this instruction http://www.sonatype.com/people/2008/11/building-eclipse-plugins-with-maven-tycho/)

then I can't really declare the dependency from my pom, right? I thought I needed to manually download/build a distro of Maven3/Tycho to get it running…?

hedefalk
A: 

Robert, it does work for me as long as you don't try to build an Eclipse application. I have integrated it into CruiseControl and I am quite happy with building and testing plugins.

The main trick for me was to ignore all the P2/target stuff. I couldn't get it to work at all. Instead I call maven with an parameter that points to the Eclipse installation like this:

mvn -Dtycho.targetPlatform=C:\Programmer\eclipse

These are the necessary Plugin definitions:


plugins
  plugin
    groupId>org.sonatype.tycho/groupId
    artifactId>tycho-maven-plugin/artifactId
    version>${tycho-version}/version
    extensions>true/extensions
  /plugin
  plugin
    groupId>org.sonatype.tycho/groupId
    artifactId>maven-osgi-compiler-plugin/artifactId
    version>${tycho-version}/version
    configuration>
      source>1.6/source
      target>1.6/target
    /configuration
  /plugin>
/plugins>

Current Tycho Version is 0.8.0.

I would like to build Eclipse Applications but need support myself for that. I hope that helps.

Cheers, Klaus

Wizard of Kneup
A: 

This hint from Igor Fedorenko helped me to get it running: https://issues.sonatype.org/browse/MNGECLIPSE-2140?focusedCommentId=115527&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_115527

If you are not pressed for time, I'd suggest to wait for the upcoming Update of m2eclipse, though. It was recently announced to follow shortly after Maven 3 release.

Jörg