Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Map osgi.bundle requirement onto a dependency on the resolved version - #135

Merged
merks merged 1 commit into
eclipse-platform:masterfrom
merks:issue-128
Oct 21, 2022
Merged

Map osgi.bundle requirement onto a dependency on the resolved version#135
merks merged 1 commit into
eclipse-platform:masterfrom
merks:issue-128

Conversation

@merks

@merks merks commented Oct 21, 2022

Copy link
Copy Markdown
Contributor

Exclude EMF and ECF requirements because these don't provide snapshot versions and we want to be able to publish snapshot builds.

#128

Exclude EMF and ECF requirements because these don't provide snapshot
versions and we want to be able to publish snapshot builds.

eclipse-platform#128
@merks
merks requested a review from mickaelistria October 21, 2022 10:57
@merks

merks commented Oct 21, 2022

Copy link
Copy Markdown
Contributor Author

@mickaelistria I've excluded EMF and ECF for now...

@mickaelistria

Copy link
Copy Markdown
Contributor

That seems impressively easy and efficient! Should we try to merge it right now and see what happens in real life when generating the pom files on CI?

@merks

merks commented Oct 21, 2022

Copy link
Copy Markdown
Contributor Author

Yes, I'm happy that what was already built was flexible enough to handle this new desired outcome! I'll merge and kick off another build immediately.

@merks
merks merged commit aa891e6 into eclipse-platform:master Oct 21, 2022
@merks
merks deleted the issue-128 branch October 21, 2022 11:45
@merks

merks commented Oct 21, 2022

Copy link
Copy Markdown
Contributor Author

This bit of logic does not work for snapshots:

# copy ecj-src from build output (NB: we are mapping from SDK version (4.x) back to ECJ version (3.x)):
scp genie.releng@projects-storage.eclipse.org:${DROPS4}/${SDK_BUILD_DIR}/ecjsrc-${SDK_VERSION}.jar org/eclipse/jdt/ecj/${ECJ_VERSION}/ecj-${ECJ_VERSION}-sources.jar

Even if the above did work, the source of what it's copying is determined by this:

DROPS4=/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4
SDK_BUILD_DIR=R-4.25-202208311800
SDK_VERSION=4.25
FILE_ECLIPSE=${DROPS4}/${SDK_BUILD_DIR}/eclipse-SDK-${SDK_VERSION}-linux-gtk-x86_64.tar.gz
# JDT / ECJ:
ECJ_VERSION=3.32.0

This file's values needs to be adjusted even for a release build, which is error prone and easy to forget...

In any case, here's how a POM looks after this change:

https://repo.eclipse.org/content/repositories/eclipse-snapshots/org/eclipse/jdt/org.eclipse.jdt.core/3.32.0-SNAPSHOT/org.eclipse.jdt.core-3.32.0-20221021.115220-23.pom

So that looks good and the builds generally complete so also goodness....

@mickaelistria

Copy link
Copy Markdown
Contributor

Awesome, thanks!
@laeubi Is it OK even for snapshots? Ie if Maven asks for org.eclipse.platform:org.eclipse.core.resources:3.18.100 and only 3.8.100-SNAPSHOT can be found, is Maven able to use it without issue for resolution?

@merks Feel free to open other tickets about the issues you noticed by the way

@laeubi

laeubi commented Oct 21, 2022

Copy link
Copy Markdown

Is it OK even for snapshots? Ie if Maven asks for org.eclipse.platform:org.eclipse.core.resources:3.18.100 and only 3.8.100-SNAPSHOT can be found, is Maven able to use it without issue for resolution?

Never tried that, but actually maven will try to get 3.18.100 version if it is requested and probably complain.

@mickaelistria

Copy link
Copy Markdown
Contributor

OK, I'll try it later and report whether this works.
@merks if this works, then it means the Maven version cannot be inferred just from the p2 dependency resolution, but from the p2 dependency resolution + version mapping of target artifact.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants