当前位置: 首页 > 知识库问答 >
问题:

Quarkus在更新到最新版本时无法找到CDIProvider

经昱
2023-03-14

POM文件

<?xml version="1.0"?>

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://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>
  <version>1.0-SNAPSHOT</version>
  <properties>
    <surefire-plugin.version>2.22.0</surefire-plugin.version>
    <maven.compiler.target>1.8</maven.compiler.target>
    <quarkus.version>0.27.0</quarkus.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <restClient.version>0.18.0</restClient.version>
    <jedis.version>3.1.0</jedis.version>
    <squirrel.version>0.3.8</squirrel.version>
    <restAssured.version>4.1.2</restAssured.version>
    <testContainers.version>1.12.2</testContainers.version>
    <lombok.version>1.18.10</lombok.version>
    <jetty.version>9.4.19.v20190610</jetty.version>
    <wiremock.version>2.25.1</wiremock.version>
    <redisson.version>3.11.4</redisson.version>
    <microprofile.version>2.1</microprofile.version>
    <license.year>2019</license.year>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-bom</artifactId>
        <version>${quarkus.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>

    <!-- TestContainers -->
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <version>${testContainers.version}</version>
    </dependency>

    <!-- Rest client -->
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-rest-client</artifactId>
      <version>${restClient.version}</version>
    </dependency>

    <!-- Quarkus -->
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-arc-deployment</artifactId>
        <version>0.20.0</version>
    </dependency>
    <dependency>
        <groupId>io.quarkus.arc</groupId>
        <artifactId>arc</artifactId>
        <version>${quarkus.version}</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy</artifactId>
      <version>${quarkus.version}</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-jsonb</artifactId>
      <version>${quarkus.version}</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-health</artifactId>
      <version>${quarkus.version}</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit5</artifactId>
      <version>${quarkus.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-openapi</artifactId>
      <version>${quarkus.version}</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-hibernate-validator</artifactId>
      <version>${quarkus.version}</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-vertx</artifactId>
      <version>${quarkus.version}</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-opentracing</artifactId>
      <version>${quarkus.version}</version>
    </dependency>

    <!-- Jetty -->
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlets</artifactId>
      <version>${jetty.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlet</artifactId>
      <version>${jetty.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-webapp</artifactId>
      <version>${jetty.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <version>${jetty.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- WireMock -->
    <dependency>
      <groupId>com.github.tomakehurst</groupId>
      <artifactId>wiremock</artifactId>
      <version>${wiremock.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- RestAssured -->
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <version>${restAssured.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>xml-path</artifactId>
      <version>${restAssured.version}</version>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>json-path</artifactId>
      <version>${restAssured.version}</version>
    </dependency>

    <!-- Redis -->
    <dependency>
      <groupId>redis.clients</groupId>
      <artifactId>jedis</artifactId>
      <version>${jedis.version}</version>
    </dependency>
    <dependency>
      <groupId>org.redisson</groupId>
      <artifactId>redisson</artifactId>
      <version>${redisson.version}</version>
    </dependency>

    <!-- Squirrel -->
    <dependency>
      <groupId>org.squirrelframework</groupId>
      <artifactId>squirrel-foundation</artifactId>
      <version>${squirrel.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Lombok -->
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombok.version}</version>
    </dependency>

<!-- Microprofile health -->
    <dependency>
      <groupId>org.eclipse.microprofile.health</groupId>
      <artifactId>microprofile-health-api</artifactId>
      <version>${microprofile.version}</version>
    </dependency>


  </dependencies>
  <repositories>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      </repository>
  </repositories>
  <build>
    <plugins>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>3.0</version>
        <configuration>
          <header>src/main/resources/META-INF/resources/license.txt</header>
          <properties>
            <owner>${organization.name}</owner>
            <project.inceptionYear>${license.year}</project.inceptionYear>
          </properties>
            <excludes>
            <exclude>.mvn/wrapper/MavenWrapperDownloader.java</exclude>
            <exclude>.mvn/wrapper/maven-wrapper.properties</exclude>
            <exclude>infra/api/openapi.yaml</exclude>
            <exclude>infra/temp/openapi.yaml</exclude>
            <exclude>mvnw.cmd</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-maven-plugin</artifactId>
        <version>${quarkus.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>build</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire-plugin.version}</version>
        <configuration>
          <systemProperties>
            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.4</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>native</id>
      <activation>
        <property>
          <name>native</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-maven-plugin</artifactId>
            <version>${quarkus.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>native-image</goal>
                </goals>
                <configuration>
                  <enableHttpUrlHandler>true</enableHttpUrlHandler>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemProperties>
                    <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
                  </systemProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

共有1个答案

姚实
2023-03-14

您使用的是不同版本的Quarkus扩展。那肯定不行:

<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-arc-deployment</artifactId>
    <version>0.20.0</version>
</dependency>

<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-smallrye-rest-client</artifactId>
  <version>${restClient.version}</version>
</dependency>

您已经导入了BOM,所以只需删除所有版本即可。

    null
 类似资料:
  • 问题内容: 我在安装项目时遇到了一些问题。 我拥有运行 Swift 3* 的最新版本的 Xcode ,并且当我尝试安装alamofire时遇到800个编译器错误。 * 显然地 构建Alamofire 4.0.0+需要CocoaPods 1.1.0+ 我看着终端机上的CocoaPods版本,它说我的版本是1.0.1。 我猜运行更新没有用,因为CocoaPods 1.1是beta版。 因此,我不确定如

  • 3.8. 更新go到新版本 当有新版本发布的时候,会在Go Nuts邮件列表中通知。可以用以下命令获取最新的发布版本: $ cd go/src $ hg pull $ hg update release $ ./all.bash

  • Flask 如同其它软件一样,会随着时间不停地更新自己,其中大部分都会是非常体贴的, 你无需改动一行自身代码就可以应用新版本的 Flask。 不过,每当 Flask 有更新时,我们都建议你适当地修改自己的代码,以充分地利用这些新功能, 提高自己代码地质量。 本章节文档为您列举了 Flask 各版本之间地差异,以及你如何修改自身代码才能无痛地升级。 如果你使用 easy_install 命令更新、安

  • 我遇到了非常奇怪的情况。我成功地将Android SDK工具更新到版本22.6.1。现在当我启动ADT(Eclipse)时,它会向我显示一条消息,上面写着以下内容。 当我按下“检查更新”按钮时,Eclipse会显示一条消息,上面写着“未找到更新”消息。如果我通过帮助-检查更新执行此操作,结果相同。 如果我打开Help-Install New Software并选择Developer Tools U

  • 虽然在处理未解决的依赖项时存在许多问题,但似乎没有更新这些依赖项的通用方法。 您需要手工为每一个检查maven central,还是有一些漂亮的工具可以自动将它们更新到最新版本?

  • 在OSX上更新Xcode最简单的方法是什么?