pom.xml 相关问题

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

如何根据依赖关系列出Maven构建/编译顺序?

如果我有一个 pom 层次结构,其中 superpom 调用多个相互依赖的子模块,我如何根据依赖关系列出构建/编译顺序? IOW,如果 superpom 有

回答 6 投票 0

Springboot Devtools 不热重载?

我有一段时间没有使用spring了,我正在尝试使用spring boot开发工具来执行热重载。我已经从 start.spring.io 项目生成器导入了 Web 和 Spring Boot 依赖项,并且...

回答 2 投票 0

如何将独立的 POM 上传到 Azure 工件?

之前我已使用以下命令成功将 POM 文件上传到 Azure Artifacts mvn org.apache.maven.plugins:maven-deploy-plugin:2.4:部署文件 -D包装=jar -DrepositoryId=repoID -D...

回答 1 投票 0

eclipse maven pom.xml <packaging>标签错误

我想通过允许您在maven标签中接收参数来根据情况构建不同的东西。 maven的构建没有问题。 但是,Eclipse 显示

回答 1 投票 0

编译 Spring mvc 示例时,在 pom.xml 中出现“无法调用“java.net.URI.getScheme()”,因为“uri”为 null”

我在 Eclipse 中的 SpringMVC 项目的 pom.xml 中收到此错误: “无法调用“java.net.URI.getScheme()”,因为“uri”为空” 有这方面的指点吗?

回答 4 投票 0

java.lang.IllegalStateException:无法加载配置类:

当我尝试在 Tomcat 服务器上运行我的 java web 应用程序时,出现以下错误。当我尝试在我的网络应用程序中实现安全性时,我特别收到此错误。为此,我在我的我们中使用过滤器映射...

回答 1 投票 0

如何在应用程序的 pom.xml 中包含库/sdk 的着色 POM?

我有一个库/sdk,在其中我使用 mavenshadeplugin 创建了一个着色 pom java-sdk-1.0.0-SNAPSHOT-shaded.pom 。 其中包含用作依赖项的所有 jar 和类。现在我想要

回答 2 投票 0

Maven pom.properties 文件中的自定义值

我正在尝试在 Maven 在 META-INF/maven/${groupId}/${artifactId} 位置生成的 pom.properties 文件中添加自定义值 org.apache.maven.plugins 我正在尝试在 Maven 在 META-INF/maven/${groupId}/${artifactId} 位置生成的 pom.properties 文件中添加自定义值 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <configuration> <archive> <manifestEntries> <build>${BUILD_TAG}</build> </manifestEntries> <addMavenDescriptor>true</addMavenDescriptor> <pomPropertiesFile>${project.build.directory}\interface.properties</pomPropertiesFile> </archive> </configuration> </plugin> interface.properties文件的内容是 # Build Properties buildId=746 使用文档我已将pomPropertiesFile元素指向外部属性,但运行后生成的pom.properties文件仍然具有默认内容mvn install pomPropertiesFile元素的正确用法是什么? 编辑 我认为问题出在 org.apache.maven.archiver.PomPropertiesUtil 上。如果您查看 source 中的方法 sameContents,如果外部文件中的属性与默认值相同,则返回 true;如果不同,则返回 false。如果 sameContents 的结果为 false,则忽略外部文件的内容。 果然,这已经被记录为错误 我认为你需要在 src/main/resources/META-INF/${groupId}/${artifactId}/interface.properties 下放置一个文件,并让 maven 执行过滤工作(配置过滤)。该文件将自动复制到 target/META-INF/maven/${groupId}/${artifactId}/ 位置。 参见 https://issues.apache.org/jira/browse/MNG-4998 Maven 3 在读取 pom.xml 时将立即解析属性占位符以获取此时可用的所有属性值。稍后修改这些属性不会影响 pom.xml 中已解析的值。 但是,如果属性值不可用(没有默认值),则占位符将不会被该值替换,并且稍后仍可以将其作为占位符进行处理。例如,如果插件将在构建过程中生成某些属性,或者如果插件在某个构建步骤中读取并处理占位符。

回答 2 投票 0

java.lang.NoSuchMethodError:org.apache.cxf.common.jaxb.JAXBContextCache$CachedContextAndSchemas.getContext()Ljavax/xml/bind/JAXBContext

我使用 Maven 启动项目时出现以下错误(干净验证): [错误] it.bper.testing.integration.LocalStorageFoldersIT.testLocalStorageFoldersTimeout -- 已用时间:9.049 秒 <<...

回答 2 投票 0

什么是Release Train Bom?

我正在研究 Spring Cloud 合约文档,我看到了 Spring Cloud 文档中的依赖注释,想知道这到底是什么

回答 0 投票 0

Spring Boot - 进程已完成,退出代码为 0

我查看了 stackoverflow 和其他网站的各种链接,看看是否有其他人遇到类似的问题。我找到了一些,但没有一个能解决我的问题。试图摆弄一些......

回答 3 投票 0

为我的文本文件中的所有 jar 名称/版本生成 pom.xml 文件(带有依赖项)

我在文本文件中列出了大量的罐子及其版本。 例如: spring-jdbc-4.3.6.RELEASE.jar 公共编解码器.jar commons-fileupload.jar 。 。 。 。 此列表包含 500 多个罐子。 亲...

回答 1 投票 0

maven 错误:找不到私有 github 存储库中托管的工件

我试图拉取托管在 github(公司的私人仓库)中的工件,但它抛出了一个错误: [信息] 正在扫描项目... [信息] [信息]-------------------------------------< com.my:package-orde...

回答 1 投票 0

导入io.restassured.RestAssured无法解决

您好,我在使用放心 4.1.1 时无法解决该错误。我的 Eclipse IDE 中的库。 我已在 pom.xml 文件中添加了放心库,但错误仍未解决。 我尝试重新

回答 3 投票 0

使用 Maven 和 junit 启用预览

我正在使用模式匹配开关编写一些Java代码,这需要在多个上下文(编译器、运行时、IDE)中设置--enable-preview。此时,除了其中一个之外,我已经得到了所有内容:unit

回答 1 投票 0

Visual Studio Code:项目配置与 pom.xml 不是最新的,需要更新

版本:1.84.2(用户设置) 提交:1a5daa3a0231a0fbba4f14db7ec463cf99d7768e 日期:2023-11-09T10:51:52.184Z 电子:25.9.2 电子构建 ID:24603566 铬:114.0.5735.289 Node.js:18.15.0 V8:...

回答 1 投票 0

字节编译是通过 /usr/bin/python 而不是 /usr/bin/python3 完成的

我有一个python项目,我使用maven创建rpm文件,使用rpm-maven-plugin v2.1.3。 我的项目是用python3编写的。 当我创建 rpm 文件时,作为 ms creat 更大进程的一部分...

回答 1 投票 0

如果条件为 true,则在 pom.xml 文件上添加排除项

我正在处理一个 pom.xml 文件,如果条件设置为 true,我想排除一个文件,如果不是,我不会被排除。我尝试使用配置文件,但它不起作用,我该如何实现这一目标? 编辑...

回答 1 投票 0

Apache Maven 插件 3.11.0 编译问题

pom.xml 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.2.0</version> <relativePath/> </parent> <groupId>com.example</groupId> <artifactId>TelegramWeb</artifactId> <version>0.0.1-SNAPSHOT</version> <name>TelegramWeb</name> <properties> <java.version>17</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies> </project> 运行时 mvn clean install 我在 IntelliJ 中收到以下错误: Latitude-3420:~/TelegramWeb$ java -version openjdk version "17.0.9" 2023-10-17 OpenJDK Runtime Environment (build 17.0.9+9-Ubuntu-120.04) OpenJDK 64-Bit Server VM (build 17.0.9+9-Ubuntu-120.04, mixed mode, sharing) Latitude-3420:~TelegramWeb$ mvn clean install [INFO] Scanning for projects... [INFO] [INFO] ----------------------< com.example:TelegramWeb >----------------------- [INFO] Building TelegramWeb 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.3.2:clean (default-clean) @ TelegramWeb --- [INFO] Deleting /home/TelegramWeb/target [INFO] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ TelegramWeb --- [INFO] Copying 1 resource from src/main/resources to target/classes [INFO] Copying 0 resource from src/main/resources to target/classes [INFO] [INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ TelegramWeb --- [INFO] Changes detected - recompiling the module! :source [INFO] Compiling 1 source file with javac [debug release 17] to target/classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.824 s [INFO] Finished at: 2023-12-18T04:39:45+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project TelegramWeb: Fatal error compiling: invalid flag: --release -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 我还添加了以下内容: <properties> <java.version>17</java.version> <maven.compiler.release>17</maven.compiler.release> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> 并且 <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.11.0</version> <configuration> <release>17</release> </configuration> </plugin> </plugins> </build> 但是错误仍然存在。请帮忙。 Terminal 有自己的环境。在 IntelliJ 中,在命令提示符下执行 mvn -v 可以查看当前 Maven 使用的 Java 版本。我复制了你的 pom.xml 文件来执行与你相同的错误。之后我执行mvn -v命令,发现Maven使用的是Java 1.8。我发现我在环境变量中设置了一个JAVA_HOME和一个JAVA_HOME_17。我删除了1.8版本,只留下了17版本。重新启动IntelliJ后,在终端中执行mvn -v,就变成了17.0.9。然后我执行了mvn clean install,结果是BUILD SUCCESS。

回答 1 投票 0

settings.xml 中的条件 Maven 镜像?

在我的settings.xml 中,我有一个像这样的镜像条目: 企业VPN 批准的企业 Java https://some-url-availa...

回答 1 投票 0

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