shell - I want to execute a cygwin script from maven's pom.xml -
i need execute shell script under cygwin, because i'm under windows. shell executed commands arent' recognize ... see below :
<build> <plugins>         <plugin>         <artifactid>maven-antrun-plugin</artifactid>         <version>1.7</version>         <executions>            <execution>                     <id>openocd</id>                     <phase>validate</phase>                     <configuration combine.self="override">                         <tasks>                             <exec                             executable="c:/cygwin/bin/sh.exe"                             failonerror="true">                             <arg line="${project.basedir}/make.sh" />                             </exec>                         </tasks>                     </configuration>                     <goals>                         <goal>run</goal>                     </goals>                 </execution>         </executions>         </plugin>     </plugins> </build> the make.sh moment doesn't seem complicated :
 #!/bin/sh   export path=c:\cygwin\bin:$path export bla=c:\blabla cd $bla mkdir testmaven and maven, via eclipse information command run ...maven install :
 [info] executing tasks   main:  [exec] c:bla  [exec]       c:\users\truc\testswmavensouskepler\pouet\bla/make.sh: line 6: mkdir: command not found  [info] ------------------------------------------------------------------------  [info] build failure do have idea ? thank :)
c:\cygwin\bin\bash make.sh run linux commands can use run shell script file. tasks tag(<task>) deprecated should use target(<target>) instead. ideally below code should work. can add can add between <target> , </target> in build.xml(this used ant).
<target>     <exec executable="c:\cygwin\bin\bash">     <arg value="${project.basedir}/make.sh"/> </target> make sure c:\cygwin\bin\bash make.sh working fine. 
Comments
Post a Comment