[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Confirm that Tycho can't manage BOTH p2 and Maven artifacts?

On 01/19/2016 08:26 AM, Lars Vogel wrote:
See http://blog.vogella.com/2013/01/03/tycho-advanced/

Quote: nother information gap or misinformation that can be found in
current literature is that Tycho doesnât support dependency resolution
of POM dependencies. This is not true. It is true that Tycho uses the
MANIFEST-first approach to resolve the dependencies. And it is
suggested to rely on that because of several facts. One you will
notice on reading further. But in some cases it still might be useful
to use default Maven POM dependencies too. Think of a dependency to a
third-party-library that is not hosted in a p2 repository and can only
be found in Maven Central. If this third-party-library is an OSGi
bundle, and only in this case, Tycho is able to resolve such a
dependency. All you have to do is to specify the dependencies to the
OSGi bundle artifact in the <dependencies> section of the POM and set
the flag pomDemendencies=consider to the target-platform-configuration
plugin.

And I believe this essentially represents the "second half" of the solution described at http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts , which Max refers to. Based on what I read there, I believe I have to define an additional module that only references the third-party jars in maven dependencies (like "pomfirst-thirdparty" in the example), and then the original module that had the "lib" folder has to specify "import-package" elements for each of the packages from the original jars that are needed.

On Tue, Jan 19, 2016 at 8:01 AM, Max Rydahl Andersen <manderse@xxxxxxxxxx> wrote:
The answer is that it depends.

Tycho either can be driven by a plugin manifest or Pom.xml to resolve its p2 dependencies and here I believe it is true - it has to be either/or.

but what you can do in your specific case of having nested jars inside your plugin is to use mvn copy-dependencies which allow you to remove lib content from your source Repo and have it dynamically downloaded and put into the lib folder during build.

http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts has more
on it.

Jbosstools projects uses this for a few things where creating a full set of Osgi dependencies was not feasible.

Hope that helps.

/max
http://about.me/maxandersen


On 18 Jan 2016, at 14:27, David M. Karr <davidmichaelkarr@xxxxxxxxx> wrote:

I inherited a large Eclipse plugin codebase, but I'm pretty new to Eclipse plugin development.

I happened to notice that one of the subprojects had a few jars just dumped into a "lib" folder, and those jars are referenced from the .classpath, build.properties, and META-INF/MANIFEST.MF file.  This subproject also has several bundles that it depends on.

I wondered why these artifacts weren't just specified as Maven artifacts.  I asked about this odd convention on the IRC #eclipse channel, and someone said that Tycho can't handle BOTH p2 and Maven artifacts.  I took him at his word, but I need to get more information about this.  I'm working with someone else who believes this shouldn't be a problem, so I need to find some proof for this statement.
_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev
_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev