Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Most convenient way to include third party dependencies
Most convenient way to include third party dependencies [message #1798762] Fri, 23 November 2018 16:54 Go to next message
Karsten Wilken is currently offline Karsten WilkenFriend
Messages: 59
Registered: August 2016
Member
The goal is to include simple commonly used artifacts like hibernate or slf4j within the xtext project.

At the moment all topics I found seem to fall back to this "solution":
https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts

It seems weird that you need to create a second pom-first build reactor just to include commonly needed dependencies into the tycho build.

Is this still the solution to use or is there a newer approach to include such dependencies?

Maybe I just didn't find the correct update site url for the target platform configuration?

(PS: At the moment our projects use 2.13)

[Updated on: Fri, 23 November 2018 16:54]

Report message to a moderator

Re: Most convenient way to include third party dependencies [message #1798763 is a reply to message #1798762] Fri, 23 November 2018 16:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
if you use tycho you can add stuff to your target platform as long as it is available via p2 repo.
luckily there is eclipse orbit. and maybe it contains what you need
https://download.eclipse.org/tools/orbit/downloads/drops/R20180905201904/


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Most convenient way to include third party dependencies [message #1798766 is a reply to message #1798762] Fri, 23 November 2018 17:44 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Also when using Tycho it is possible to add Maven dependencies to the target platform computation when configuring pomDependencies = consider. The artifacts must contain a valid OSGi MANIFEST.MF, which is not true for many artifacts.

https://wiki.eclipse.org/Tycho/Target_Platform#.22POM_dependencies_consider.22
Re: Most convenient way to include third party dependencies [message #1798824 is a reply to message #1798763] Mon, 26 November 2018 10:39 Go to previous messageGo to next message
Karsten Wilken is currently offline Karsten WilkenFriend
Messages: 59
Registered: August 2016
Member
Christian Dietrich wrote on Fri, 23 November 2018 16:56
if you use tycho you can add stuff to your target platform as long as it is available via p2 repo.
luckily there is eclipse orbit. and maybe it contains what you need
https://download.eclipse.org/tools/orbit/downloads/drops/R20180905201904/


Thank you for the hint. By a quick look the only thing missing that I spotted was hibernate. (but since that will occure mostly in annotations maybe it could work without it)

Karsten Thoms wrote on Fri, 23 November 2018 17:44
Also when using Tycho it is possible to add Maven dependencies to the target platform computation when configuring pomDependencies = consider. The artifacts must contain a valid OSGi MANIFEST.MF, which is not true for many artifacts.

https://wiki.eclipse.org/Tycho/Target_Platform#.22POM_dependencies_consider.22


This is one of the parts where I struggled with my first attempts. Regardig to:
https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts
Quote:
"Tycho target-platform-configuration/pomDependencies=consider is restricted to packaging=jar"

This conflicts with the xtext packaging of eclipse-plugin etc.

If this restriction to "packaging=jar"is still correct, than I don't really have a choice within the xtext project structure and need to create a second reactor for the dependencies, right?

Beside the fact that if there is a dependency for which there is no p2 or correct osgi meta data, again, I am in need of the second reactor to handle the dependencies. Considering I want to build a structure that lasts a bit longer and is easy to understand and maintain for my colleague (that are most likely not that familiar with tycho and the dependency "evil pits") there should be a structure that handles "new" dependencies.

With the xtest structure at the moment not having a permanent solution for the dependency "war" is just delaying the problem and "hoping for the best".

This also sounds like a good idea for a new optional part/feature of the xtext project structure, doesn't it? ;)
I believe that I'm one of many that struggled with that concept and the conflicts from the dependency war. It seems to be a common usecase and a common struggle. :(
Re: Most convenient way to include third party dependencies [message #1799003 is a reply to message #1798824] Wed, 28 November 2018 14:50 Go to previous message
Karsten Wilken is currently offline Karsten WilkenFriend
Messages: 59
Registered: August 2016
Member
Can anybody help with a hibernate osgi bundles or repository? (goal is: hibernate-core not the hibernate-osgi module ;) )

The search was frustrating and annoying so far.

Spring hosted OSGI bundles for hibernate within their repository... As far as the short stack-overflow topics mention: they are not continued anymore.

Hibernate seems to be a bigger commonly used framework. So maybe you already have a solution? (other than the second reactor)

PS: All other needed dependencies were included within the link from Christian! Thanks again!

[Updated on: Wed, 28 November 2018 14:51]

Report message to a moderator

Previous Topic:Switch case problem with JvmTypeReference
Next Topic:Xtext version working with Java 11
Goto Forum:
  


Current Time: Thu Apr 25 04:29:18 GMT 2024

Powered by FUDForum. Page generated in 0.04495 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top