I’m having trouble with Jira’s dependency management. My setup includes a configured repository that mirrors data from the main server. It’s working fine as a secure gateway.
The issue is that Jira seems to be trying to connect directly to the server while also using the repository. I thought Maven handled network connections in Jira, but maybe I’m mistaken?
Here’s a snippet of my Maven settings.xml file:
<profile>
<repositories>
<repository>
<id>local-mirror</id>
<url>http://localhost:8080/mirror</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local-plugins</id>
<url>http://localhost:8080/plugins</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<id>local-profile</id>
</profile>
Can anyone help me understand why Jira is behaving this way and how to fix it?
I’ve encountered this issue before, and it’s often related to how Jiva interprets Maven settings. One solution that worked for me was explicitly defining the mirror in the Jira configuration file.
Navigate to your Jira installation directory and locate the ‘atlassian-jira/WEB-INF/classes’ folder. Create or edit a file named ‘jira-config.properties’ and add this line:
maven.repositories.additional=http://localhost:8080/mirror
This forces Jira to use your specified mirror for all dependencies. Remember to restart Jira after making these changes.
Additionally, check if you have any system environment variables or JVM arguments that might be overriding your Maven settings. Sometimes, these can take precedence and cause unexpected behavior.
hey, i’ve seen this problem b4. try adding this to ur pom.xml:
central
http://localhost:8080/mirror
this should force jira to use only ur mirror. also, check if theres any proxy settings messing things up. good luck!
I’ve dealt with similar issues in Jira before, and it can be frustrating. From my experience, the problem might be that your Maven settings aren’t being picked up by Jira correctly. Here’s what worked for me:
First, make sure your settings.xml file is in the right location. For Jira, it should be in the .m2 directory of the user running Jira.
Next, you might want to add a mirror configuration to your settings.xml. This tells Maven to use your mirror for all repositories:
<mirrors>
<mirror>
<id>local-mirror</id>
<url>http://localhost:8080/mirror</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
Also, double-check that your Jira instance is actually using the Maven settings you think it is. Sometimes, especially in server environments, the paths can get mixed up.
If all else fails, you might need to set the Maven options directly in Jira’s startup script. Look for the MAVEN_OPTS environment variable and add -Dmaven.repo.local=/path/to/your/local/repo.
Hope this helps! Let me know if you need any clarification.