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

Broken dependency when using OpenTelemetry + REST Client on main #18125

Closed
jsmrcka opened this issue Jun 24, 2021 · 4 comments · Fixed by #18150
Closed

Broken dependency when using OpenTelemetry + REST Client on main #18125

jsmrcka opened this issue Jun 24, 2021 · 4 comments · Fixed by #18150
Assignees
Labels
Milestone

Comments

@jsmrcka
Copy link
Contributor

jsmrcka commented Jun 24, 2021

Describe the bug

When combining quarkus-opentelemetry-exporter-otlp and rest-client extensions, Maven is unable to resolve the io.quarkus:quarkus-opentelemetry-rest-client-deployment dependency unless it is locally cached.

Expected behavior

Build success

Actual behavior

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:generate-code (default) on project opentelemetry-test: Quarkus code generation phase has failed: Failed to bootstrap the application: Failed to create the application model for org.acme:opentelemetry-test::jar:1.0.0-SNAPSHOT: Failed to resolve artifacts: Could not find artifact io.quarkus:quarkus-opentelemetry-rest-client-deployment:jar:999-SNAPSHOT

To Reproduce

Make sure you do not have io.quarkus:quarkus-opentelemetry-rest-client-deployment:jar:999-SNAPSHOT in local Maven repo and a remote repo with Quarkus 999-SNAPSHOT is available.

mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create \
    -DplatformArtifactId=quarkus-bom \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=opentelemetry-test \
    -Dextensions="rest-client,quarkus-opentelemetry-exporter-otlp"
cd opentelemetry-test
mvn clean compile

See also https://github.com/quarkusio/quarkus-quickstarts/tree/development/opentelemetry-quickstart, which fails in the same manner when using a remote repository.

Environment:

Apache Maven 3.8.1
Java version: 11.0.10, vendor: AdoptOpenJDK
Quarkus main (999-SNAPSHOT)
@jsmrcka jsmrcka added the kind/bug Something isn't working label Jun 24, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 24, 2021

/cc @kenfinnigan, @michalszynkiewicz

@michalszynkiewicz
Copy link
Member

@jsmrcka , stupid question but: are you sure the artifact is in the remote repository?

CC @aloubyansky

@aloubyansky
Copy link
Member

From which repository is it expected to be downloaded and how is that repository configured in your environment?

@jsmrcka
Copy link
Contributor Author

jsmrcka commented Jun 24, 2021

@michalszynkiewicz I am sure the artifact is there.

We use an internal repository for daily Quarkus snapshots.
Local settings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <mirrors>
        <mirror>
            <id>jboss-central-quarkus-mirror</id>
            <mirrorOf>jboss-central-quarkus</mirrorOf>
            <name>jboss-and-central</name>
            <url>http://10.0.139.54:8040/artifactory/jboss-and-central</url>
            <blocked>false</blocked>
        </mirror>
        <mirror>
            <id>libs-snapshot-local-mirror</id>
            <mirrorOf>libs-snapshot-local</mirrorOf>
            <name>libs-snapshot-local</name>
            <url>http://10.0.139.54:8040/artifactory/libs-snapshot-local</url>
            <blocked>false</blocked>
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <repositories>
                <repository>
                    <id>jboss-central-quarkus</id>
                    <name>jboss-and-central</name>
                    <url>http://10.0.139.54:8040/artifactory/jboss-and-central</url>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>libs-snapshot-local</id>
                    <name>libs-snapshot-local</name>
                    <url>http://10.0.139.54:8040/artifactory/libs-snapshot-local</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                  </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>jboss-central-quarkus</id>
                    <name>jboss-and-central</name>
                    <url>http://10.0.139.54:8040/artifactory/jboss-and-central</url>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <id>libs-snapshot-local</id>
                    <name>libs-snapshot-local</name>
                    <url>http://10.0.139.54:8040/artifactory/libs-snapshot-local</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                  </pluginRepository>
            </pluginRepositories>
            <id>artifactory</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>artifactory</activeProfile>
    </activeProfiles>
</settings>

As a workaround, one can add the io.quarkus:quarkus-opentelemetry-rest-client-deployment as an explicit dependency.

I believe it has something to do with the io.quarkus:quarkus-opentelemetry-rest-client-deployment being an optional dependency:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants