I'm just starting out with Tycho, and I'm stumped at an early stage. Maybe I'm misunderstanding something, so just in case, here's what I'm expecting: I define my bundle's needs in OSGi style (i.e. in MANIFEST.MF
via Import-Package
), and Tycho somehow uses that info on the fly instead of me needing to redefine it all in Maven style (i.e. I don't have to put dependencies in pom.xml).
So, I made a simple Maven project, in Eclipse with the m2eclipse plugin, m2eclipse-tycho add on, and PDE plugin, and put the following Tycho stuff in the pom:
<properties>
<tycho-version>0.15.0</tycho-version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
Struggled through some wacky configuration errors, and finally got an essentially empty project (i.e. no source code) that gave no errors or warnings in Eclipse. Then I copied my source code from another project in, and (as expected) got a bunch of compiler errors due to missing dependencies. The first one was AbstractChannel from org.jboss.netty.channel. I use version 3.5.1.Final of Netty, so I edited my MANIFEST.MF to include:
Import-Package: org.jboss.netty.channel;version="[3.5.1,4)"
I was then expecting Tycho to somehow magically figure out that I need Netty, and therefore act as if I had inserted something like the following into my Maven pom.xml:
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<version>3.5.1.Final</version>
</dependency>
Instead, all that happened was I got one extra error in Eclipse, saying:
Unsatisfied constraint: 'Import-Package: org.jboss.netty.channel;version="[3.5.1,4.0.0)"
I don't know where to go from here. Do I have some fundamental misunderstanding of what Tycho is supposed to do? Or is there something else that I have to set up in order for it to be able to do the "magical" translation from a Import-Package
entry in MANIFEST.MF
to a <dependency>
pom.xml entry? Or something else?
Thanks in advance.