pom.xml 相关问题

项目对象模型或POM是Maven的基本工作单元。

错误java.lang.IllegalStateException:它必须是可执行文件:/var/lib/jenkins/workspace/RTEJENKINSTESTING/drivers/chromedriverAugust2023.exe

嗨,我有一个框架,它在我的 Windows PC 上使用 Maven 命令运行良好,我尝试在 Linux 上使用 Jenkins 运行相同的框架,但出现此错误。 我尝试了很多方法但无法解决......

回答 1 投票 0

当 SLF4J 位于 Maven pom.xml 文件中时,为什么会出现“No SLF4J”provider found 错误?

我目前在尝试运行 Spring Java 程序时遇到以下错误。 SLF4J:未找到 SLF4J 提供程序。 SLF4J:默认为无操作(NOP)记录器实现 SLF4J:参见http...

回答 2 投票 0

java.lang.NoClassDefFoundError:com/fasterxml/jackson/module/blackbird/ser/ToBooleanFunction

我在尝试从 Java 11 升级到 17 时遇到此错误。 我确认 ToBooleanFunction 存在于 2.15.2 版本以及我尝试过的其他一些版本中。我还确认了

回答 1 投票 0

如何通过pom.xml运行mvn jqassistant:report?

我正在尝试在我的 pom.xml 中配置 jqassistant-maven-plugin 版本 2.0.7。 具体来说,我想创建由命令 mvn jqassistant:report 生成的报告。 我以为我可以简单地做广告...

回答 1 投票 0

在 Windows XP 中运行 Storm API 项目时 pom.xml 出错

我正在尝试在 Windows XP 桌面上运行 Storm API 项目,但该项目显示构建失败,并在控制台中显示以下消息。 SLF4J:无法加载类“org.slf4j.impl。

回答 1 投票 0

在maven项目中如何在编译时执行java main或其他命令?

我有一个spring boot项目,在这个项目中我有一个java主类,它生成一个md文件作为文档。 随后,我必须在终端上运行一个命令,将该文件作为输入和产品...

回答 1 投票 0

STS(4.8.0)中“更新maven项目”时发生内部错误

我已将一个存储库从 bitbucket 克隆到我的本地计算机,当它尝试构建时,我收到上述错误。相反,我在每个 Maven 相关的东西(构建、更新、清理)上都遇到错误,并且......

回答 1 投票 0

Spring-Security-Web 导入错误

我目前的任务是将我们的代码库升级到 Java 11(我知道仍然过时,但这是要求) 我更改了雅加达所有旧的 javax 软件包,并更新了所有 S...

回答 1 投票 0

如何使用maven或pom.xml更新属性文件

我创建了一个自动化框架,在其中读取属性文件中的值,例如“config.properties”。 我的 config.propertioes 文件包含以下内容: 浏览器名称=${浏览器} 环境=$...

回答 3 投票 0

在 Cucumber Selenium JS 中实现 POM 时未获取最后一个列表元素文本值

我正在尝试使用 POM 模型,将所有 Web 元素放在一个单独的页面中。我所做的是创建一个新函数并在我的 step_definition 文件夹中调用它。 我正在编写一个脚本,如果我输入...

回答 1 投票 0

使用springboot向类路径错误添加一个实现,例如Hibernate Validator

我是 Spring Boot 新手,构建了我的第一个简单项目,但在运行应用程序时遇到问题。 您能告诉我为什么下面会出现错误吗? pom.xml 我是 Spring Boot 新手,构建了我的第一个简单项目,但在运行应用程序时遇到问题。 您能告诉我为什么会出现错误吗? pom.xml <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>io.javabrains.springbootquickstart</groupId> <artifactId>course-api</artifactId> <version>0.0.1-SNAPSHOT</version> <name>java Brains Course API</name> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.1.RELEASE</version> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> </dependency> </dependencies> <properties> <java.version>1.8</java.version> </properties> </project> CourseApiApp.java package io.javabrains.springbootstarter; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class CourseApiApp { public static void main(String[] args) { SpringApplication.run(CourseApiApp.class, args); } } 此屏幕截图属于我的示例。 控制台输出如下:应用程序无法启动。 “将一个实现(例如 Hibernate Validator)添加到类路径中” . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.5.1.RELEASE) 2018-01-09 11:31:47.216 INFO 12224 --- [ main] i.j.springbootstarter.CourseApiApp : Starting CourseApiApp on kafein-kafein with PID 12224 (C:\Users\kafein\Documents\workspace-sts-3.9.2.RELEASE\course-api\target\classes started by kafein in C:\Users\kafein\Documents\workspace-sts-3.9.2.RELEASE\course-api) 2018-01-09 11:31:47.223 INFO 12224 --- [ main] i.j.springbootstarter.CourseApiApp : No active profile set, falling back to default profiles: default 2018-01-09 11:31:47.314 INFO 12224 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2a8448fa: startup date [Tue Jan 09 11:31:47 EET 2018]; root of context hierarchy WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/kafein/.m2/repository/org/springframework/spring-core/4.3.6.RELEASE/spring-core-4.3.6.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2018-01-09 11:31:48.148 WARN 12224 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Initialization of bean failed; nested exception is javax.validation.ValidationException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath. 2018-01-09 11:31:48.156 INFO 12224 --- [ main] utoConfigurationReportLoggingInitializer : Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2018-01-09 11:31:48.162 ERROR 12224 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: The Bean Validation API is on the classpath but no implementation could be found Action: Add an implementation, such as Hibernate Validator, to the classpath 您缺少一些库。将以下 Spring Boot 依赖项添加到您的 pom.xml 来解决它。 Spring Boot 将找出在您的项目中使用的正确实现。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> 另外,添加 Hibernate 依赖项: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <!-- Hibernate --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-ehcache</artifactId> <exclusions> <exclusion> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-java8</artifactId> </dependency> 根据此链接,最新的 Spring Boot 版本应该已修复:https://github.com/spring-projects/spring-boot/pull/12669(允许在类路径中验证 api,而不需要实现)。对于较旧的启动版本,修复此异常的另一个选项是排除验证 API。使用 spring-boot-starter web 时的示例如下: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> </exclusion> </exclusions> </dependency> 我只需要添加: compile 'org.springframework.boot:spring-boot-starter-validation' 我使用的是 Spring Boot 2.4.4 版本。最初,我使用了下面的 spring 验证器依赖项,但它不起作用。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> 但后来,我使用了下面的 hibernate 依赖项,它在我的代码中完美运行 <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>6.0.2.Final</version> </dependency> 是的,@viniciusjssouza 的答案对我有用。我的Spring Boot版本是2.7。 即使你没有 Hibernte.Validator,只需将此依赖项添加到 Gradle 或类似 Maven 实现“org.springframework.boot:spring-boot-starter-validation”

回答 5 投票 0

Talend DI V8:线程“主”java.lang.NoClassDefFoundError 中出现异常:javax/xml/bind/DatatypeConverter

我来这里是因为我对 talend DI V8 中的组件有疑问。 我最近将本地 talend v7 升级到 talend 8,并且必须将旧作业迁移到新版本中(因为我使用新的数据库......

回答 1 投票 0

如何获取在java8及更旧的依赖项中运行的当前功能文件名?

如何使用 DriverFactory 类或旧依赖项版本和 java 8 的运行程序文件获取在 java 中运行的当前功能文件名? 我尝试使用功能场景,但它对我不起作用。是...

回答 1 投票 0

我无法解决maven构建错误

当我从 jdk8 升级到 jdk17 时,出现以下错误。 终端输出: [信息] ---------------------------------------------------------- ------------------------ [信息] 构建

回答 1 投票 0

我想从我的空手道项目中删除文件夹 src/test/java 但删除后没有测试用例被执行

我是空手道初学者,所以我一直在制作一个空手道项目,我想删除 src/test/java 并将所有文件和文件夹放在一个文件夹中,比方说“测试文件夹”。测试用例是ru...

回答 1 投票 0

如何在 Maven 中将 Spring Boot starter 依赖项更改为新版本?

由于存在漏洞,我需要将库的版本更新到最新版本。例如,我有一个启动器(但它不仅可以与启动器相关,它可以是与其他库相关的任何库......

回答 1 投票 0

SpringBoot maven 应用程序不会在目标文件夹内生成 jar 文件

你好,我正在 springboot maven 上工作,当我使用 mvn package/mvn install 时,正在创建目标文件,但我的项目的目标文件 jar 内部并未创建,而是创建了类文件...

回答 1 投票 0

maven:在父POM中配置一个插件来为所有子模块执行任务

我有以下 Maven 项目结构。根 POM 指的是 my-modules,而 my-modules 又指的是其子模块。 ---聚甲醛 | |--我的模块 |--聚甲醛 | |---模块1 ...

回答 1 投票 0

如何正确删除 Maven 项目中的依赖项

我有一个 Java Maven 项目,在 pom.xml 文件中定义了一些依赖项。最近我决定从 Junit 迁移到 TestNG,因此我从 pom.xml 中删除了 Junit 依赖项并添加了

回答 1 投票 0

google protobuf 更改导致 parseUnknownField 异常

我对 .proto 文件进行了更改,并使用以下命令更新了 WireMessages.java 文件 协议-I=. --java_out=. ./FILENAME.proto 我可以将这些更改视为 .prot 更改的一部分...

回答 1 投票 0

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