combination build error #6551
-
According to the steps in the document, I tried to build the opentelemetry-java project together with the opentelemetry-java-instrumentation. The build was successful, but the built javaagent reported an error when starting. The specific steps I performed are as follows:
Did I do something wrong in the process of combination building or am I missing some steps? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I asked Gemini using the startup error message. Gemini suggested that the version might be wrong. I checked that the local opentelmetry-java was different from the opentelemetry-java declared in opentelemetry-java-instrumentation. After I changed it to the same version , the build error is reported as follows
The error message indicates that an error occurred when copying the jar from the opentelemetry-java project to the opentelemetry-java-instrumentation. I feel that the replacement statement in settings.gradle.kts should have taken effect. The above startup error is probably caused by the version mismatch. |
Beta Was this translation helpful? Give feedback.
-
I found a very strange way to complete the combined build. According to the above error report, when building opentelemetry-java-instrumentation for the first time, gradlew will download all used dependencies to the local first. If the dependency version is not updated later, Each subsequent build will use the previously downloaded external dependencies. In other words, I can find the location of the jar in opentelemetry-java to be updated, and then replace the updated jar with it. I tried it and it worked. |
Beta Was this translation helpful? Give feedback.
I found a very strange way to complete the combined build. According to the above error report, when building opentelemetry-java-instrumentation for the first time, gradlew will download all used dependencies to the local first. If the dependency version is not updated later, Each subsequent build will use the previously downloaded external dependencies. In other words, I can find the location of the jar in opentelemetry-java to be updated, and then replace the updated jar with it. I tried it and it worked.