0
votes

Am trying to integrate Jenkins with Maven without Plugin -

I created Simple Maven Job with Build step 'Invoke top-level Maven targets' -

Build Failed with below error -

[WS-CLEANUP]    Deleting project workspace...
[WS-CLEANUP]    Deferred wipeout is used...
[WS-CLEANUP]    Done 
[MavenJob] $ cmd.exe /C "mvn -f C:\Users\sony\eclipse-workspace\jenkins\pom clean test package && exit %%ERRORLEVEL%%" 
POMM file "C:\Users\sony\eclipse-workspace\jenkins\pom" specified the -f/--file command-line argument does not exist 
Build step 'Invoke top-level Maven targets' marked build as failure 
Finished: FAILURE

console output

please help

1
is the file called pom or pom.xml? Error says file called "pom" is not found. Also, do not post pictures of text; it's hard to read and search engines don't see it. Just post the text (markdown formatted as code). - Ian W
its pom file...and the error is - - Jayasree Sivaraj
error -Pom file 'C:\Users\..........pom' specified the -f/--file command-line argument does not exist - Jayasree Sivaraj
Right. the error is saying the file for the -f/--file command-line argument at "C:\Users\sony\eclipse-workspace\jenkins\pom" does not exist. You either have the path wrong or are missing the file extension. Is the file there? - Ian W
actually wen i create maven project in eclipse all works fine...but integrating with jenkins through maven integration plugin...all my files including pom gets deleted automatically.below is the configuration that i made in Jenkins - In build section set Maven Version,root pom - Pom.xml,goal & option - clean test package.Use custom workspace directory - my pom file location.Maven and JDK installation made on tool configuration - Jayasree Sivaraj

1 Answers

0
votes

Method of 'Jenkins Integration with Maven' using maven integration plugin ,I have selected 'Delete workspace before build starts' in Build Environment section of configure page.

This made my entire content of the maven project folder empty.

Wen I Deselected "Delete workspace before build starts,then clicked Build Now.Build was successful...

Hope this can help some one....