尝试使maven属性从用户帐户插入读取文件,但看起来我必须对完整路径进行硬编码:(
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<phase>pre-clean</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>~/jboss.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
答案 0 :(得分:0)
使用$ {user.home}
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<phase>pre-clean</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${user.home}/jboss.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>