Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Fwd: p2-installable-unit in update site builds?

Thanks guys!  For the record, Pascal hit the nail right on the head.  The only change I needed was a one line switch to the p2.inf of the feature which references the IU.

That is:

requires.0.range=0.0.0

to

requires.0.range=[0.9.0.$qualifier$,0.9.0.$qualifier$]

Cheers,
Jed Anderson
Development Manager, Secure Delivery Center


---------- Forwarded message ---------
From: Juan Antonio Gonzalez Cano <jgonzalez@xxxxxxxxxxxxxxx>
Date: Fri, Jun 12, 2015 at 1:36 AM
Subject: Re: [tycho-user] p2-installable-unit in update site builds?
To: <jed@xxxxxxxxxxxx>



if you want to configure de artifact name, you must be add in the parent pom the plugin:

<!-- Modified configuration tycho packaging -->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<format>${maven.build.version}</format>
</configuration>
</plugin>
where ${maven.build.version} in my case is yyyyMMdd'-N'

and in the pom.xml of p2 site you must add the next code:

<build>
<plugins>
<plugin>
       <groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<finalName>my-site_p2-${unqualifiedVersion}.${buildQualifier}</finalName>
</configuration>
</plugin>
</plugins>
</build>

the result is:


I hope i can help you, I don't speak english very well

Cheers,
JAGC


2015-06-11 15:11 GMT+01:00 Jed Anderson <jed@xxxxxxxxxxxx>:
Hi,

I've found this new demo which outlines using the new p2-installable-unit packaging type in tycho.  Cool, this is an improvement over the p2.inf!

http://wiki.eclipse.org/Tycho/Demo_Projects/RCP_Application

I have been trying to use p2-installable-unit it in my build that creates an update site.  Is this packaging intended to work outside of RCP product builds?

When I try it, I don't see the metadata nor the binary artifact created in my update site. 

I have mimicked the poms & p2iu.xml files in the example.  The p2artifacts.xml, p2content.xml, and artifact zip for my IU do get created in my local target directory.  Is there a trick to getting these to get picked up by my eclipse-repository pom?

Some things I have noticed that might be part of the issue:
1. The generated artifact zip's version ends in -SNAPSHOT, e.g. 1.0.0-SNAPSHOT.  I would have expected SNAPSHOT to get replaced with the build qualifier.
2. The filename of the zip is <id>-<version>.zip whereas the standard p2 binary format is <id>_<version>.  Maybe this gets mapped to the right binary name during update site creation?  If not, is there a property to configure the artifact name?

Any pointers would be greatly appreciated!

Cheers,
jkca

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user

Back to the top