I took a look at the Maven Pipeline documentation again.
For Windows it says to use bat, not sh. I tried that, and got a little bit 
closer, but now it cannot find JAVA_HOME

----- withMaven Wrapper script -----

Error: JAVA_HOME is set to an invalid directory. 
JAVA_HOME = "/usr/java/jdk1.8.0_102" 
Please set the JAVA_HOME variable in your environment to match the 
location of your Java installation. 


Jenkins have jdk set at /usr/java/jdk1.8.0_102 and I have created a symlink 
in my Cygwin
jdk1.8.0_102 -> /cygdrive/c/Program Files/Java/jdk1.8.0_121
Windows environment variable JAVA_HOME is set to C:\Program 
Files\Java\jdk1.8.0_121

mandag 11. september 2017 08.07.21 UTC+2 skrev Sverre Moe følgende:
>
> I have connected a Windows slave to Jenkins with SSH+Cygwin.
> So running shell scripts like "sh 'mvn'" should work as I do it locally on 
> the Windows.
>
> Running withMaven fails, and I cannot figure our why.
>
> [Pipeline] node
> Running on master-windows-x86_64 in 
> /home/username/workspace/myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ
> [Pipeline] {
> [Pipeline] stage
> [Pipeline] { (Checkout-Windows)
> [Pipeline] checkout
>  > git rev-parse --is-inside-work-tree # timeout=10
> Fetching changes from the remote Git repository
>  > git config remote.origin.url ssh://
> g...@git.company.com/software/myApp.git # timeout=10
> Fetching without tags
> Fetching upstream changes from ssh://
> g...@git.company.com/software/myApp.git
>  > git --version # timeout=10
>  > git fetch --no-tags --progress ssh://
> g...@git.company.com/software/myApp.git +refs/heads/*:refs/remotes/origin/*
> Checking out Revision 05cf171deb903a01b5880c30de28d4b1865e3ed5 
> (username/work)
> Commit message: "Test Windows build on Jenkins"
>  > git config core.sparsecheckout # timeout=10
>  > git checkout -f 05cf171deb903a01b5880c30de28d4b1865e3ed5
>  > git rev-list f9db8914f5688ca74e571dd1104c279f207bf435 # timeout=10
> [Pipeline] }
> [Pipeline] // stage
> [Pipeline] stage
> [Pipeline] { (Build-Windows)
> [Pipeline] withMaven
> [withMaven] Options: []
> [withMaven] Available options: 
> [withMaven] use JDK installation jdk1.8
> $ where mvn.cmd
> [withMaven] use Maven installation provided by the build agent with 
> executable 
> C:\Users\username.POLAR\Downloads\apache-maven-3.3.9-bin\apache-maven-3.3.9\bin\mvn.cmd
> [Pipeline] {
> [Pipeline] sh
> [myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ] 
> Running shell script
> sh: 
> /home/username/workspace/myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ@tmp/durable-ff9c24b3/pid:
>  
> No such file or directory
> sh: 
> /home/username/workspace/myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ@tmp/durable-ff9c24b3/jenkins-log.txt:
>  
> No such file or directory
> sh: 
> /home/username/workspace/myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ@tmp/durable-ff9c24b3/jenkins-result.txt:
>  
> No such file or directory
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/96c3a3ff-30c5-4646-991c-495c529657aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to