Discussion:
[tycho-user] Target vs repository
Daniel Burrell
2018-03-01 12:28:07 UTC
Permalink
Something I’m not clear on, for an eclipse rcp, documentation recommends
you should define a target file which can contain references to p2 repos
where dependencies can be found. This sounds like the equivalent of a maven
bill of materials, or a way to define cohesive dependencies for a given
platform target. Fine.

Yet the pom file normally has a repository reference in it.

So why would do both?

For example by category of artefacts:
There’s my project’s code which I own
There’s the eclipse platform code (rcp etc) which is required to develop an
rcp app.
Then there’s third party stuff like avro and jackson.
How should third party bundle artefacts be referenced and where should they
be located and why?
- should it be in the thirdparty <repository> referenced directly from the
pom file?
- should it be made available by adding a reference to the p2 repository
containing the artefact to the target platform?

Same questions for the “eclipse” artefacts.

Is there some sort of lookup precedence when trying to discover
dependencies?

I just seems like a choice between 6 of one vs half a dozen of the other..

Kind regards

Dan
Mickael Istria
2018-03-01 12:35:47 UTC
Permalink
Hi,
Post by Daniel Burrell
So why would do both?
In my opinion, you should avoid doing both a stick to .target as much as
possible.
Post by Daniel Burrell
How should third party bundle artefacts be referenced and where should
they be located and why?
- should it be made available by adding a reference to the p2 repository
containing the artefact to the target platform?
Eclipse Orbit or JBoss Tools for examples do have a dedicated build to
"osgi-ify" and "p2-ify" 3rd party libs which aren't already usable by p2.
With this approach, the advantage is that everything becomes regular p2
artifacts that you can put in the .target file; and the drawback is that
you have to build a separate "3rd-party" repository containing all such
libs prior to build your own code.

HTH
--
Mickael Istria
Eclipse IDE <https://www.eclipse.org/downloads/eclipse-packages/>
developer, at Red Hat Developers <https://developers.redhat.com/> community
Elected Committer Representative at the Eclipse Foundation
<https://www.eclipse.org/org/> board of directors
Daniel Burrell
2018-03-01 12:52:10 UTC
Permalink
Ok thanks so to summarise one compatible set might be
- use target entirely by referencing a...
- ...p2 repo I maintain.
- remove the “repositories” entry in the pom file as tycho will figure
things out from the target file.
- publish and maintain any 3rd party stuff to the internal p2 repo (using
eclipse epr or bnd tools or similar).

Thanks for clarifying.

Dan
Post by Mickael Istria
Hi,
Post by Daniel Burrell
So why would do both?
In my opinion, you should avoid doing both a stick to .target as much as
possible.
Post by Daniel Burrell
How should third party bundle artefacts be referenced and where should
they be located and why?
- should it be made available by adding a reference to the p2 repository
containing the artefact to the target platform?
Eclipse Orbit or JBoss Tools for examples do have a dedicated build to
"osgi-ify" and "p2-ify" 3rd party libs which aren't already usable by p2.
With this approach, the advantage is that everything becomes regular p2
artifacts that you can put in the .target file; and the drawback is that
you have to build a separate "3rd-party" repository containing all such
libs prior to build your own code.
HTH
--
Mickael Istria
Eclipse IDE <https://www.eclipse.org/downloads/eclipse-packages/>
developer, at Red Hat Developers <https://developers.redhat.com/> community
Elected Committer Representative at the Eclipse Foundation
<https://www.eclipse.org/org/> board of directors
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Simon Scholz
2018-03-04 15:44:26 UTC
Permalink
For me the best tool to provide 3rd party dependencies as p2
reposiotories is https://github.com/stempler/bnd-platform.

For example I use it to provide the Retrofit rest client library for
OSGi apps in the build.gradle file here:
https://github.com/vogellacompany/openreq/tree/master/eclipse/dependencies

Best regards,

Simon
Post by Daniel Burrell
Ok thanks so to summarise one compatible set might be
- use target entirely by referencing a...
- ...p2 repo I maintain.
- remove the “repositories” entry in the pom file as tycho will figure
things out from the target file.
- publish and maintain any 3rd party stuff to the internal p2 repo (using
eclipse epr or bnd tools or similar).
Thanks for clarifying.
Dan
Post by Mickael Istria
Hi,
Post by Daniel Burrell
So why would do both?
In my opinion, you should avoid doing both a stick to .target as much as
possible.
Post by Daniel Burrell
How should third party bundle artefacts be referenced and where should
they be located and why?
- should it be made available by adding a reference to the p2 repository
containing the artefact to the target platform?
Eclipse Orbit or JBoss Tools for examples do have a dedicated build to
"osgi-ify" and "p2-ify" 3rd party libs which aren't already usable by p2.
With this approach, the advantage is that everything becomes regular p2
artifacts that you can put in the .target file; and the drawback is that you
have to build a separate "3rd-party" repository containing all such libs
prior to build your own code.
HTH
--
Mickael Istria
Eclipse IDE developer, at Red Hat Developers community
Elected Committer Representative at the Eclipse Foundation board of
directors
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
--
Trainer, Consultant and Developer

vogella GmbH
Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Tel (040) 78804360, Fax (032) 221739404, Email:
***@vogella.com, Web: http://www.vogella.com
Loading...