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

Unable to use composite build #3626

Closed
iNikem opened this issue Jul 19, 2021 · 6 comments
Closed

Unable to use composite build #3626

iNikem opened this issue Jul 19, 2021 · 6 comments
Labels
area:build Issues about build infra, both local and central bug Something isn't working contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome stale

Comments

@iNikem
Copy link
Contributor

iNikem commented Jul 19, 2021

Currently it is impossible to include this repo into a composite build from another project. The reason is that this project's modules declare e.g. the following name in its metadata: io.opentelemetry.javaagent:javaagent:1.4.0-SNAPSHOT. But during publishing we add opentelemetry- prefix to artifact name and so a dependant project will declare its dependency upon io.opentelemetry.javaagent:opentelemetry-javaagent.

Thus during composite build gradle tries to find opentelemetry-javaagent artifact from this project and fails.

@iNikem iNikem added the bug Something isn't working label Jul 19, 2021
@anuraaga
Copy link
Contributor

I feel as if tweaking the names how we do it isn't so weird. Should we file an issue in gradle repo?

Though either way the workaround for the old Gradle issue could still be a blocker...

https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts#L266

@iNikem
Copy link
Contributor Author

iNikem commented Jul 19, 2021

I mean, changing artifact name just for publishing does seem weird to me :D

@Oberon00
Copy link
Member

Oberon00 commented Sep 10, 2021

This is more of an issue of opentelemetry-java, right? Since it isn't friendly to gradle's composite build feature with its many limitations: https://docs.gradle.org/current/userguide/composite_builds.html#current_limitations_and_future_work and https://docs.gradle.org/current/userguide/composite_builds.html#included_build_substitution_limitations
Annoying indeed. Maybe just setting project.name and group in opentelemetry-java to match the publication (thus not setting it in the publication) would fix the issue.

@iNikem
Copy link
Contributor Author

iNikem commented Sep 10, 2021

@Oberon00 we have absolutely the same issue in this very repo, e.g. when trying to build gradle-plugins or extensions projects, which are independent from the main one.

@Oberon00
Copy link
Member

I'm playing around with building the examples in otel-java with the main project as included build: open-telemetry/opentelemetry-java#3603

@Oberon00
Copy link
Member

PR open-telemetry/opentelemetry-java#3653 was now merged and generates code snippets with the required gradle dependency substitutions for the included build.

@trask trask added the area:build Issues about build infra, both local and central label Jun 26, 2022
@trask trask added contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome stale labels Aug 26, 2023
@trask trask closed this as completed Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:build Issues about build infra, both local and central bug Something isn't working contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome stale
Projects
None yet
Development

No branches or pull requests

4 participants