In bamboo plan ,I have added a Maven 1.x task and then I added the executable by giving the path as "/usr/local/src/apache-maven".
But build is failing with below error.
simple 27-Jun-2019 14:20:21 Starting task 'Maven 1.x' of type 'com.atlassian.bamboo.plugins.maven:task.builder.maven' error 27-Jun-2019 14:20:21 Unable to find executable at /usr/local/src/apache-maven/bin/maven. Will try to run it anyway. command 27-Jun-2019 14:20:21 Beginning to execute external process for build 'Knowledge Base for Jira - myPlugin - Default Job #40 (KBFJ-MYP-JOB1-40)'\n ... running command line: \n/usr/local/src/apache-maven/bin/maven -Djava.io.tmpdir=/home/opt/atlassian/bamboo/atlassian-bamboo-6.9.1/temp/KBFJ-MYP-JOB1 clean test\n ... in: /home/var/atlassian/application-data/bamboo-home/xml-data/build-dir/KBFJ-MYP-JOB1\n ... using extra environment variables: \nbamboo_planRepository_1_branch=master\nbamboo_planRepository_1_branchDisplayName=master\nbamboo_repository_revision_number=ac773fec33fd36762af446e97f3eb6a05b516048\nbamboo_resultsUrl=http://10.19.1.59:8085/browse/KBFJ-MYP-JOB1-40\nbamboo_repository_557058_previous_revision_number=ac773fec33fd36762af446e97f3eb6a05b516048\nbamboo_repository_557058_name=myPlugin\nbamboo_build_working_directory=/home/var/atlassian/application-data/bamboo-home/xml-data/build-dir/KBFJ-MYP-JOB1\nbamboo_planRepository_1_name=myPlugin\nbamboo_buildKey=KBFJ-MYP-JOB1\nbamboo_shortPlanName=myPlugin\nMAVEN_HOME=/usr/local/src/apache-maven\nbamboo_repository_557058_git_repositoryUrl=ssh://git@127.0.0.1:7999/kbj/myplugin.git\nbamboo_planRepository_name=myPlugin\nbamboo_buildNumber=40\nbamboo_shortJobName=Default Job\nbamboo_buildResultsUrl=http://10.19.1.59:8085/browse/KBFJ-MYP-JOB1-40\nbamboo_planRepository_repositoryUrl=ssh://git@127.0.0.1:7999/kbj/myplugin.git\nbamboo_agentId=360449\nbamboo_planName=Knowledge Base for Jira - myPlugin\nbamboo_shortPlanKey=MYP\nbamboo_shortJobKey=JOB1\nbamboo_planRepository_revision=ac773fec33fd36762af446e97f3eb6a05b516048\nbamboo_buildTimeStamp=2019-06-27T14:20:20.315+05:30\nbamboo_repository_previous_revision_number=ac773fec33fd36762af446e97f3eb6a05b516048\nbamboo_planRepository_previousRevision=ac773fec33fd36762af446e97f3eb6a05b516048\nbamboo_build_commandline_com_atlassian_bamboo_plugins_scripttask_task_builder_script_4=/bin/sh /home/var/atlassian/application-data/bamboo-home/temp/KBFJ-MYP-JOB1-40-ScriptBuildTask-7753337531297596932.sh\nbamboo_repository_git_branch=master\nbamboo_buildResultKey=KBFJ-MYP-JOB1-40\nbamboo_repository_branch_name=master\nbamboo_buildPlanName=Knowledge Base for Jira - myPlugin - Default Job\nbamboo_planRepository_1_revision=ac773fec33fd36762af446e97f3eb6a05b516048\nbamboo_repository_557058_revision_number=ac773fec33fd36762af446e97f3eb6a05b516048\nbamboo_repository_name=myPlugin\nJAVA_HOME=/usr\nbamboo_dependenciesDisabled=false\nbamboo_buildFailed=false\nbamboo_repository_557058_git_username=\nbamboo_capability_system_builder_maven_Maven=/usr/local/src/apache-maven\nbamboo_planRepository_branch=master\nbamboo_agentWorkingDirectory=/home/var/atlassian/application-data/bamboo-home/xml-data/build-dir\nbamboo_capability_system_git_executable=/usr/bin/git\nbamboo_repository_557058_branch_name=master\nbamboo_repository_git_username=\nbamboo_planRepository_1_previousRevision=ac773fec33fd36762af446e97f3eb6a05b516048\nbamboo_planRepository_branchDisplayName=master\nbamboo_planRepository_1_type=bbserver\nbamboo_planRepository_branchName=master\nbamboo_repository_557058_git_branch=master\nbamboo_capability_system_jdk_JDK=/usr\nbamboo_plan_storageTag=plan-589825\nbamboo_hg_cache_directory=/home/var/atlassian/application-data/bamboo-home/xml-data/build-dir/_hg-repositories-cache\nbamboo_planRepository_1_username=\nbamboo_planRepository_type=bbserver\nbamboo_git_cache_directory=/home/var/atlassian/application-data/bamboo-home/xml-data/build-dir/_git-repositories-cache\nbamboo_ManualBuildTriggerReason_userName=admin\nbamboo_repository_git_repositoryUrl=ssh://git@127.0.0.1:7999/kbj/myplugin.git\nuseMavenReturnCode=false\nbamboo_capability_system_builder_node_Node_js=/usr/local/bin/node\nbamboo_capability_system_builder_mvn3_Maven_3=/usr/local/src/apache-maven\nbamboo_tmp_directory=/home/var/atlassian/application-data/bamboo-home/temp\nbamboo_working_directory=/home/var/atlassian/application-data/bamboo-home/xml-data/build-dir/KBFJ-MYP-JOB1\nbamboo_planKey=KBFJ-MYP\nbamboo_planRepository_1_repositoryUrl=ssh://git@127.0.0.1:7999/kbj/myplugin.git\nbamboo_planRepository_username=\nbamboo_capability_system_jdk_JDK_1_8=/usr\nbamboo_capability_system_jdk_JDK_1_8_0_201=/usr\nbamboo_planRepository_1_branchName=master\nPATH=/usr/bin:/opt/atlassian-plugin-sdk/bin:/opt/atlassian-plugin-sdk/apache-maven/bin/:/usr/bin:/usr/local/src/node-v10.14.2-linux-x64/bin:/usr/local/src/apache-maven/bin:/usr/bin:/usr/local/git/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/admin/.local/bin:/home/admin/bin:/bin\n simple 27-Jun-2019 14:20:21 Failing task since return code of [/usr/local/src/apache-maven/bin/maven -Djava.io.tmpdir=/home/opt/atlassian/bamboo/atlassian-bamboo-6.9.1/temp/KBFJ-MYP-JOB1 clean test] was -1 while expected 0 simple 27-Jun-2019 14:20:21 Parsing test results under /home/var/atlassian/application-data/bamboo-home/xml-data/build-dir/KBFJ-MYP-JOB1...
Here bamboo is searching for the executable file in "/usr/local/src/apache-maven/bin/maven" but it should be "/usr/local/src/apache-maven/bin/mvn".
From where bamboo is appending "/bin/maven" instead of appending "/bin/mvn"??
Can anyone please help me to resolve this issue?
Operating system : Linux 3.10.0-862.el7.x86_64
Bamboo version - 6.9.1
Thanks and Regards
Sushma Javagal
Hi @Sushma
Testing Bamboo 6.9.1 I was able to reproduce the same behavior you have when using the Maven 1.x task. If I change the task to Maven 2.x I can see Bamboo is appending with /bin/mvn.
I was able to run Bamboo 5.15.3 for example and I see the same behavior. I would guess that older versions of maven are delivered with the name maven instead of mvn.
Is it possible that you are not using a maven 1.x version? Or even missing a link?
Please let me know your thoughts after what I shared.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.