Open LorenzoBettini opened 1 year ago
@cdietrich I adapted the Wizard generator (not yet the domainmodel example) and I see the failure for Maven projects, e.g., https://github.com/LorenzoBettini/xtext-reference-projects/actions/runs/4143942852/jobs/7166402228
I don't understand the root of the problem, but it looks like xtend-maven-plugin
complains with
[INFO] --- xtend-maven-plugin:2.30.0-SNAPSHOT:compile (default) @ org.xtext.example.mydsl ---
[ERROR] resolution of uriFragment '|1' failed.
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.xtext.common.types.access.TypeResource$CannotLoadTypeResourceException: java.lang.IllegalStateException: Cannot read bytes for java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
@szarnekow do you have a clue of what might go wrong here?
Cannot read bytes for java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
I'd assume some jar on the CP is corrupt
mh... I can reproduce it locally and in the download log (which, by the way, is suppressed on the GitHub Actions configuration, but it should never be for easier debugging):
Downloaded from xtext-lib-p: https://ci.eclipse.org/xtext/job/xtext-lib/job/lb_2052_maven_tycho/lastSuccessfulBuild/artifact/build/maven-repository/org/eclipse/xtend/org.eclipse.xtend.lib.macro/2.30.0-SNAPSHOT/maven-metadata.xml (1.4 kB at 4.7 kB/s)
Downloading from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/eclipse/xtend/org.eclipse.xtend.core/2.30.0-SNAPSHOT/org.eclipse.xtend.core-2.30.0-20230210.025029-91.jar
So, it takes more recent stuff from sonatype snapshots and things get mixed up with the older snapshots from JIRO.
I thought that not enabling sonatype snapshots was enough, but it looks like sonatype snapshots must be explicitly disabled.
I'll check that...
mh... interesting: it looks like our project wizards explicitly disable sonatype snapshots ONLY for Tycho projects, not for pure Maven projects. This looks wrong to me. In fact, I hit the above problems (while the Tycho projects build fine). @cdietrich do you know why we generate the POM instructions for disabling sonatype snapshots only for Tycho projects?
Yes, the problem was that sonatype snapshots were used and I guess things got mixed up.
@cdietrich If I understand correctly what you were proposing for locally and temporarily adapting the wizard I did this:
https://github.com/LorenzoBettini/xtext-core/commit/45066e23cdecc6914ef8aa6e17c8c5536a58cca4
but that was not enough: I had to do this as well (disabling explicitly sonatype snapshots):
https://github.com/LorenzoBettini/xtext-core/commit/07f4fa7d51c1b753299c3cb8d0dd6fa3dadfed1e
The regenerated projects can be found here: https://github.com/LorenzoBettini/xtext-reference-projects/tree/lb_2052_maven_tycho
I have to stop now, and I'd leave domainmodel to you, OK?
@LorenzoBettini yes of course i meant also disabling sonatype. sorry to be too imprecise (though this was obvious)
i also dont the the tycho non tycho thing.
you mean this one:
this is cause this only breaks in tycho please note the http instead of https there
pushed changes incl domainmodel to https://github.com/itemis/xtext-reference-projects/compare/lb_2052_maven_tycho
And everything is green, isn't it?
See https://github.com/eclipse/xtext/issues/2135#issuecomment-1424270444
Branch: https://github.com/LorenzoBettini/xtext-reference-projects/tree/lb_2052_maven_tycho