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

Build with a nested target platform fails to "bootstrap" #665

Closed
habbit-baggins opened this issue Feb 19, 2022 · 6 comments
Closed

Build with a nested target platform fails to "bootstrap" #665

habbit-baggins opened this issue Feb 19, 2022 · 6 comments
Labels
bug 🚨 regression Regression compared to previous release - blocks upcoming release and other merges
Milestone

Comments

@habbit-baggins
Copy link

Trying to build the nested target platform example project in a "pristine" environment fails with an exception when trying to validate the classpath of the test.bundle project.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.7.0-SNAPSHOT:validate-classpath (default-validate-classpath) on project test.bundle: Execution default-validate-classpath of goal org.eclipse.tycho:tycho-compiler-plugin:2.7.0-SNAPSHOT:validate-classpath failed: bundleLocation not found: null -> [Help 1]

If the project has ever been built without the nested target platforms (e.g. by using base.target as the actual TP in the project), then the problem does not appear, even when using the nested TP.

Environment

I was originally testing this in the context of the 2.7 release (#651) but the same problem happens also in master and in the current release 2.6.0 (although earlier in the build).

Steps to reproduce

  1. Have the Tycho repo downloaded e.g. at path $X
  2. Launch the build in a pristine environment, in my case in a new container with a "clean" Maven 3.8 on JDK11:
    $ podman run --rm -it -v "$X/tycho-its/projects/target.references:/mnt" maven:3.8-jdk-11 mvn -f /mnt clean verify

The build fails with the mentioned exception, while it should succeed instead.

@habbit-baggins
Copy link
Author

I have attached a full log of the build (note that it is quite long because Maven was also downloading Tycho): out.log.

The issue is relevant because a "pristine" Maven environment is not that uncommon in CI environments, so this problem could cause builds to succeed in the developer's machine and then fail on CI.

@habbit-baggins habbit-baggins changed the title Builds with a nested target platform fails to "bootstrap" Build with a nested target platform fails to "bootstrap" Feb 19, 2022
@laeubi
Copy link
Member

laeubi commented Feb 20, 2022

I'm not sure, do you mean it fails with an empty maven local repository and succeeds on second build?

@laeubi
Copy link
Member

laeubi commented Feb 20, 2022

@habbit-baggins I could reproduce this with an empty mvn local repository now. The problem is that we don't add the artifact repository of the referenced target to the overall target content, I'm currently preparing a fix.

@laeubi laeubi added bug 🚨 regression Regression compared to previous release - blocks upcoming release and other merges labels Feb 20, 2022
@laeubi laeubi added this to the 2.7 milestone Feb 20, 2022
laeubi added a commit to laeubi/tycho that referenced this issue Feb 20, 2022
…downloaded

Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@laeubi laeubi closed this as completed in c8e6a3c Feb 20, 2022
laeubi added a commit that referenced this issue Feb 20, 2022
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@laeubi
Copy link
Member

laeubi commented Feb 20, 2022

Cherry picked to 2.7.0 as well.

@habbit-baggins
Copy link
Author

I confirm that it works in a pristine Maven environment both in Linux and in Windows, thanks a lot!

@laeubi
Copy link
Member

laeubi commented Feb 20, 2022

Thanks for verification. If you like this feature the consider say thank you or even sponsor further development of tycho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🚨 regression Regression compared to previous release - blocks upcoming release and other merges
Projects
None yet
Development

No branches or pull requests

2 participants