Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Release OSGi bundles/projects with Tycho

For reproducible builds you need reproducible sources and build
configuration, whether project pom.xml says "2.0.0" or "2.0.0-SNAPSHOT"
or some other version is of little/no significance.

I think the whole release/snapshot separation is a design mistake in
Maven. It forces project configuration change and rebuild at very end of
release cycle, when you actually want to reduce/eliminate any change.

For m2e releases, for example, I just create release tag from my last
build. I can always rebuild from that tag and because neither
configuration nor the source can possibly change the rebuild will
produce the same result as the original.

--
Regards,
Igor

On 2014-03-07, 9:00, Rohrberg, Timo wrote:
Hello Igor,

yes, that's indeed true... But does it help to always keep
non-SNAPSHOT versions for my bundles and features then? Build
reproducibility of my release build is not ensured then, right? A
subsequent build of the release 2.0.0 would take the most recent
2.0.0-SNAPSHOT which might have been changed due to invalid actions
of my developers. Of course, if switching all bundles and features
from 2.0.0-SNAPSHOT to 2.1.0-SNAPSHOT definitely works and no more
build of the 2.0.0-SNAPSHOT ever happens after the first build of the
2.0.0 release has been completed, everything is fine... But isn't
that a quite fragile structure? Is there really no better way to deal
with that problem?

Regards Timo >

-----Ursprüngliche Nachricht-----
Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 7. März 2014 14:51
An: tycho-user@xxxxxxxxxxx
Betreff: Re: [tycho-user] Release OSGi bundles/projects with Tycho

Your release version (2.0.0) is older than your snapshot versions
(2.0.0.20140307-1234) according to OSGi version comparison rules.

--
Regards,
Igor

On 2014-03-07, 8:38, Rohrberg, Timo wrote:
Hello Andreas,

thank you very much for your answer. Unfortunately, I'm not completely
sure if I understood the reasoning for NOT switching to non-SNAPSHOT
versions for bundles and features...

Let's assume, I have a project consisting of one parent POM project
(packaging type "pom"), a number of bundles (packaging type
"eclipse-plugin"), a number of features (packaging type
"eclipse-feature"), and a number of product projects (packaging type
"eclipse-repository"). When creating a release, I first create a
branch. In that branch, I switch ALL versions from let's say
2.0.0-SNAPSHOT (and 2.0.0.qualifier respectively) to 2.0.0. Then I tag
that branch and build my release from it. On the TRUNK, I switch ALL
versions to 2.1.0-SNAPSHOT as 2.1.0 will be the new version in the
future. What exactly is now the problem with the ordering difference
between OSGi-land and Maven-land?

Thanks for your clarification ;-).

Regards Timo >

-----Ursprüngliche Nachricht-----
Von: tycho-user-bounces@xxxxxxxxxxx
[mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Andreas Sewe
Gesendet: Dienstag, 4. März 2014 15:58
An: tycho-user@xxxxxxxxxxx
Betreff: Re: [tycho-user] Release OSGi bundles/projects with Tycho

Hi Timo,

for pure Maven projects, the maven-release-plugin allows for creating
releases of those projects including creation of SVN tags and version
bumping. Is there any similar approach within Tycho for OSGi
bundles/projects? I found some hints on [1] and [2], but those are
already some years old and do not seem to be very active recently...

I am not aware of anything besides the tycho-versions-plugin [1]. The tricky part is that you don't want to switch to non-SNAPSHOT versions for bundles and features (as 2.0.5 comes before 2.0.5.qualifer in OSGi-land but after 2.0.5-SNAPSHOT in Maven-land). On the other hand, parent POMs or eclipse-repository artifacts do deserve a non-SNAPSHOT version.

If you group them by using directories like plugins, tests, and features, this is quite easy to do on the shell. Here's what I do when releasing Eclipse Code Recommenders, for example [2,3]:

export RELEASE=2.0.5
export NEXT=2.0.6
mvn clean org.eclipse.tycho:tycho-versions-plugin:set-version
-Dproperties=recommenders-version -DnewVersion=${RELEASE} # Revert
bundles and features to .qualifer mvn
org.eclipse.tycho:tycho-versions-plugin:set-version -Dartifacts=$(basename plugins/*/ tests/*/ features/*/ | paste -sd "," - ) -DnewVersion=${RELEASE}-SNAPSHOT git commit -a -m "[releng] ${RELEASE}"
git checkout HEAD^ -- '*'
mvn clean org.eclipse.tycho:tycho-versions-plugin:set-version
-Dproperties=recommenders-version -DnewVersion=${NEXT}-SNAPSHOT git commit -a -m "[releng] ${NEXT}-SNAPSHOT"

Hope that helps.

Andreas

[1]
<http://www.eclipse.org/tycho/sitedocs/tycho-release/tycho-versions-pl
ugin/plugin-info.html>
[2]
<https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/c
ommit/?id=b34ee9f5cc96c2da21b24f6c6dfa62e8a518fa1e>
[3]
<https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/c
ommit/?id=edf112287fd49f6a700b4a980693945c1f387465>

--
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

Hinweis: Diese Email enthält evtl. vertrauliche und rechtlich
geschützte Informationen. Sollten Sie nicht der richtige Adressat sein
oder diese Email irrtümlich erhalten haben, informieren Sie bitte
sofort den Absender, und löschen Sie anschließend diese E-Mail. Das
unerlaubte Kopieren sowie die unbefugte Weitergabe des Inhalts dieser Email sind nicht gestattet.

Attention: This e-mail may contain confidential and/or privileged
information. If you are not the intended recipient or if you have
received this e-mail in error, please notify the sender immediately
and delete this e-mail. Any unauthorized copying, disclosure or
distribution of the contents of this e-mail is strictly prohibited.
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

Hinweis: Diese Email enthält evtl. vertrauliche und rechtlich geschützte
Informationen. Sollten Sie nicht der richtige Adressat sein oder diese
Email irrtümlich erhalten haben, informieren Sie bitte sofort den Absender,
und löschen Sie anschließend diese E-Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe des Inhalts dieser Email sind nicht gestattet.

Attention: This e-mail may contain confidential and/or privileged
information. If you are not the intended recipient or if you have received
this e-mail in error, please notify the sender immediately and delete this
e-mail. Any unauthorized copying, disclosure or distribution of the
contents of this e-mail is strictly prohibited.
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top