Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Numbers for Milestones/releases must contain qualifier #112

Closed
cdietrich opened this issue Oct 14, 2019 · 6 comments
Closed

Version Numbers for Milestones/releases must contain qualifier #112

cdietrich opened this issue Oct 14, 2019 · 6 comments
Assignees
Labels

Comments

@cdietrich
Copy link
Member

i wonder if there is really no change to have proper version numbers for milestones / releases
(qualifier vs M1)

@dhuebner
Copy link
Contributor

dhuebner commented Nov 8, 2019

Eclipse DSL Tools

Version: 2019-12 M2 (4.14.0)
Build id: 20191107-0857

Bildschirmfoto 2019-11-08 um 15 55 50

@kthoms kthoms changed the title Version Numbers for Milestones/releases look wired Version Numbers for Milestones/releases must contain qualifier Nov 11, 2019
@kthoms kthoms self-assigned this Nov 11, 2019
@kthoms kthoms added the releng label Nov 11, 2019
@kthoms kthoms added this to the Release 2.11.1 milestone Nov 11, 2019
@kthoms
Copy link

kthoms commented Nov 11, 2019

For release artifacts deployed to Maven Central it is better to have artifacts without timestamp qualifier, and with a release qualifier (.M1 for milestones, and none for the GA relase).

For the p2 repository it is better to have timestamp qualifiers. This is especially important when using Tycho, which would rate the ".M1" qualifier higher as a release version without a qualifier.

We have to adjust the build that we still deploy artifacts with the release qualifier, but for the repository build and the artifact metadata we want to stay with the default qualifier mechanism.

One possible way would be to do two builds for releases: First set the version to the release version and run with deploy goal, then reset the changes and build normally with SNAPSHOT/.qualifier and use the resulting repository for p2 repo publishing.

@cdietrich
Copy link
Member Author

have thought we already had this solved with

		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>BUILD_TYPE</name>
					<value>!N</value>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.eclipse.tycho</groupId>
							<artifactId>tycho-packaging-plugin</artifactId>
							<configuration>
								<strictVersions>false</strictVersions>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>

@kthoms
Copy link

kthoms commented Nov 11, 2019

Though also so. But the build fails when versions do not match

mvn -f maven/org.eclipse.emf.mwe2.parent/pom.xml -Dsign.skip=true -DtestFailureIgnore=false -Dmaven.javadoc.failOnError=false  -Dtycho.localArtifacts=ignore -DBUILD_TYPE=S -Prelease  clean javadoc:aggregate-jar verify


[INFO] --- tycho-p2-plugin:1.5.1:p2-metadata (p2-metadata) @ org.eclipse.emf.mwe2.runtime ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] org.eclipse.emf.mwe2.parent 2.11.1.M1 .............. SUCCESS [  0.070 s]
[INFO] org.eclipse.emf.mwe2.target 2.11.1.M1 .............. SUCCESS [  0.003 s]
[INFO] org.eclipse.emf.mwe2.plugins-parent 2.11.1.M1 ...... SUCCESS [  0.242 s]
[INFO] org.eclipse.emf.mwe.activities 1.5.1-SNAPSHOT ...... SUCCESS [  0.481 s]
[INFO] org.eclipse.emf.mwe2.runtime 2.11.1.M1 ............. FAILURE [  0.181 s]
[INFO] org.eclipse.emf.mwe.core 1.5.1.M1 .................. SUCCESS [  0.042 s]
[INFO] org.eclipse.emf.mwe.ui 1.5.1-SNAPSHOT .............. SUCCESS [  0.031 s]
[INFO] org.eclipse.emf.mwe.ui.simpleEditor 1.5.1-SNAPSHOT . SUCCESS [  0.013 s]
[INFO] org.eclipse.emf.mwe.utils 1.5.1.M1 ................. SUCCESS [  0.013 s]
[INFO] org.eclipse.emf.mwe2.lib 2.11.1.M1 ................. SUCCESS [  0.012 s]
[INFO] org.eclipse.emf.mwe2.language 2.11.1.M1 ............ SUCCESS [  0.040 s]
[INFO] org.eclipse.emf.mwe2.language.ide 2.11.1-SNAPSHOT .. SUCCESS [  0.017 s]
[INFO] org.eclipse.emf.mwe2.language.ui 2.11.1-SNAPSHOT ... SUCCESS [  0.021 s]
[INFO] org.eclipse.emf.mwe2.launch 2.11.1.M1 .............. SUCCESS [  0.014 s]
[INFO] org.eclipse.emf.mwe2.launch.ui 2.11.1-SNAPSHOT ..... SUCCESS [  0.012 s]
[INFO] org.eclipse.emf.mwe.doc 1.5.1-SNAPSHOT ............. SUCCESS [  0.006 s]
[INFO] org.eclipse.emf.mwe2.features-parent 2.11.1.M1 ..... SUCCESS [  0.004 s]
[INFO] org.eclipse.emf.mwe.core.feature 1.5.1.M1 .......... SUCCESS [  0.021 s]
[INFO] org.eclipse.emf.mwe.doc.feature 1.5.1-SNAPSHOT ..... SUCCESS [  0.010 s]
[INFO] org.eclipse.emf.mwe.ui.feature 1.5.1.M1 ............ SUCCESS [  0.021 s]
[INFO] org.eclipse.emf.mwe.sdk 1.5.1.M1 ................... SUCCESS [  0.008 s]
[INFO] org.eclipse.emf.mwe2.runtime.sdk 2.11.1.M1 ......... SUCCESS [  0.007 s]
[INFO] org.eclipse.emf.mwe2.launcher 2.11.1-SNAPSHOT ...... SUCCESS [  0.007 s]
[INFO] org.eclipse.emf.mwe2.language.sdk 2.11.1.M1 ........ SUCCESS [  0.013 s]
[INFO] tests-parent 2.11.1.M1 ............................. SUCCESS [  0.006 s]
[INFO] org.eclipse.emf.mwe.tests 1.5.1.M1 ................. SUCCESS [  0.025 s]
[INFO] org.eclipse.emf.mwe2.language.tests 2.11.1-SNAPSHOT  SUCCESS [  0.020 s]
[INFO] org.eclipse.emf.mwe2.repository 2.11.1.M1 .......... SUCCESS [  0.020 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:12 min
[INFO] Finished at: 2019-11-11T13:14:33+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:1.5.1:p2-metadata (p2-metadata) on project org.eclipse.emf.mwe2.runtime: Execution p2-metadata of goal org.eclipse.tycho:tycho-p2-plugin:1.5.1:p2-metadata failed.: IllegalArgumentException -> [Help 1]

@kthoms
Copy link

kthoms commented Nov 11, 2019

The problem does not exist for release builds, where the POM version does not contain a qualifier. This raises only up for milestone builds, which leave .qualifier in manifests, but add a qualifier to the POM version.

Together with @cdietrich we came to the conclusion that for milestone builds the version in manifests have to be replaced by a qualifier as part of the versioning script that replaces the POM versions.

kthoms pushed a commit that referenced this issue Nov 11, 2019
When the pom.xml files are changed to use a milestone qualifier as part
of their version, the MANIFEST.MF and feature.xml files have also be
adjusted to contain a qualified version. It is not desired to have the
milestone qualifier (e.g. 2.11.1.M1) in the p2 artifacts, but have a
build time qualifier here. In contrast, the artifacts deployed to OSSRH
should have the milestone qualifier, so this must be the POM version.

Change-Id: If3ea2b140752492f6b68467b443c51cee2bb3f23
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
kthoms pushed a commit that referenced this issue Nov 11, 2019
When the pom.xml files are changed to use a milestone qualifier as part
of their version, the MANIFEST.MF and feature.xml files have also be
adjusted to contain a qualified version. It is not desired to have the
milestone qualifier (e.g. 2.11.1.M1) in the p2 artifacts, but have a
build time qualifier here. In contrast, the artifacts deployed to OSSRH
should have the milestone qualifier, so this must be the POM version.

Change-Id: If3ea2b140752492f6b68467b443c51cee2bb3f23
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
@cdietrich
Copy link
Member Author

@kthoms anything left?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants