ビルド時に gmaven-plugin を使用してシステム プロパティを設定しようとしています。
ただし、プロパティの結果は、Linux とウィンドウのビルド環境で異なります。
Linux 環境では、二重引用符文字列があります。しかし、窓はそうではありません。
なぜ結果が異なるのですか?答えていただけますか?
build result
linux : ### commitId : "8def4294ccb346795bd9682b5bcb9174bc64d78f"
window : ### commitId : 8def4294ccb346795bd9682b5bcb9174bc64d78f
ポンポン:
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<properties>
<script>git log -n1 --pretty=format:"%H" web/</script>
</properties>
<source>
def command = project.properties.script
def process = command.execute()
process.waitFor()
project.properties.setProperty('commitId', process.in.text.trim())
println '### commitId : ' + project.properties.commitId
</source>
</configuration>
</execution>
</executions>
</plugin>