maven 相关问题

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

检查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

依赖类型 ejb 和 ejb-client 有什么区别

如果您在 pom.xml 中包含像这样的依赖项,有什么区别 组.Id 神器.Id <...

回答 1 投票 0

即使使用 Maven 依赖项 poi-ooxml 后仍缺少 XSSFWorkbook

首先我要说的是,我看到了很多关于错误 XSSFWorkbook 无法解析为类型的问题。然而,我已经研究了其中的大多数,并且接受的答案似乎......

回答 2 投票 0

运行maven部署后jar文件如何执行?

当我运行 Maven 测试时,我将所有依赖项作为 jar 获取。我可以在编辑代码时使用这些 jar 中的类的方法。不过我想知道: 运行时,Maven是否部署到包中...

回答 1 投票 0

两个具有相似包结构的罐子。运行时调用了错误的类

我有以下 springboot 应用程序 家长 -- ReportAnalytics 具有 main 方法 -- diffToolv1(具有 getDifference REST api 端点):依赖于 jar1 -- diffToolv2(有 getDifferenc...

回答 1 投票 0

如何通过Web浏览器访问Spring配置服务器属性?

我成功地访问了我的配置服务器的属性文件一次。我的配置似乎发生了一些变化,我无法重复这一点...... 此时我很绝望。我是...

回答 2 投票 0

Maven如何在IDEA中进行自动构建/自动编译

我将描述问题以及我为解决问题所做的事情。 我正在从 gradle 迁移到 Maven(找工作,哈哈),我面临这样一个事实:当我用 Maven 运行一个程序时(手动 u...

回答 1 投票 0

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