Maven task fail with Could not find or load main class
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Maven task fail with the following appears in the build log:
error 08-Mar-2019 09:19:15 Error: Could not find or load main class xxx.xxx.xxxCause
Maven executable in Agent Capabilities isn't configured with the real Maven Home, for example /usr (incorrect setting).
Resolution
Navigate to
Administration > Build Resources > AgentsClick on the related agent name
In the
Capabilitiestab, edit the Maven executable path to the real Maven Home
Was this helpful?