tycho
tycho copied to clipboard
Reproducer for generate-sources issue
Command from root project directory: mvn clean generate-sources
(do not install
before)
Expected issue output:
[INFO] Reactor Summary for repro-parent 1.0.0-SNAPSHOT:
[INFO]
[INFO] repro-parent ....................................... SUCCESS [ 0.059 s]
[INFO] a .................................................. SUCCESS [ 3.354 s]
[INFO] b .................................................. FAILURE [ 0.005 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.727 s
[INFO] Finished at: 2022-09-22T11:20:47+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project b: Could not resolve dependencies for project com.lppedd.tycho.repro:b:eclipse-plugin:1.0.0-SNAPSHOT: Could not find artifact com.lppedd.tycho.repro:a:jar:1.0.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :b
This is a follow up for this comment.
Btw @laeubi this seems to be independent of any plugin. You can remove gmaven
and it will error out anyway.
@lppedd can you check the ECA problem? Please make sure to push your commit with the email you used to sign the ECA!
@laeubi I will, in the meantime I'm using a Maven extension to forcefully resolve dependencies. See https://stackoverflow.com/questions/73840829/maven-extension-to-forcibly-resolve-a-dependency-how-dangerous-is-it Maybe that's the only way?
So this is more a generic maven problem than a Tycho one?
@lppedd you probably want to push forward the following tickets at maven what most probably would allow to resolve this maven issue: https://issues.apache.org/jira/browse/MNG-7538 because that would allow to tell maven that there is something but the final name is (not yet) known.
Test Results
358 files 358 suites 2h 0m 16s :stopwatch: 328 tests 317 :heavy_check_mark: 9 :zzz: 0 :x: 2 :fire: 656 runs 634 :heavy_check_mark: 19 :zzz: 0 :x: 3 :fire:
For more details on these errors, see this check.
Results for commit e0363922.
:recycle: This comment has been updated with latest results.
@laeubi yes, I think this is a Maven core issue. Probably we can discard this PR, but if you find 5 free minutes just test the reproducer yourself, you'll notice this is a pretty important issue (at least that's my thought). The issue you linked seems related but I read
that is used while resolving an Artifact against a remote repository
In the reproducer the failure is not related to a remote artifact, but to a local one only.
In the reproducer the failure is not related to a remote artifact, but to a local one only.
Yeah its a bit unspecific, actually, as you have noted, when maven tries to resolves an artifact it do so by asking the WSR, if that can't give the file it asks the remote (that probably download the file then), but in both cases (either download or not (yet) generated local item) it would simply help to say: Hey I know here is something, and if you need it I can try to gather it then.
Probably we can discard this PR
If you like, we can @Ignore
the testcase and give in the documentation the links to maven issue that need to be addressed so we can enable it once the maven issues are fixed (I think WSR also needs a new method that returns a Supplier<File>
) we can check with Tycho again...
@lppedd just noted Tycho already contains some hacks in that area:
https://github.com/eclipse-tycho/tycho/blob/0f790c7c2498f6de0344d5ad1f7c0cc685c2ef2f/tycho-core/src/main/java/org/eclipse/tycho/core/maven/MavenDependencyInjector.java#L398
@laeubi
If you like, we can @Ignore the testcase
Will make this change ASAP, and check the legal stuff (it's strange, I remember submitting it through the Eclipse site).
just noted Tycho already contains some hacks in that area
How does that trick compare to the WSR one?
It creates a temp file to trick maven that it things the artifact is resolved...
This one can be closed as you pushed it alongside #2035