Can you include Eclipse variables (like the project name) and Maven variables (like the artifact ID) in there too, and have them substituted during the respective build?
For the later (Maven variables), you can use resources filtering. Activate it by adding a <filtering>
element to your POM and setting it to true
:
<project>
...
<build>
...
<resources><resource><directory>src/main/resources</directory><filtering>true</filtering></resource>
...
</resources>
...
</build>
...
</project>
And any Maven property like ${project.artifactId}
used in a resource file will now get replaced by its value. You can define includes
/excludes
for finer control of resources that you want to filter. Refer to the above link for examples.
For the former (Eclipse variables), Maven is not aware of them so, obviously, this solution won't work and I actually suggest sticking to Maven filtering (the Maven build should be the reference).
If you are using m2eclipse, this will work transparently inside Eclipse.
See also
相关推荐
[SSH+Maven+Bootstrap视频教程]_17. 添加 log4j.properties 配置文件.zip
ssm框架中mybatis的调试日志文件,在Maven中导入log4j,然后在recources中直接导入log4j.properties即可
在log4j.properties配置文件中可以指定字符编码: 下面这行配置指定了两个appender: log4j.rootCategory=INFO,appender1的名字,appender2的名字 下面这两行配置将上一行的两个appender的字符编码配置为GBK:
Maven坐标:org.apache.logging.log4j:log4j-core:2.7; 标签:core、apache、logging、log4j、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性...
针对Log4j 2 远程代码执行漏洞,需要用到的升级资源包,适用于maven资源库,包括log4j,log4j-core,log4j-api,log4j-1.2-api,log4j-jpa等全套2.15.0 maven资源库jar包。如果是maven本地仓库使用,需要将zip包解压...
该项目采用maven聚合工程,项目骨架是我们以前公司架构师搭建骨架,现在已经拆分出来供大家下载使用,可以扩展使用,里面用到技术有springmvc+mybatis+mysql+log4j.xml+logjdbc+maven+nexus+dubbo ,其中日志采用log...
apache-maven-3.8.6-bin.zip apache-maven-3.8.6-bin.zip apache-maven-3.8.6-bin.zip apache-maven-3.8.6-bin.zip apache-maven-3.8.6-bin.zip apache-maven-3.8.6-bin.zip apache-maven-3.8.6-bin.zip apache-...
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project
在apache-maven-3.5.2/conf/setting.xml中加入以下配置即可解决 alimaven aliyun maven http://maven.aliyun.com/nexus/content/repositories/central/ central junit junit Address/ ...
apache maven 3.x.x所有Linux, Windows版本下载的百度网盘链接。 apache-maven-3.0.4-bin.tar.gz apache-maven-3.0.4-bin.zip apache-maven-3.0.5-bin.tar.gz apache-maven-3.0.5-bin.zip apache-maven-3.1.0-bin....
resolver-status.properties
logging-log4j2, Apache日志记录Log4J2镜像 Apache Log4J 2Apache是对 Log4J的升级,它提供了比它的前辈 Log4J 1. x,的显著改进,并提供了许多改进,同时解决了soa架构中一些固有问题。 在Github上请求请求通过发送...
om.google.code.gson/gson/2.6.2 Gson maven依赖 java 开发包
Maven坐标:org.apache.logging.log4j:log4j-api:2.12.1; 标签:apache、logging、log4j、api、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性...
该示例实现MAVEN来进行创建的,实现了dom4j操作XML文件,包括创建XML、动态创建XML节点、更新XML节点、删除XML节点。
maven.rar apache-maven-3.5.4
settings.xml,本地maven仓库配置,注意:D:\maven\repository为我本地的maven仓库路径,改成你的。 settings.xml,本地maven仓库配置,注意:D:\maven\repository为我本地的maven仓库路径,改成你的。 settings.xml...
jacob-1.18的资源包还有 jacob-1.18-x64.dll和jacob-1.18-x86.dll. 把对应的windows版本扔到 C...如果使用maven 则在pom.xml中添加 <groupId>com.hynnet</groupId> <artifactId>jacob <version>1.18 </dependency>