this을 (를) 참조하십시오. 여기에 properties-maven-plugin이 있습니다.
에게 당신은 내가 그루비 플러그인 내가 쓴 작은 스크립트를 사용하는 것이 좋습니다 수있는 것보다, .properties의 파일을 사용하지 않도록하고 싶은 경우 :
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<properties>
<header_file>header.html</header_file>
</properties>
<source>
def file = new File(project.properties.header_file)
project.properties.header_content = file.getText()
</source>
</configuration>
</execution>
</executions>
</plugin>
이 플러그인의 실행 후를, header.html
파일 내용이 들어있는 ${header_content}
속성을 참조 할 수 있어야합니다.
브렌든, 해결책이 효과가 있습니까? 나는 그것을 직접 시도 할 기회가 없었다. –