gpt4 book ai didi

java - maven 进程资源不会替换 Linux 上属性文件中的占位符

转载 作者:太空宇宙 更新时间:2023-11-04 05:23:59 26 4
gpt4 key购买 nike

我遇到了 mvn 进程资源的问题。Linux 上的资源未得到处理,而 Windown 计算机上的资源也同样有效。有人可以帮忙解决这个问题吗?下面是配置

Pom.xml

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<superpom-basedir>${project.parent.basedir}</superpom-basedir>

<!-- Omega -->
<project.version>${project.version}</project.version>
<reins-core.version>1.5-SNAPSHOT</reins-core.version>

<servlet-api.version>2.5</servlet-api.version>

<junit.version>4.12</junit.version>
<spring.version>3.1.1.RELEASE</spring.version>
<oro.version>2.0.8</oro.version>
<lombok.version>1.16.4</lombok.version>
<hibernate-jpa-2.0-api.version>1.0.1.Final</hibernate-jpa-2.0-api.version>
<commons-lang.version>2.6</commons-lang.version>
<commons-validator.version>1.4.0</commons-validator.version>
<commons-collections.version>3.2.1</commons-collections.version>
<commons-logging.version>1.1.1</commons-logging.version>
<commons-fileupload.version>1.2.2</commons-fileupload.version>

<!-- Email -->
<javax-mail.version>1.4.5</javax-mail.version>
<xmlworker.version>5.4.1</xmlworker.version>

<jbpm-bpmn2.version>6.2.0.Final-redhat-4</jbpm-bpmn2.version>
<jbpm-bpmn2.patch.version>6.2.0.Final-redhat-4</jbpm-bpmn2.patch.version>
<kie.version>6.2.0.Final-redhat-4</kie.version>
<drools-persistence-jpa.version>6.2.0.Final-redhat-4</drools-persistence-jpa.version>
<drools.version>6.2.0.Final-redhat-4</drools.version>
<drools.patch.version>6.2.0.Final-redhat-4</drools.patch.version>

<aspectj.version>1.6.11</aspectj.version>
<jsoup.version>1.6.1</jsoup.version>

<omega2.version>2.clmptf.40</omega2.version>

</properties>

<!-- ===== -->
<!-- Build -->
<!-- ===== -->
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
</plugin>

<!-- PMD & checkstyles configuration -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<wtpversion>2.0</wtpversion>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xms512m -Xmx1024m -XX:MaxPermSize=512m</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<resources>
<resource>
<directory>src\main\resources\config</directory>
<filtering>true</filtering>
<includes>
<include>config.properties</include>
</includes>
<targetPath>\config</targetPath>
</resource>
<resource>
<directory>src\main\resources</directory>
<filtering>false</filtering>
</resource>
</resources>
</build>

属性文件

#Version
version=${omega.version}

${omega.version} 的值没有被替换。有人可以帮我吗?

问候高拉夫

最佳答案

<filtering>false</filtering>

将值更改为 true

关于java - maven 进程资源不会替换 Linux 上属性文件中的占位符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36353473/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com