maven - Bug in gmaven-plugin execute goal (using by groovy) -


i try set system property using gmaven-plugin in build time.

but property result diffrent in linux , window build environment.

in linux environment, have double quote string. window not.

why result different? answer me please?

build result linux : ### commitid : "8def4294ccb346795bd9682b5bcb9174bc64d78f" window : ### commitid : 8def4294ccb346795bd9682b5bcb9174bc64d78f  

pom:

<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> 

groovy script have problem.

so need split parameter this.

def = ['git', 'log', "-n1" , "--pretty=format:%h", 'web/'].execute().text.trim()


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -