IOS(Appium) + Maven+Jenkins issue

Hi All,

I am trying to run my maven project(IOS) using Jenkins, but I was not able to run the same.

I was able to run Maven Project(Android) using Jenkins successfully but facing a problem with IOS. Every time I am getting issues with POM.Xml file.

Getting this error on console output page :

Started by user admin
Building in workspace /Users/Shared/Jenkins/Home/workspace/IOS
Parsing POMs
ERROR: No such file /Users/amit/Documents/workspace/b…
Perhaps you need to specify the correct POM file path in the project configuration?
Finished: FAILURE

Can anybody please help me, I am placing the POM.XML same location in Jenkins as i was placing at the time of running android app.


how you start your project in command line?

@Aleksei I am running my maven project from command line using Goals

MVN clean test

and its running fine from command line but the problem I am facing when I am running from Jenkins using pom.xml file

@Sanjay_Sharma that is correct. now how Jenkins configured? Is it slave where you running code? Who you getting test code - git pull?

before starting tests check put before:

mvn clean test

check output to see that you are in correct folder

@Aleksei I am running jenkins from my local machine and the output of all the commands is correct, the only problem is with the complete path which I am giving for POM.XML in jenkins.

Need to provide relative or absolute path?

@Sanjay_Sharma i did not understand where are you going to provide path to “pom.xml” ? “pom.xml” is in core folder of your same folder your are giving “mvn clean test”.

example of some test project - see pom.xml is in core folder of “GoogleTest”. in Same folder you should start tests.

@Aleksei see this attached screenshot, where I want to give the complete pom.xml path in jenkins.

ok i got your idea. you DO NOT want to get code in “JENKINS JOB” workspace but want to start tests in your current folder.

i suggest to replace “build” step build “execute shell”. in step add two lines:

cd navitate_to_the_folder_where_the_code_is
mvn clean test


Keep the path of our pom.xml like this my-project/pom.xml
under Root POM under “Build”
Amarnath Rayudu


I am doing the same, see the below screenshot for the error I am getting.

I tried relative path as well as absolute path both in ROOT POM under build. The same format when i was giving to run android app, the same path was working but i don’t know why it is not working in case of IOS.


@Sanjay_Sharma your jenkins workspace is in different path. try mine suggestion execute in shell with navigating to needed folder first.


I have faced the exact issue when running the maven project from jenkins.

1.Before giving the project pom.xml in jenkins. please change the user permissions of your project to jenkins using the command in terminal(sudo chown -R jenkins:jenkins ProjectFolderName)

2.Then build your project from jenkins.

Please do not use absolute path … just start from my-project/pom.xml. You can pm me if needed.
The below one works for me.

@Aleksei I tried your solution also but same issue.

@AmarnathRayudu I tried this also, I will give one more try for this.


you can pm me if needed @ [email protected]

Correct indeed. In execute shell option, we can specify the project_directory to be cd’ed.

Can you kindly ping the absolute path of the project here. It seems that you’ve included the path as /Users/amit/Documents/workspace/<>/pom.xml. Please double verify the absolute path of the pom.xml.

I assume the correct path would be - /users/amit/documents/workspace/root-folder-of-project/pom.xml.

Or kindly set PROJECT_HOME value in the jenkins config page pointing to project_home and use the same variable to get the pom.xml i.e $PROJECT_HOME/pom.xml

Hope this helps !!!

@Karthik_Sriharsha it is all working for me in jenkins :slight_smile: . i run just as “mvn clean…” cause i pull from git mine code into jenkins job workspace (not as @Sanjay_Sharma does)

Sorry !!! Forgot to add – @Sanjay_Sharma after the first line :slight_smile:

@Aleksei : Everything works fine for you :slight_smile:

@Aleksi Today I created freestyle project and under Add build step I passed my this command by choosing Execute Shell

cd /Users/username/Documents/workspace/
mvn clean test

I tried with this also

cd /Users/username/Documents/workspace/
mvn clean test

but everytime I got this

Started by user admin
Building in workspace /Users/Shared/Jenkins/Home/workspace/freemaven
[freemaven] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/

  • cd /Users/username/Documents/workspace/
    /Users/Shared/Jenkins/tmp/ line 2: cd: /Users/username/Documents/workspace/ Not a directory
    Build step ‘Execute shell’ marked build as failure
    Finished: FAILURE

Can you please look into this.