Maven构建JIRA插件报错:无法找到Atlassian相关包依赖
Hey there, even though you’re not a Java dev, let’s work through this Maven build issue step by step. The core problem here is that Atlassian’s official Maven plugins (like maven-jira-plugin) aren’t hosted on the default public Maven Central repository—Maven can’t find the 6.3.15 version because it doesn’t know where to look for it. Here’s how to fix this:
1. Add Atlassian’s Maven repositories to your global settings.xml
Maven uses the settings.xml file to manage repository configurations. You’ll need to add Atlassian’s private repositories here so Maven can pull the required plugin:
- Locate your Maven settings file: it’s usually at
~/.m2/settings.xml(Linux/macOS) orC:\Users\<your-username>\.m2\settings.xml(Windows). If it doesn’t exist, create a new file with that name. - Insert the following configuration inside the
<settings>tag:
<profiles> <profile> <id>atlassian-repositories</id> <repositories> <repository> <id>atlassian-public</id> <url>https://packages.atlassian.com/maven/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>warn</checksumPolicy> </snapshots> <releases> <enabled>true</enabled> <checksumPolicy>warn</checksumPolicy> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>atlassian-public</id> <url>https://packages.atlassian.com/maven/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>warn</checksumPolicy> </snapshots> <releases> <enabled>true</enabled> <checksumPolicy>warn</checksumPolicy> </releases> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>atlassian-repositories</activeProfile> </activeProfiles>
2. Alternative: Add repositories directly to your project’s pom.xml
If you don’t want to modify your global Maven settings, you can add the repositories directly to your project’s pom.xml. Insert this code inside the <project> tag:
<repositories> <repository> <id>atlassian-public</id> <url>https://packages.atlassian.com/maven/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>atlassian-public</id> <url>https://packages.atlassian.com/maven/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> </snapshots> <releases> <enabled>true</enabled> </releases> </pluginRepository> </pluginRepositories>
3. Clean and rebuild your project
Now that Maven knows where to find the plugin, clear any cached artifacts and run the build again:
mvn clean install
Quick extra note
If you still hit issues, double-check that the plugin version 6.3.15 matches the JIRA version you’re targeting. The project you’re working with specifies this version, so it should work once the repository is configured correctly. If you’re aiming for a newer JIRA version, you might need to update the plugin version in your pom.xml—but let’s get the repository issue sorted first.
内容的提问来源于stack exchange,提问作者Jimy Weiss

