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

jfrog cli raises error when building quarkus 3.2.x application #2070

Closed
joergsesterhenn opened this issue Jul 12, 2023 · 12 comments · Fixed by jfrog/build-info#765
Closed

jfrog cli raises error when building quarkus 3.2.x application #2070

joergsesterhenn opened this issue Jul 12, 2023 · 12 comments · Fixed by jfrog/build-info#765
Labels
bug Something isn't working

Comments

@joergsesterhenn
Copy link

Describe the bug

when building quarkus 3.2.x application with the newest version of jfrog cli v2 and maven >= 3.8.6 an error is shown and the application will not compile:

ERROR org.apache.maven.cli.MavenCli - Failed to execute goal io.quarkus:quarkus-maven-plugin:3.2.0.Final:generate-code-tests (default) on project adonis-sync-service: Execution default of goal io.quarkus:quarkus-maven-plugin:3.2.0.Final:generate-code-tests failed: A required class was missing while executing io.quarkus:quarkus-maven-plugin:3.2.0.Final:generate-code-tests: org/sonatype/aether/repository/RemoteRepository
It appears build-info-extractor-maven3-2.40.0-uber.jar (and later versions) lacks the required class to run the plugin

Earlier versions of quarkus apps do not have that problem. However since apps with this version of quarkus are built correctly without jfrog cli there appears to be an issue in jfrog cli.

Current behavior

when building quarkus 3.2.x application with the newest version of jfrog cli v2 and maven >= 3.8.6 an error is shown and the application will not compile:

ERROR org.apache.maven.cli.MavenCli - Failed to execute goal io.quarkus:quarkus-maven-plugin:3.2.0.Final:generate-code-tests (default) on project adonis-sync-service: Execution default of goal io.quarkus:quarkus-maven-plugin:3.2.0.Final:generate-code-tests failed: A required class was missing while executing io.quarkus:quarkus-maven-plugin:3.2.0.Final:generate-code-tests: org/sonatype/aether/repository/RemoteRepository
It appears build-info-extractor-maven3-2.40.0-uber.jar (and later versions) lacks the required class to run the plugin

Reproduction steps

  1. Install newest jf and maven

  2. checkout the Quickstarts repo from

https://github.com/quarkusio/quarkus-quickstarts

  1. change to the rest-client-reactive-quickstart and run
    jf mvn clean install

  2. see error above

  3. fix it ;)

Expected behavior

project should build, just like it would without jfrog cli.

JFrog CLI version

2.42.1

Operating system type and version

Windows 10 / Linux

JFrog Artifactory version

7.41.13

JFrog Xray version

3.73.8

@joergsesterhenn joergsesterhenn added the bug Something isn't working label Jul 12, 2023
@mcanzerini
Copy link

Same problem for me, it is blocking our CI pipeline (Xray analysis)

@dNhax
Copy link

dNhax commented Jul 21, 2023

Workaround: Add the missing class/dependency (org.sonatype.aether:aether-api:1.13.1) to the ${MAVEN_HOME}/lib/ directory.
But that would mean that every maven installation would have to be adapted manually, so it can only be considered as an absolute emergency solution.

@joergsesterhenn
Copy link
Author

JFrog Support is unable to reproduce this, can someone run a debug build and provide some additional data here:

Reproduce the issue after adding the below maven debug loggers(please remove them after sharing the information) in the logback.xml file present under "$JFROG_HOME/artifactory/var/etc/artifactory/" and share the latest Artifactory Support Bundle along with the timestamp.

<appender name="maven" class="ch.qos.logback.core.rolling.RollingFileAppender">
  <File>${log.dir}/artifactory-maven.log</File>
  <rollingPolicy class="org.jfrog.common.logging.logback.rolling.FixedWindowWithDateRollingPolicy">
    <FileNamePattern>${log.dir.archived}/artifactory-maven.%i.log.gz</FileNamePattern>
    <maxIndex>10</maxIndex>
  </rollingPolicy>
  <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
    <MaxFileSize>25MB</MaxFileSize>
  </triggeringPolicy>
  <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
    <layout class="org.jfrog.common.logging.logback.layout.BackTracePatternLayout">
      <pattern>%date{yyyy-MM-dd'T'HH:mm:ss.SSS, UTC}Z [jfrt ] [%-5p] [%-16X{uber-trace-id}] [%-30.30(%c{3}:%L)] [%-20.20thread] - %m%n</pattern>
    </layout>
  </encoder>
</appender>
 
<logger name="org.artifactory.maven" additivity="false">
<level value="debug"/>
<appender-ref ref="maven"/>
</logger>
  1. Share the complete output of the "jf mvn clean install" command by appending "-X" at the end. This will provide us with detailed information that will aid in our investigation.

@dNhax
Copy link

dNhax commented Aug 8, 2023

Adding this logging config creates the file artifactory-maven.log, but nothing is logged.

@itjoker-klaus
Copy link

itjoker-klaus commented Aug 31, 2023

When ist ETA for the bug fix? It is a big issue!
We cannot upgrade to latest Quarkus release.

@aboukhal
Copy link

aboukhal commented Sep 5, 2023

@joergsesterhenn
We're seeing the exact same issue with the following minimal example:

mvn clean package completes successfully.
jf mvn clean package fails with the missing class as above.

We are using Apache Maven 3.8.5 (Red Hat 3.8.5-4) and jf version 2.25.2 and the following minimal pom (no other files required to reproduce this)

<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>minimal</groupId>
  <artifactId>minimal-example</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <properties>
    <compiler-plugin.version>3.11.0</compiler-plugin.version>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
    <quarkus.platform.version>3.2.5.Final</quarkus.platform.version>
    <skipITs>true</skipITs>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-reactive-jackson</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>quarkus-maven-plugin</artifactId>
        <version>${quarkus.platform.version}</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <goals>
              <goal>build</goal>
              <goal>generate-code</goal>
              <goal>generate-code-tests</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

@joergsesterhenn
Copy link
Author

@aboukhal then best report it to jfrog via support to raise urgency.

@dNhax
Copy link

dNhax commented Oct 9, 2023

3 months later, still no fix.

@Mert-Z
Copy link

Mert-Z commented Oct 10, 2023

JFrog support shared that this bug is in RnD's backlog and will be fixed on Q4.

@gregoryboue
Copy link

gregoryboue commented Oct 12, 2023

I also raised a jfrog support ticket and I had the same answer :

I have already reached out to the relevant teams to get an ETA after internal discussions, the RnD team decided to add the issue to the Q4 plan.
If you are stuck with the deliverables at your end we recommend using the maven client directly with Artifactory instead of JFrog CLI until the fix is available.

@yahavi
Copy link
Member

yahavi commented Nov 21, 2023

@joergsesterhenn @mcanzerini @dNhax @itjoker-klaus @Mert-Z @gregoryboue
Thanks for reporting this issue!
We created jfrog/build-info#765 to fix it.
We'll keep you updated.

@yahavi
Copy link
Member

yahavi commented Dec 15, 2023

@joergsesterhenn @mcanzerini @dNhax @itjoker-klaus @Mert-Z @gregoryboue
JFrog CLI 2.52.3 has been released.
This version includes the fix for this issue.

Feel free to upgrade - we'd appreciate your feedback on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants