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

JGit packaging build fails with Tycho 2.7.0 #723

Closed
msohn opened this issue Mar 7, 2022 · 14 comments · Fixed by #727
Closed

JGit packaging build fails with Tycho 2.7.0 #723

msohn opened this issue Mar 7, 2022 · 14 comments · Fixed by #727
Labels
🚨 regression Regression compared to previous release - blocks upcoming release and other merges
Milestone

Comments

@msohn
Copy link
Contributor

msohn commented Mar 7, 2022

I tried updating the jgit packaging build to Tycho 2.7.0 [1] and this failed with the following error [2]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:target-platform-configuration:2.7.0:target-platform (default-target-platform) on project org.eclipse.jgit.repository: Execution default-target-platform of goal org.eclipse.tycho:target-platform-configuration:2.7.0:target-platform failed: Not an artifact file: null

The same build succeeds using Tycho 2.5.0 and 2.6.0.
Any idea what might be wrong?
Build instructions for jgit are documented here [3].
Maven debug log is in [mvn.log]

[1] https://git.eclipse.org/r/c/jgit/jgit/+/191530
[2] https://ci.eclipse.org/jgit/job/stable/job/jgit.gerrit-pipeline.java11/1051/console
[3] https://wiki.eclipse.org/EGit/Contributor_Guide#Maven_Buil
mvn.log

@laeubi laeubi added the 🚨 regression Regression compared to previous release - blocks upcoming release and other merges label Mar 7, 2022
@laeubi
Copy link
Member

laeubi commented Mar 7, 2022

@msohn thanks for the report I'll try to take a look at this.

@Bananeweizen
Copy link
Contributor

egit/jgit still use the old-school attach-artifact mechanism to dynamically add a target file to the build. I suspect that something around resolving that variable has been broken in 2.7. However, attach-artifact is not necessary anymore. The target of a Tycho build can be specified directly as a file (without referring to a maven artifact) since some versions. My IDE is still trying to get up to date for egit sources, but I might be able to submit a PR later.

@laeubi
Copy link
Member

laeubi commented Mar 7, 2022

@Bananeweizen the exception is due to org.eclipse.jgit:org.eclipse.jgit:jar:6.2.0-SNAPSHOT:compile is not resolved to a file. I think we should improve the error message here.

I have not yet investigated why that's the case but org/eclipse/jgit/org.eclipse.jgit/6.2.0-SNAPSHOT/org.eclipse.jgit-6.2.0-SNAPSHOT.jar is present so I don't really get why this is not resolved by maven...

laeubi added a commit to laeubi/tycho that referenced this issue Mar 7, 2022
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
laeubi added a commit to laeubi/tycho that referenced this issue Mar 7, 2022
@laeubi laeubi linked a pull request Mar 7, 2022 that will close this issue
@msohn
Copy link
Contributor Author

msohn commented Mar 7, 2022

I moved this change to master and rebased it onto Michael's change
https://git.eclipse.org/r/c/jgit/jgit/+/191544
directly referring to the target platform file, though this is still failing with the error

[ERROR] Failed to execute goal org.eclipse.tycho:target-platform-configuration:2.7.0:target-platform (default-target-platform) on project org.eclipse.jgit.repository: Execution default-target-platform of goal org.eclipse.tycho:target-platform-configuration:2.7.0:target-platform failed: Not an artifact file: null

@laeubi
Copy link
Member

laeubi commented Mar 7, 2022

@msohn I don't think this is related to the target, neverless you should integrate @Bananeweizen patch as it is more "modern" style of using targets with tycho.

Beside this, #727 should fix the issue (even though I don't know why it is required at all).

@msohn
Copy link
Contributor Author

msohn commented Mar 7, 2022

I merged Michael's patches using modern style of using target platforms

Looking forward to your fix.

laeubi added a commit that referenced this issue Mar 8, 2022
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@laeubi
Copy link
Member

laeubi commented Mar 8, 2022

Can you try out the current tycho snapshot build if it fixes your issue?

@msohn
Copy link
Contributor Author

msohn commented Mar 8, 2022

I can confirm that the jgit build succeeds with the current tycho 3.0.0-SNAPSHOT

@msohn
Copy link
Contributor Author

msohn commented Mar 9, 2022

is there an ETA for a release containing this fix ?

@mickaelistria
Copy link
Contributor

Doing a release is a major disturbance and slows down a lot of other development. The other question would be: can you deal with 3.0.0-SNAPSHOT until it's released as 3.0.0 ?

@msohn
Copy link
Contributor Author

msohn commented Mar 9, 2022

I can stick to 2.5.0 or update to 2.6.0 until 3.0 is ready

@laeubi
Copy link
Member

laeubi commented Mar 9, 2022

@msohn in generall it really helps if projects using tycho help with testing of upcoming versions, so If you can either always use the snapshot or at least have a weekly build that uses a snapshot that would be great to discover such issues before the release.

@laeubi
Copy link
Member

laeubi commented Mar 27, 2022

@msohn I wonder if you probably use <exclusion> in your build somewhere? As i think that it might be that if a transitive dependency is excluded we end up with this null problem ...

@msohn
Copy link
Contributor Author

msohn commented Mar 27, 2022

@laeubi laeubi added this to the 2.7.1 milestone Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 regression Regression compared to previous release - blocks upcoming release and other merges
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants