-
Notifications
You must be signed in to change notification settings - Fork 73
Milestone does not build on Jenkins #1931
Comments
here is a run with debug log https://ci.eclipse.org/xtext/job/xtext-eclipse/job/milestone_2.29.0.M3/13/console |
12:55:36 [DEBUG] ----------------------------------------------------------------------- @laeubi why is tycho 2.7.5 doing this. how can i avoid it? |
switching back to tycho 2.6.0 seems to help. |
todo: is this a consumer pom problem? |
skipping pom generation does NOT seem to help |
It seems a bit strange that a |
2.29.0.M3 not mentioned in the branch at all. |
switching to tycho 3.0.0 does not help |
will try to create a smaller reproducer |
Well the problem is that you produced bad P2 metadata and now Tycho thinks your artifacts is available at a maven repository. So the main question would be, why is there a claimed M3 release if it is not really released? |
how do i know this is bad metadata. it is also produced by p2/tycho |
the maven version numer is M3, the tycho one with qualified. |
and of course it is a chicken and egg problem. so tycho expect this maven thing to be in the repo list? |
The artifact was consumed from a repository named "local-gradle-result" and Tycho is recording this (maybe because you are using something like pom-dependencies=consider or maven targets?). So who ever produces p2-repository seem to be doing something that let Tycho think you have released that artifact to a maven repository... |
so if this metadata is there tycho evaluates it even if the p2 stuff is there anyway? and there is no possibility to skip this behaviour |
The metadata is the P2 data, so Tycho is using it.
Not with current Tycho versions. Maybe we can think about dropping this feature completely because for me it seems superseded by the consumer pom approach trying to resolve dependencies after the fact, but this might be controversial because the license tool today uses that information to get the "real" artifact... I also had some success in "trick" maven with custom workspace readers so probably one can have a workaround here but a small eaxample would be required to check what we can do here. As an intermediate solution one might investigate why this data is injected at all, or install the artifact in the local repo |
so i basicallly have to also add the xtext-lib repo as maven repo. willl try that |
also is there a possibility to skip the field in the p2 metadata in the first place? |
If it is deployed there, this would be the easiest solution I think.
Not yet, this part of Tycho is quite "dumb" and really basic as it just adds all meta-data it could fetch for an artifact. |
this does help in the reproducer. will try in the real one too |
also seems to help there |
created eclipse-tycho/tycho#1662 for skip option |
Probably it's unrelated, but while working on eclipse/xtext#2397 I noted that the JARs we publish in p2 repositories do not have any POM.xml in the And I wondered if also this problem might be related to this. |
i dont know this feature at all @LorenzoBettini i also wonder/dont understand why the same problem is not seen with the snapshots |
I've always thought that's a terrible mistake to build Eclipse stuff with gradle...
if it puts 2.29.0-SNAPSHOT (didn't check) then I'd say everything works because it takes the latest snapshot version. |
the counter question is: |
i also have no clue there the meta-inf/maven stuff would come from if you package pure maven artifacts with tycho. |
No matter how longer than eclipse.ui Gradle will live, I seem to understand that Gradle is not aiming at giving more support to Eclipse stuff. I doubt Gradle will ever beat Maven (unless for the hype of course). In any case, we're still building bundles (not pure Maven artifacts) and publish them as Maven artifacts. With Tycho it works and it creates that directory automatically. I don't know if Tycho takes that POM inside MANIFEST into consideration, that's why I was asking @laeubi about that. |
yes but how to have nice maven dependencies there, i have never seen a nice solution for that. and this is the main reason why we still use gradle |
@laeubi are you referring to the new tycho-packaging-plugin feature that can be opted out with |
How well does that work with repo split |
@cdietrich are you asking me? What in particular? On a side note, again, IMVHO, like it or not, repo split will destroy us someday (in the very near future)... we should get rid of it ASAP ;) |
Gradle replaces the dependencies with project references in eclipse even if they are in two reactors . What would maven do |
there's no such concept of the reactor in Eclipse: it works like any other Eclipse workspace. You have all projects in the workspace available. As I said above: "M2e resolves from the workspace if the dependencies are present. Close the dependency project and M2e resolves from the cache or from Maven repositories. If that's what you were asking." |
So core stuff would be found from extras |
Yes. Everything open in the workspace will be found by everything asking for it, just like it happens in an Eclipse workspace. |
I think there are some mixing of concerns here. The more you mix stuff, the more likely you will see obstacles.
There is one example that already uses such "maven first" approach for most of their artifacts and Tycho is only used for the Eclipse parts: https://github.com/faktorips/ and they even sponsored development in that areas to get better support in tycho/m2e for their use-cases. All of this of course requires that you are using the most recent Tycho, or even tycho snapshot builds as that's an area where we constantly improve and enhance, and only using these features can reveal problems or quirks. Also it might require to restructure how one builds things today and choose what items are "plain" and what are "eclipse". |
@laeubi, thanks for the clarifications. I confirm that in my DSLs (thus, I'm not speaking for Xtext now) I don't mix things, and I prefer to manually specify Maven dependencies in the POM (as I said, I then also test my DSL in a pure Maven environment). I never had problems (of course, the new default behavior of the packaging plugin broke everything, but I know how to skip that, and everything went back to normal). |
regarding
i still dont understand why the p2 artifact from the repo is not consumed. https://ci.eclipse.org/xtext/job/xtext-lib/job/milestone_2.29.0.M3/lastSuccessfulBuild/artifact/build/p2-repository/plugins/org.eclipse.xtext.xbase.lib_2.29.0.v20221114-1034.jar |
@cdietrich @laeubi By looking again at the issue described here, I think it's related to the problems that drove me nuts in the second part of eclipse/xtext#2397 (where I had fixed the problem upstream but I was still experiencing problems when testing) I report here my investigations and doubts because I think they're related to this very issue. I'll try to summarize the problem:
Fetching org.eclipse.xtext.xtext.generator_2.29.0.v20221024-0510.jar from https://download.eclipse.org/modeling/tmf/xtext/updates/milestones/S202210240854/plugins/ because I didn't change the p2 repo in the target platform (and that's OK, of course). Later in the build, before running exec-mave-plugin, someone (Maven + Tycho?) was Downloading from central: https://repo.maven.apache.org/maven2/org/eclipse/xtext/org.eclipse.xtext.xtext.generator/2.29.0.M2/org.eclipse.xtext.xtext.generator-2.29.0.M2.jar (the version before my patch) IN SPITE I removed 2.29.0.M2 from my POMs, because I switched to 2.29.0-SNAPSHOT. How could that be possible? |
As said before, the artifact IS consumed (by Tycho), but the meta-data says "this is actually a maven artifact from a maven-repository" (namely |
@laeubi so it is not possible to publish maven artifacts as p2 repo without also publishing the maven repo too |
@LorenzoBettini I think the length of your description already indicates this, but I think you have just too many different items in your setup to find a good (and consistent explanation) what you are seeing:
So I can only tell that in general it should work if everything is setup properly, but obviously such setup is not part of many builds and defiantly not part of the integration test suite.
It is possible, platform does it and others do it as well. But if you consume from a private/temporary repository and then publish to P2 and then want to consume again in maven without access to this private/temp repo, you simply break the thing, as you would break it in a traditional maven setup. |
Signed-off-by: Christian Dietrich <[email protected]>
Signed-off-by: Christian Dietrich <[email protected]>
….7.5 Signed-off-by: Christian Dietrich <[email protected]>
see also eclipse/xtext#2122 |
as we no longer build with gradle this is no longer an issue |
12:46:30 [ERROR] Failed to execute goal on project org.eclipse.xtext.ui: Could not resolve dependencies for project org.eclipse.xtext:org.eclipse.xtext.ui:eclipse-plugin:2.29.0-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.29.0.M3, org.eclipse.xtext:org.eclipse.xtext.xbase.lib:jar:2.29.0.M3, org.eclipse.xtend:org.eclipse.xtend.lib.macro:jar:2.29.0.M3, org.eclipse.xtext:org.eclipse.xtext:jar:2.29.0.M3, org.eclipse.xtext:org.eclipse.xtext.util:jar:2.29.0.M3, org.eclipse.xtext:org.eclipse.xtext.ide:jar:2.29.0.M3: Could not find artifact org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.29.0.M3 in eclipse.maven.central.mirror (https://repo.eclipse.org/content/repositories/maven_central/) -> [Help 1]
@laeubi do you have a hint how to find out why these dependencies are tried to be resolved from maven central at all if they are p2 dependencies?
The text was updated successfully, but these errors were encountered: