Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » p2 materializer content.xml
p2 materializer content.xml [message #1220134] Tue, 10 December 2013 00:32 Go to next message
Philip Bedingfield is currently offline Philip Bedingfield
Messages: 43
Registered: August 2011
Member
Is there a way to get the p2 materializer to produce the content.xml file? I want to publish the resolved target platform to a p2 site.
Re: p2 materializer content.xml [message #1220183 is a reply to message #1220134] Tue, 10 December 2013 09:30 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3229
Registered: July 2009
Senior Member
On 2013-12-10 01:32, Philip Bedingfield wrote:
> Is there a way to get the p2 materializer to produce the content.xml file? I want to publish the resolved target
> platform to a p2 site.

No, that's not possible. The materializer produces a repository where all artifacts have been unpacked. It's not
suitable as a p2 site.

My recommendation would be to instead use the b3 aggregator to create the site that you want to publish. Then use
Buckminster to create the target platform from that site.

HTH,
- thomas
Re: p2 materializer content.xml [message #1220301 is a reply to message #1220183] Tue, 10 December 2013 23:37 Go to previous messageGo to next message
Philip Bedingfield is currently offline Philip Bedingfield
Messages: 43
Registered: August 2011
Member
Thanks Thomas, I found this tutorial as well ->

http://nirmalsasidharan.wordpress.com/2010/10/09/provisioning-your-target-platform-as-local-p2-site/
Re: p2 materializer content.xml [message #1220345 is a reply to message #1220301] Wed, 11 December 2013 08:41 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3229
Registered: July 2009
Senior Member
On 2013-12-11 00:37, Philip Bedingfield wrote:
> Thanks Thomas, I found this tutorial as well ->
>
> http://nirmalsasidharan.wordpress.com/2010/10/09/provisioning-your-target-platform-as-local-p2-site/

There's a (in some cases serious) drawback that the tutorial fails to mention.

The target platform consists of artifacts expanded into their directory form (true for all features and also for some
common plug-ins like the org.eclipse.platform, the launchers, and the gtk fragments). Creating an update site based on
directory based content implies repacking them into jars. The resulting jars will be different from their original which
means that they can not retain their original signing. You must either resign them yourself or use unsigned jars.

- thomas
Re: p2 materializer content.xml [message #1222595 is a reply to message #1220183] Fri, 20 December 2013 21:28 Go to previous messageGo to next message
Philip Bedingfield is currently offline Philip Bedingfield
Messages: 43
Registered: August 2011
Member
I used b3 to create a mirror target platform but when I try and resolved from it I get the following error ->

An internal error occurred during: "p2 materializer".
Illegal character in opaque part at index 7: file:C:\Users\Zach/mirror/rcp/final

Any ideas?
Re: p2 materializer content.xml [message #1222730 is a reply to message #1222595] Sat, 21 December 2013 07:12 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3229
Registered: July 2009
Senior Member
On 2013-12-20 22:28, Philip Bedingfield wrote:
> I used b3 to create a mirror target platform but when I try and resolved from it I get the following error ->
>
> An internal error occurred during: "p2 materializer".
> Illegal character in opaque part at index 7: file:C:\Users\Zach/mirror/rcp/final
>
> Any ideas?

That URL is illegal. A URL cannot have backslashes in it. Not even on windows. Where does it stem from?

- thomas
Re: p2 materializer content.xml [message #1223302 is a reply to message #1222730] Mon, 23 December 2013 02:37 Go to previous messageGo to next message
Philip Bedingfield is currently offline Philip Bedingfield
Messages: 43
Registered: August 2011
Member
Its part of Lorenzo's tutorial, the b3 aggregation uses a property defined as ->

eclipse.target.platform=file:${user.home}/mirror/rcp/final

which is reference in his rmap

<rm:searchPath name="eclipse">
<rm:provider componentTypes="eclipse.feature,osgi.bundle"
readerType="p2" source="false" mutable="false">
<rm:property key="buckminster.source" value="false" />
<rm:property key="buckminster.mutable" value="false" />
<rm:uri format="{0}">
<bc:propertyRef key="eclipse.target.platform" />
</rm:uri>
</rm:provider>
</rm:searchPath>

[Updated on: Mon, 23 December 2013 04:05]

Report message to a moderator

Re: p2 materializer content.xml [message #1225708 is a reply to message #1223302] Mon, 30 December 2013 15:06 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1370
Registered: July 2009
Senior Member
On 23/12/2013 03:37, Philip Bedingfield wrote:
> Its part of Lorenzo's tutorial, the b3 aggregation uses a property
> defined as ->
>
> eclipse.target.platform=file:${user.home}/mirror/rcp/final
>
>

ops then it might be my fault ;)

To be honest I use Linux most of the time, but when I use Windows I have
similar problems too, because Windows replaces ${user.home} with its
backslashes and p2 does not like them.

I use the following tricks when on Windows (I think the first / after :
is required anyway)

eclipse.target.platform=file:/C:/Users/${user.name}/mirror/rcp/final

(note user.name instead of user.home) at least this allows your
properties file to be used by different users (though it cannot be
reused in Unix systems).

Alternatively, you may want to try to pass that property from an ant
script. In particular if you define a property in ant with "location"
(instead of "value"), ant will use slashes instead of backslashes.

Does this help?
cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: p2 materializer content.xml [message #1231186 is a reply to message #1225708] Tue, 14 January 2014 02:32 Go to previous messageGo to next message
Philip Bedingfield is currently offline Philip Bedingfield
Messages: 43
Registered: August 2011
Member
Thanks Lorenzo, and thanks again for the great tutorial.

I have another issue which I'll mention here (Save me opening another thread). My builds work fine when using the eclipse site, however they fail when using my mirror (created using b3). I think it's the java1.7 packing/unpacking issue. ->

https://bugs.eclipse.org/bugs/show_bug.cgi?id=361628

Is there a work around? The job I'm building depends on java 1.7
Re: p2 materializer content.xml [message #1231188 is a reply to message #1231186] Tue, 14 January 2014 02:38 Go to previous messageGo to next message
Philip Bedingfield is currently offline Philip Bedingfield
Messages: 43
Registered: August 2011
Member
Here is the error ->

ERROR [0002] : An error occurred while collecting items to be installed
ERROR [0002] : session context was:(profile=D:\Jenkins\jobs\SSDI Continuous\workspace\target.platform, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
ERROR [0002] : Problems downloading artifact: osgi.bundle,org.eclipse.ant.core,3.2.401.v20121204-162022.
ERROR [0002] : File has invalid content:C:\Users\tmbadmin\AppData\Local\Temp\signatureFile1058611373455808892.jar
ERROR [0002] : Invalid content:lib/antsupportlib.jar
ERROR [0002] : Problems downloading artifact: osgi.bundle,org.eclipse.core.resources,3.8.1.v20121114-124432.
ERROR [0002] : File has invalid content:C:\Users\tmbadmin\AppData\Local\Temp\signatureFile8308315021821319356.jar
ERROR [0002] : Invalid content:ant_tasks/resources-ant.jar
ERROR [0002] : Problems downloading artifact: osgi.bundle,org.eclipse.equinox.p2.publisher.eclipse,1.1.0.v20120913-155635.
ERROR [0002] : File has invalid content:C:\Users\tmbadmin\AppData\Local\Temp\signatureFile2587780145237898809.jar
Re: p2 materializer content.xml [message #1231206 is a reply to message #1231188] Tue, 14 January 2014 04:03 Go to previous messageGo to next message
Philip Bedingfield is currently offline Philip Bedingfield
Messages: 43
Registered: August 2011
Member
Workaround: I changed the b3 packing strategy to "UNPACK"
Re: p2 materializer content.xml [message #1231453 is a reply to message #1231206] Tue, 14 January 2014 18:06 Go to previous message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1370
Registered: July 2009
Senior Member
On 14/01/2014 05:03, Philip Bedingfield wrote:
> Workaround: I changed the b3 packing strategy to "UNPACK"

Wow!
I was about to answer you that I used to have exactly the same problem
and I switched to Java 6 since then... but if your workaround fixes
this, then it's really great news! Thanks for sharing! :)

Though, if I remember correctly, you may run in this bug of Java 7 even
if you use remote update sites if they published their bundles with
nested jars...

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Previous Topic:BundleStatusException in Buckminster's CorePlugin
Next Topic:inconsistent xtext version ranges for binary dependencies during materialization
Goto Forum:
  


Current Time: Sat Oct 25 16:04:15 GMT 2014

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

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