特殊说明: 解决问题的光鲜,藏着磕Bug的痛苦。 万物皆入轮回,谁也躲不掉! 以上文章,均是我实际操作,写出来的笔记资料,不会出现全文盗用别人文章!烦请各位,请勿直接盗用!
导致在打包的会报如下错 02、失效原因 这个是官网原话,大意就如果你使用了spring-boot-starter-parent,则maven-resources-plugin只认@ 为啥只认@,我贴下 scope>import</scope> </dependency> </dependencies> </dependencyManagement> 方案三:修改maven-resources-plugin properties> <resource.delimiter>${}</resource.delimiter> </properties> 04、总结 springboot使maven-resources-plugin 占位符失效问题的本质原因,就是springboot修改了原来maven-resources-plugin默认的占位符。
一、报错信息 Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1] 二、
3836f08313f7e52130415405820fe9a3.png] 失效原因 [1930753498591cdb8cb810180033c68b.png] 这个是官网原话,大意就如果你使用了spring-boot-starter-parent,则maven-resources-plugin scope>import</scope> </dependency> </dependencies> </dependencyManagement> 方案三:修改maven-resources-plugin <properties> <resource.delimiter>${}</resource.delimiter> </properties> 总结 springboot使maven-resources-plugin 占位符失效问题的本质原因,就是springboot修改了原来maven-resources-plugin默认的占位符。
问题:启动报错Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources 解决,pom 添加插件依赖 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin
@[TOC]([ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources requires Maven version 3.1.0 -> [Help 1]) 问题日志及处理 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin :3.2.0 requires Maven version 3.1.0 -> [Help 1] 今天新搭建了一个maven项目,在打包时提示上面的错误信息,这时需要在maven的plugins里面配置maven-resources-plugin <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin
这个错误通常表示Eclipse无法解析指定版本的maven-resources-plugin插件。 执行以下命令:shellCopy codemvn org.apache.maven.plugins:maven-resources-plugin:2.4.3:help这将下载并安装maven-resources-plugin </plugins></build>这将指定使用版本为2.4.3的maven-resources-plugin插件。 如果问题仍然存在,你可以尝试手动安装maven-resources-plugin插件。 help这将下载并安装指定版本的maven-resources-plugin插件。
错误 Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin :jar:2.5 Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin :jar:2.5 解决方法 删除本地仓库中的org.apache.maven.plugins:maven-resources-plugin所在目录。
前置知识 用过 Maven 的同学应该都知道,插件 maven-resources-plugin 就是用来处理资源文件的。 源码解析 首先我们要下载 maven-resources-plugin 的源码。 至此,我们知道:maven-resources-plugin 插件根据我们传入的配置数据,首先解析出可用的 delimiters,并将其转换为占位符,最终用真实的配置数据进行替换。 此时,maven-resources-plugin 插件需要我们手动引入,道理是一样的。 常见情况: 如果项目直接或间接引入 spring-boot-starter-parent 作为 parent,且没有手动配置 maven-resources-plugin 插件。
-- maven default生命周期,process-resources阶段执行maven-resources-plugin插件的resources目标处理主资源目下的资源文件时,只处理如下配置中包含的资源类型 -- maven default生命周期,process-resources阶段执行maven-resources-plugin插件的resources目标处理主资源目下的资源文件时,指定处理后的资源文件输出目录 插件 为了使项目结构更为清晰,Maven区别对待Java代码文件和资源文件,maven-compiler-plugin用来编译Java代码,maven-resources-plugin则用来处理资源文件 默认的主资源文件目录是src/main/resources,很多用户会需要添加额外的资源文件目录,这个时候就可以通过配置maven-resources-plugin来实现。 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId
今天想打包服务上线的时候突然报了一个错: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project enterprise_plateform: Input length = 1 -> [Help 1] 其实上面的错误提示也很明显:它说是maven-resources-plugin 所以我们需要重新在pom文件中在添加一次plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin
Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html 解决办法 在你的 pom 配置文件中 maven-resources-plugin 插件配置中,添加一个 <propertiesEncoding>UTF-8</propertiesEncoding> 如果你的 pom 配置文件没有配置过 maven-resources-plugin 插件的话,你需要将这个插件先添加进去。 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin
上一章介绍使用ant拷贝资源,这里介绍maven拷贝资源,使用maven-resources-plugin插件。 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId
plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin 如果想要配置更多的参数,可以参看具体的配置说明: http://maven.apache.org/plugins/maven-resources-plugin/
版本号:maven-resources-plugin:3.1.0 bootstrap.yml spring: application: name: system profiles: spring.active@' pom.xml <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin
site-deploy maven-site-plugin:deploy 最麻烦的就是最核心的default 生命周期阶段 插件目标 process-resources maven-resources-plugin :resources compile maven-compiler-pugin:compile process-test-resources maven-resources-plugin
site post-site site-deploy maven-site-plugin:deploy 最麻烦的就是最核心的default 生命周期阶段 插件目标 process-resources maven-resources-plugin :resources compile maven-compiler-pugin:compile process-test-resources maven-resources-plugin:testResources
因为Maven提供了一个插件在起作用 maven-resources-plugin:http://maven.apache.org/plugins/maven-resources-plugin/ Resources 也就是说即使不在pom.xml加任何Resources配置,只要我们的资源文件放在了 src/main/resources目录下,就能被maven-resources-plugin管理到,就能替换掉文件中的占位符
[INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin default-compile) @ mango_core --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin default-compile) @ mango --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin
实现方法二: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin resource> </resources> </configuration> </execution> </executions> </plugin> 说明:插件maven-resources-plugin