Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Including plain old jar dependencies in Tycho project

Hi

I have an Eclipse Plugin project that requires a JAR file as dependency.
I read up a lot of documentation today, but cannot figure out how to
achieve this task. It seems to me that it is not possible to just
include the repository hosting the JAR and then adding a dependency to
the JAR. I think from the conversations on this list and some of the
examples, that it is necessary to build an OSGI bundle from the JAR. I
also found the maven bundle plugin and tried to use it to build a bundle
form my JAR. It seems this was successful. At least the Maven build was
successful. But I do not know where to find the bundle now. In
.m2/repository is also only the old JAR.

So I tried to add the dependendency to the newly build bundle. This
looks the same as the dependency to the JAR in the first place. I also
added:
<plugin>
 <groupId>org.sonatype.tycho</groupId>
 <artifactId>target-platform-configuration</artifactId>
 <version>${tycho-version}</version>
 <configuration>
  <resolver>p2</resolver>
  <pomDependencies>consider</pomDependencies>
 </configuration>
</plugin>
to the POM of the Eclipse Plugin project. I guess if I don't do this the
dependency is just ignored.

If I run the Maven build (mvn package) on the Eclipse Plugin Project
everything works fine except it seems the dependency to the bundled JAR
is completely ignored and so I get a bunch of comiplation errors.

Please can someone tell me if I am on the correct way? The best would be
some good code examples achieving this task or did I miss some
documentation?

Regards
    Klemens


Back to the top