none
Jenkins maven build error RRS feed

  • Question

  • Hi  I am following through with Plural sight course on Jenkins;Jenkins2/ spring-boot; I forked the git repo and then cloned it in c:\users\me\test; I can compile and package the app in git directory  using installed maven 3.5.2; I have jenkins under Program Files(x86)/jenkins; I created job ( atmosphere) using git source code and have it in workspace successfully.However 

    I cannot do build step from jenkins I get error:"[atmosphere] $ cmd.exe /C "mvn -f spring-boot-samples\spring-boot-sample-atmosphere\pom.xml package && exit %%ERRORLEVEL%%"
    \Jenkins\workspace\atmosphere\spring-boot-samples\spring-boot-sample-atmosphere was unexpected at this time.
    Build step 'Invoke top-level Maven targets' marked build as failure
    Finished: FAILURE

    I can get successful build if I provide the pom.xml  in my cloned git  as POM file in build configuration as users/me/../.../pom.xml; I can also get Packaging step right  but I cannot  do the archive artifacts step (this needs the .jar to be inside jenkins workspace)
    I tried build from cmd using the pom in jenkins workspace I get the same error
    I tried to  install   version 3.5.2  of maven in jenkins as suggested solution in similar stackoverflow post but it did not help either; I am hoping some one has the solution

    Saturday, April 28, 2018 6:35 PM

Answers

  • i removed  pom.xml from POM file in build step and it worked

    POM  spring-boot-samples\spring-boot-sample-atmosphere    without pom.xml

    • Marked as answer by kobosh Sunday, April 29, 2018 6:44 AM
    Sunday, April 29, 2018 6:44 AM