maven 相关问题

Apache Maven是一个构建自动化和项目管理工具,主要用于Java项目。此标记用于与特定Maven版本无关的问题。使用gradle标签代替与Gradle相关的问题。

NoClassDefFoundError:无法初始化类 com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl

我正在尝试将项目从Java8迁移到Java9,但遇到了下面的运行时异常,我尝试了Stack-overflow社区和其他博客建议的所有可能的解决方案...

回答 5 投票 0

Allure/TestNG/Maven:org.testng.ITestNGListener:提供程序io.qameta.allure.testng.AllureTestNg无法实例化

我正在尝试将 Allure 集成到我的 Maven 项目中。这是我到目前为止所做的: - 安装命令行并设置类路径。作为验证的一部分,当我在控制台中运行 allure --version 时...

回答 4 投票 0

Maven 环境变量

我已将一个项目从 Eclipse 移植到 Maven,我需要设置一个环境变量以使我的项目正常工作。 在 Eclipse 中,我转到“运行”->“运行配置”,然后在选项卡环境下设置

回答 10 投票 0

Maven:如何重命名项目的war文件?

我有一个项目bird,在pom.xml中包含以下组件 com.myorg 鸟 1.0-快照...

回答 5 投票 0

Maven2中如何使用maven-simian-plugin?

我正在寻找 Simian 的 Maven2 报告插件,我发现的最接近此类报告的就是这个。问题是,它的文档似乎是针对 Maven 1 的。为什么是...

回答 1 投票 0

通过 Maven 生成 EJB 2 STUBS & TIES

最近我开始致力于将EJB项目迁移到Maven项目。我们在项目中使用EJB 2.0,我不知道如何开始迁移过程,目前现有的EJB项目包括...

回答 1 投票 0

检查Maven版本

我刚刚安装了maven。 我下载了分配的、提取的文件并设置了 bin 值环境变量,但是当我在 CMD 中键入 mvn -version 时,我收到消息: “mvn”无法识别...

回答 11 投票 0

JAVA-Selenium-无法找到用于 124.0.6367.202 的 CDP 版本

错误信息: 2024 年 5 月 10 日 11:00:44 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch 警告:无法找到与 124 2024 年 5 月 10 日 11:00:44 PM org.openqa 匹配的 CDP 实现。

回答 1 投票 0

maven 编译错误 - 无法执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile

我正在尝试为我的自动化测试运行 mvn clean 编译测试并获取 Maven 编译错误消息。 我在这里发布错误消息和我的 pom 文件。 我正在使用黄瓜框架...

回答 4 投票 0

Maven依赖解析(冲突)

假设我有四个项目: 项目A(依赖于B和D) 项目 B(依赖于 D) 项目 C(依赖于 D) 项目D 在这种情况下,如果我运行项目 A,Maven 将

回答 5 投票 0

如何将 BIRT 4.9.0 合并到 POM 中?

场景: 我正在重构我的应用程序以在 java 17 下工作。Birt 运行时 3.7.x 嵌入在我的应用程序中。 在更新到 birt 4.9.0 时,我更新了我的 pom,如下所示: <

回答 1 投票 0

Gradle如何将gradle-plugin发布到mavencentral

嗨我有一个java项目,其中包含一个子模块,它是一个gradle插件。我想将此模块发布到 Maven Central。 我在 build.gradle 中使用了这两个插件: 插件{ id 'java-gradle-

回答 3 投票 0

在配置了检查器框架的 Intellij 和 maven pom 中运行测试时出现 ClassNotFoundException

我正在尝试在 Intellij 中运行单元测试,甚至在它有机会运行之前我就遇到了以下构建失败: java: java.lang.ClassNotFoundException: org.checkerframework.checker.nullness.

回答 1 投票 0

liquibase 标记变更集已应用

如何将特定变更集标记为在 liquibase maven 插件中应用?文档中没有任何内容,命令 markNextChangeSetRan 似乎什么也没做。

回答 4 投票 0

如何使用我通过 Maven 导入的依赖项?

我将此依赖项添加到我的项目中,以便我可以使用 WebClient 类: org.springframework.boot spring-boot-starter-我们...

回答 2 投票 0

使用已安装的spark和maven将Spark Scala程序编译成jar文件

仍在尝试熟悉maven并将我的源代码编译成jar文件以进行spark-submit。我知道如何使用 IntelliJ 来实现此目的,但想了解它实际上是如何工作的。我有...

回答 3 投票 0

Java | Maven| IntelliJ |蔚蓝宇宙|构建和运行失败

我正在尝试连接 Azure Cosmos 并尝试检索数据,但由于以下问题(编译时间)而失败。 ===========启动1.POM.xml====================== 我正在尝试连接 Azure Cosmos 并尝试检索数据,但由于以下问题(编译时间)而失败。 ============开始1.POM.xml======================== <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.beginsecure</groupId> <artifactId>CosmosUtility</artifactId> <version>1.0-SNAPSHOT</version> <properties> <maven.compiler.source>20</maven.compiler.source> <maven.compiler.target>20</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>com.azure</groupId> <artifactId>azure-sdk-bom</artifactId> <version>1.2.23</version> <type>pom</type> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>com.azure</groupId> <artifactId>azure-identity</artifactId> <version>1.12.0</version> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> <version>4.58.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.32</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20240303</version> </dependency> </dependencies> </project> ============结束1.POM.xml======================== ============启动2.CosmosHelper.java==================== package com.beginsecure; import com.azure.identity.ChainedTokenCredential; import com.azure.identity.DefaultAzureCredential; import com.azure.identity.ManagedIdentityCredential; import com.azure.core.credential.TokenCredential; import com.azure.cosmos.*; import com.azure.cosmos.CosmosClient; import com.azure.identity.DefaultAzureCredentialBuilder; public class CosmosHelper { private CosmosAsyncClient client; private String databaseName; public CosmosHelper(String cosmosEndPoint, String managedIdentity, String dbName) { System.out.printf(dbName); DefaultAzureCredential defaultCredential = new DefaultAzureCredentialBuilder() .managedIdentityClientId(managedIdentity) .build(); this.client = new CosmosClientBuilder() .endpoint(cosmosEndPoint) .credential(defaultCredential) .buildAsyncClient(); this.databaseName = dbName; } } ============结束2.CosmosHelper.java==================== ============启动3.main.java============================ package com.beginsecure; // Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`, // then press Enter. You can now see whitespace characters in your code. public class Main { public static void main(String[] args) { // Press Alt+Enter with your caret at the highlighted text to see how // IntelliJ IDEA suggests fixing it. System.out.printf("Hello and welcome!"); CosmosHelper tst=new CosmosHelper("https://testdb.documents.azure.com:443/","<Synapse-Work-Space-Identity>","ToDoList"); // Press Shift+F10 or click the green arrow button in the gutter to run the code. for (int i = 1; i <= 5; i++) { // Press Shift+F9 to start debugging your code. We have set one breakpoint // for you, but you can always add more by pressing Ctrl+F8. System.out.println("i = " + i); } } } ============ 3.main.java结束============================ 使用 IntelliJ maven 运行上述项目文件时,Java 代码出现以下错误 java:com.azure.cosmos 包不存在 它应该成功运行,没有错误。 我同意你的观点,必须安装并重新加载特定 SDK 支持的所有模块才能与 Azure Cosmos DB 一起使用。 我正在尝试连接 Azure Cosmos 并尝试检索数据,但由于以下问题(编译时间)而失败。 下面是连接 Azure Cosmos DB 并从 Cosmos DB 检索数据的另一种方法。它使用 query 检索数据,如下面的输出所示。确保某些软件包及其版本在pom.xml中是否可用。 public static void main(String[] args) { CosmosClientBuilder clientBuilder = new CosmosClientBuilder() .endpoint(ENDPOINT) .key(KEY); CosmosClient cosmosClient = clientBuilder.buildClient(); CosmosDatabase cosmosDatabase = cosmosClient.getDatabase(DATABASE_NAME); CosmosContainer cosmosContainer = cosmosDatabase.getContainer(CONTAINER_NAME); String query = "SELECT * FROM c"; CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); options.setQueryMetricsEnabled(true); cosmosContainer.queryItems(query, options, CosmosItemProperties.class) .byPage() .flatMap(cosmosItemFeedResponse -> cosmosItemFeedResponse.getResults().stream()) .forEach(cosmosItemProperties -> { System.out.println(cosmosItemProperties.toJson()); }); cosmosClient.close(); } 输出: { "id": "1", "name": "Sai", "age": 10, "class": "7th", }, { "id": "2", "name": "Pavan", "age": 15, "class": "10th", }, { "id": "3", "name": "Balaji", "age": 13, "class": "8th", }

回答 1 投票 0

Java Springboot“无法启动ServletWebServerApplicationContext”错误

我知道有很多关于此的帖子,但没有任何具体帮助我。我有一个 Java Springboot REST API,它在本地主机上运行良好,但在尝试作为 jar 运行时抛出错误。

回答 1 投票 0

Maven 工件版本冲突

我的项目依赖于新版本的工件,而我的项目的另一个依赖项依赖于旧版本的相同工件。新版本与旧版本不兼容...

回答 1 投票 0

java.lang.ClassNotFoundException:终端中的org.postgresql.Driver

我看到了很多关于同一主题的问题,但老实说,经过几个小时的调试后,没有任何效果。 我有一个带有maven的java项目,它调用postgres DB来读取和写入数据。 ...

回答 2 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.