How to read a JAR from an SVN-Repository ? [message #755676] |
Wed, 09 November 2011 04:41  |
Eclipse User |
|
|
|
we have some components that are provided as jars (bundles) checked in to our svn-repository. when materializing i would like to have these bundles in the target platform.
i have defined the following searchpath in the rmap:
<rm:searchPath name="sl_translations">
<rm:provider componentTypes="buckminster,osgi.bundle" readerType="svn">
<rm:uri format="http://myrepo.xyz.ch/repo/sl/sl_translations/trunk/">
<bc:propertyRef key="buckminster.component"/>
</rm:uri>
</rm:provider>
</rm:searchPath>
but when materializing i get the following error:
Errors and Warnings
E [0001] : No suitable provider for component ch.rtc.sl.common.events:osgi.bundle was found in resourceMap file:/D:/Eclipse_Workspaces/SoftwareLoftTEST/ch.xyz.sl.rmap/sl.rmap
E [0001] : No suitable provider for component ch.rtc.sl.common.events:osgi.bundle was found in searchPath sl_translations
E [0001] : Rejecting provider svn(http://myrepo.xyz.ch/repo/sl/sl_translations/trunk/[http://myrepo.xyz.ch/repo/sl/sl_translations/trunk/]): No component match was found
seems like buckminster does not open the jar to look for the manifest in this case.
thanks
jakob
[Updated on: Wed, 09 November 2011 04:42] by Moderator
|
|
|
|
|
|
|
Re: How to read a JAR from an SVN-Repository ? [message #756218 is a reply to message #755936] |
Fri, 11 November 2011 09:27   |
Eclipse User |
|
|
|
Here's a rough description of how we do it.
To build the p2 site, I check out from my (subversion) repository (using Jenkins), and end up with:
(1) A project at ${workspace_loc}/thirdparty
A project containing the .jars I want to publish to my p2 site.
(2) A project at ${workspace_loc}/features/p2.site. This includes these files (plus some others):
feature.xml - a feature that consists of p2.feature
p2.site.cquery - a cquery which has advisor nodes for p2.site, p2.feature, all the plugin names. The last advisor node is ".*" and has "skip component" selected, this is so only the exact plugins I want get published to the p2 site, but not any of their dependencies.
(3) A project at ${workspace_loc}/features/p2.feature. This include these files:
feature.xml - lists all the plugins I want to publish
p2.target - a target definition that consists of the directory ${workspace_loc}/thirdparty
Now, with the appropriate bits of the repository checked out, I turn the subversion working copy into an Eclipse workspace by passing the following script to buckminster:
importtargetdefinition --active features/p2.feature/p2.target
import features/p2.site/p2.site.cquery
clean
perform -Dbuckminster.output.root=${buckminster_output_root} -Dbuckminster.temp.root=${buckminster_temp_root} -P features/p2.site/buckminster.properties p2.site#site.p2
That creates the files for the p2 site, which I then copy to my web server.
=====
Now, as a completely separate operation, a developer who needs those .jars will just materialize their product feature, which references the plugin names (not the jar names). The RMap will direct them to the p2 site, and the .jars get downloaded and materialized into the target platform.
Note the the developers never see the p2.site and p2.feature projects. They are just used by me (build engineer) to create the p2 site.
I hope that clarifies things, please let me know of you need more details.
Matthew
|
|
|
|
|
|
|
|
|
|
Re: How to read a JAR from an SVN-Repository ? [message #757400 is a reply to message #757210] |
Fri, 18 November 2011 04:36  |
Eclipse User |
|
|
|
hi,
it worked !
i did what matthew said:
1) checked in my jars (bundles not just plain jars) in the svn repository as a plain project
2) wrote a cspec for this project
3) wrote an rmap and a cquery to materialize this project
4) implemented a p2-feature project with a p2-cquery and a feature.xml referencing the bundles of step 1)
these are the steps to build a p2-site containing the jars:
1) materialize the cquery. buckminster will materialize the project containing the jars into your eclipse workspace
2) switch the target platform to point to the materialized project !
3) checkout the p2-feature and invoke buckminster action "site.p2"
jakob
|
|
|
Re: How to read a JAR from an SVN-Repository ? [message #758012 is a reply to message #756966] |
Tue, 15 November 2011 15:26  |
Eclipse User |
|
|
|
Jesper Eskilson skrev 2011-11-15 19:19:
> Matthew Webber skrev 2011-11-11 15:27:
>
>> I hope that clarifies things, please let me know of you need more
>> details.
>
> A question about the jars: are they plugin-jars or just any thirdparty
> jar? The jars I need to deal with are ready-built plugin-jars (with a
> META-INF and plugin.xml file in them, but no .project).
>
> --
> /Jesper
>
This turned out to be easier than I thought. I can just import the
plugin jars using "Import -> Plug-in Development -> Plug-ins and
fragments", and then commit them as regular source plugins.
Thanks anyway.
--
/Jesper
|
|
|
Powered by
FUDForum. Page generated in 0.06864 seconds