I have already configured job with maven command as "clean install -Psample" (sample is my profile name in pom.xml as shown below) . But I started running the build it is giving issue as " Non-readable POM /appl/bamboo-agent/xml-data/build-dir/project/pom.xml (No such file or directory) The build could not read the project [Help 1]"
1) How to configure bamboo job to generate maven build ?
2) How to run build with sample profile as shown below ?
3) Can we run "clean install" only to generate bamboo build ?
Below is my pom.xml
<profile>
<id>sample</id>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<goals>
<goal>exec</goal>
</goals>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
Hello @pp
Welcome to the Atlassian Community!
The error message you're encountering, Non-readable POM /appl/bamboo-agent/xml-data/build-dir/project/pom.xml (No such file or directory)
, indicates that the Maven build process cannot find or access the pom.xml
file in the specified directory.
Post checking the pom.xml that you have provided profiles do not directly contain groupId
and artifactId
elements. Instead, these should be part of a <plugin>
configuration within a <plugins>
element.
<profile> <id>sample</id> <activation> <activeByDefault>true</activeByDefault> </activation> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>
exec-maven-plugin</artifactId>
<version>1.6.0</version> <!-- Specify the version you're using -->
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
To answer your next query:
How to configure bamboo job to generate maven build ?
Please refer a Document which describe how to configure bamboo task to use Maven.
2) How to run build with sample profile as shown below ?
To run your Maven build with a specific profile, such as the "sample" profile you mentioned, you would include the profile in the "Goal" field of your Maven task configuration as you did:
In the "Goal" field, append -Psample
to your existing command, making it clean install -Psample
.
3) Can we run "clean install" only to generate bamboo build ?
clean
goal will ensure that any previously compiled files or test results are removed, providing a fresh start for the build. The install
goal compiles your project's code, packages it into a distributable format (like a JAR), and then installs it into your local Maven repository.Hello ,
I tried with above solutions but it is failing again. I have changed my pom.xml involving <plugin></plugin> as well. but no success.
I am using maven version 3.0.5 locally as per requirement. I am unable to upgrade it. On bamboo , I am configuring maven version 3.9.6. Is this main reason for my build failure ?
1. I am unable to run bamboo build with maven 3.0.5 same as local. When I start to run it, it taking too much time & getting failed. How to resolve this ? It was showing bamboo agent can not support this job.
2. When I trying to upgrade maven locally my application getting failed. What need to add locally so that I can run with bamboo ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.