Pipeline running with error
Asked by boomramada:

Hi there,

This is my pipeline script

image: maven:3.6.3

```
pipelines:

default:

 - parallel:

 - step:

name: Build and Test

caches:

 - maven

script:

 - mvn -X -e -B verify --file pom.xml

artifacts: # defining the artifacts to be passed to each future step.

 - dist/**

 - reports/*.txt

 - target/surefire-reports

after-script:

# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.

 - pipe: atlassian/checkstyle-report:0.3.0

 - step:

name: Security Scan

script:

# Run a security scan for sensitive data.

 - pipe: atlassian/git-secrets-scan:0.5.1
```

But I'm getting following error  
[INFO] Scanning for projects...  
[ERROR] [ERROR] Some problems were encountered while processing the POMs:  
[FATAL] Non-readable POM /opt/atlassian/pipelines/agent/build/pom.xml: /opt/atlassian/pipelines/agent/build/pom.xml (No such file or directory) @  
@  
[ERROR] The build could not read 1 project -> [Help 1]  
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:  
[FATAL] Non-readable POM /opt/atlassian/pipelines/agent/build/pom.xml: /opt/atlassian/pipelines/agent/build/pom.xml (No such file or directory) @  
at [org.apache.maven.project.DefaultProjectBuilder.build](http://org.apache.maven.project.defaultprojectbuilder.build/) ([DefaultProjectBuilder.java:397](http://defaultprojectbuilder.java:397/))  
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects ([DefaultGraphBuilder.java:414](http://defaultgraphbuilder.java:414/))  
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor ([DefaultGraphBuilder.java:405](http://defaultgraphbuilder.java:405/))  
at [org.apache.maven.graph.DefaultGraphBuilder.build](http://org.apache.maven.graph.defaultgraphbuilder.build/) ([DefaultGraphBuilder.java:82](http://defaultgraphbuilder.java:82/))  
at org.apache.maven.DefaultMaven.buildGraph ([DefaultMaven.java:507](http://defaultmaven.java:507/))  
at org.apache.maven.DefaultMaven.doExecute ([DefaultMaven.java:219](http://defaultmaven.java:219/))  
at org.apache.maven.DefaultMaven.doExecute ([DefaultMaven.java:192](http://defaultmaven.java:192/))  
at org.apache.maven.DefaultMaven.execute ([DefaultMaven.java:105](http://defaultmaven.java:105/))  
at org.apache.maven.cli.MavenCli.execute ([MavenCli.java:957](http://mavencli.java:957/))  
at org.apache.maven.cli.MavenCli.doMain ([MavenCli.java:289](http://mavencli.java:289/))  
at org.apache.maven.cli.MavenCli.main ([MavenCli.java:193](http://mavencli.java:193/))  
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)  
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke ([NativeMethodAccessorImpl.java:78](http://nativemethodaccessorimpl.java:78/))  
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ([DelegatingMethodAccessorImpl.java:43](http://delegatingmethodaccessorimpl.java:43/))  
at java.lang.reflect.Method.invoke ([Method.java:567](http://method.java:567/))  
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ([Launcher.java:282](http://launcher.java:282/))  
at org.codehaus.plexus.classworlds.launcher.Launcher.launch ([Launcher.java:225](http://launcher.java:225/))  
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ([Launcher.java:406](http://launcher.java:406/))  
at org.codehaus.plexus.classworlds.launcher.Launcher.main ([Launcher.java:347](http://launcher.java:347/))  
[ERROR]  
[ERROR] The project (/opt/atlassian/pipelines/agent/build/pom.xml) has 1 error  
[ERROR] Non-readable POM /opt/atlassian/pipelines/agent/build/pom.xml: /opt/atlassian/pipelines/agent/build/pom.xml (No such file or directory)  
java.io.FileNotFoundException: /opt/atlassian/pipelines/agent/build/pom.xml (No such file or directory)  
at java.io.FileInputStream.open0 (Native Method)  
at [java.io.FileInputStream.open](http://java.io.fileinputstream.open/) ([FileInputStream.java:211](http://fileinputstream.java:211/))  
at java.io.FileInputStream.<init> ([FileInputStream.java:153](http://fileinputstream.java:153/))  
at org.apache.maven.building.FileSource.getInputStream ([FileSource.java:52](http://filesource.java:52/))  
at org.apache.maven.model.building.DefaultModelBuilder.readModel ([DefaultModelBuilder.java:552](http://defaultmodelbuilder.java:552/))  
at [org.apache.maven.model.building.DefaultModelBuilder.build](http://org.apache.maven.model.building.defaultmodelbuilder.build/) ([DefaultModelBuilder.java:281](http://defaultmodelbuilder.java:281/))  
at [org.apache.maven.project.DefaultProjectBuilder.build](http://org.apache.maven.project.defaultprojectbuilder.build/) ([DefaultProjectBuilder.java:448](http://defaultprojectbuilder.java:448/))  
at [org.apache.maven.project.DefaultProjectBuilder.build](http://org.apache.maven.project.defaultprojectbuilder.build/) ([DefaultProjectBuilder.java:414](http://defaultprojectbuilder.java:414/))  
at [org.apache.maven.project.DefaultProjectBuilder.build](http://org.apache.maven.project.defaultprojectbuilder.build/) ([DefaultProjectBuilder.java:377](http://defaultprojectbuilder.java:377/))  
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects ([DefaultGraphBuilder.java:414](http://defaultgraphbuilder.java:414/))  
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor ([DefaultGraphBuilder.java:405](http://defaultgraphbuilder.java:405/))  
at [org.apache.maven.graph.DefaultGraphBuilder.build](http://org.apache.maven.graph.defaultgraphbuilder.build/) ([DefaultGraphBuilder.java:82](http://defaultgraphbuilder.java:82/))  
at org.apache.maven.DefaultMaven.buildGraph ([DefaultMaven.java:507](http://defaultmaven.java:507/))  
at org.apache.maven.DefaultMaven.doExecute ([DefaultMaven.java:219](http://defaultmaven.java:219/))  
at org.apache.maven.DefaultMaven.doExecute ([DefaultMaven.java:192](http://defaultmaven.java:192/))  
at org.apache.maven.DefaultMaven.execute ([DefaultMaven.java:105](http://defaultmaven.java:105/))  
at org.apache.maven.cli.MavenCli.execute ([MavenCli.java:957](http://mavencli.java:957/))  
at org.apache.maven.cli.MavenCli.doMain ([MavenCli.java:289](http://mavencli.java:289/))  
at org.apache.maven.cli.MavenCli.main ([MavenCli.java:193](http://mavencli.java:193/))  
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)  
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke ([NativeMethodAccessorImpl.java:78](http://nativemethodaccessorimpl.java:78/))  
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ([DelegatingMethodAccessorImpl.java:43](http://delegatingmethodaccessorimpl.java:43/))  
at java.lang.reflect.Method.invoke ([Method.java:567](http://method.java:567/))  
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ([Launcher.java:282](http://launcher.java:282/))  
at org.codehaus.plexus.classworlds.launcher.Launcher.launch ([Launcher.java:225](http://launcher.java:225/))  
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ([Launcher.java:406](http://launcher.java:406/))  
at org.codehaus.plexus.classworlds.launcher.Launcher.main ([Launcher.java:347](http://launcher.java:347/))  
[ERROR]  
[ERROR]


Answers:
author: Pramodh M
body: Hi [@boomramada](/t5/user/viewprofilepage/user-id/2131914)

It looks like your working directory is different from where the project is building the maven project. You should navigate to the directory where your project contains pom.xml file

Can you try the below Snippet and let me know if it works?

<https://gist.github.com/64BitChris/de10c2f3d85b65000f2a96ef549d261b>

Thanks,  
Pramodh

comments: author: boomramada
body: I cant run that, it says I cant find the create-settings.sh


Tags: bitbucket-cloud

bitbucket-pipelines

cloud