Maven setup for SDK and FastDev

Hi,

This issue looks like a problem with FastDev, but it's also possible I've got something set up in my system that causes this.

I'm using Atlassian Plugin SDK 4.2.19 with FastDev 2.4. When FastDev attempted to rebuild my plugin, I got this error:

Downloading: http://repo1.maven.org/maven2/com/atlassian/maven/plugins/atlassian-pdk/2.3.1/atlassian-pdk-2.3.1.pom

[INFO] Unable to find resource 'com.atlassian.maven.plugins:atlassian-pdk:pom:2.3.1' in repository central (http://repo1.maven.org/maven2)

[ERROR] Unable to complete running command: tpi

java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo

at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:112)

[…]

Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'com.atlassian.maven.plugins:atlassian-pdk': POM 'com.atlassian.maven.plugins:atlassian-pdk' not found in repository: Unable to download the artifact from any repository

com.atlassian.maven.plugins:atlassian-pdk:pom:2.3.1

from the specified remote repositories:

central (http://repo1.maven.org/maven2)

for project com.atlassian.maven.plugins:atlassian-pdk

When I used Maven to get the artifact manually, I stopped getting the error and everything works fine. However, the error message suggests that the Maven session launched from FastDev ignores the Maven settings bundled with the SDK (which would point Maven at Atlassian public repository instead of Maven central repo). I'm guessing many people wouldn't have noticed this, because they had the atlassian-pdk artifact downloaded previously to their local repo.

3 answers

1 accepted

I tried with SDK 4.2.20 freshly installed on a different system, and could not reproduce the issue - Maven now went to Atlassian Public repo. When running unconfigured behind a proxy it is unable to download the components, but in the error message it does say that it tried downloading from atlassian-public (https://maven.atlassian.com/repository/public) as well as Maven central. This confirms that it's not a proxy issue. Possibly it has been fixed since by either SDK 4.2.20 update or some new versions in the Maven repo; or it may be due to some peculiar setup on the machine where I saw it manifest. In nay case, it appears it's no longer an issue.

I am behind a proxy, but that is not the cause. The bundled Maven is already correctly configured to go through the proxy and the JVM options are set. Note that I don't get any problems downloading dependencies or running my plugin in an embedded Jira, the only problem I get is when I make changes to my Plugin and try to make FastDev reload it, either through running tests through the Plugin test Console, or by clicking the "scan and reload" button on the Dev Toolbox bar. I understand this launches a separate instance of Maven to rebuild my plugin before redeploying it.

I think it's also quite unlikely that the issue would be due to the proxy, given that the error message complains about not being able to find the plugin in the Maven central repository (http://repo1.maven.org/maven2) - it wsould not find it there even if there was no proxy, because the artifact isn't there. To find it, Maven would have to go to the Atlassian public repo (https://maven.atlassian.com/repository/public) - if it did try there, but was blocked by the proxy, I would expect to see an error message about that, but there isn't one.

I have tried to put the proxy settings directly into the mvn.bat bundled in the Atlassian SDK toolkit, but, as expected, it didn't help either.

try to reload changes with this command in console

atlas-cli --jvmargs -Dhttp.proxyHost=your proxy -Dhttp.proxyPort=port -Dhttps.proxyHost=your proxy -Dhttps.proxyPort=port

"Unable to parse command line options: Unrecognized option: --jvmargs"

BTW I'm already running altas-* commands with these arguments (set through ATLAS_OPTS, but I did experiment with setting them directly in batch files as well). What makes you think this is a proxy issue?

hi,

you can replace atlas-cli by atlas-run and when jira start try to execute fastdev

I have already done that, and, like I wrote before, it doesn't work because it's not a proxy issue.

I am behind a proxy, but that is not the cause. The bundled Maven is already correctly configured to go through the proxy and the JVM options are set. Note that I don't get any problems downloading dependencies or running my plugin in an embedded Jira, the only problem I get is when I make changes to my Plugin and try to make FastDev reload it, either through running tests through the Plugin test Console, or by clicking the "scan and reload" button on the Dev Toolbox bar. I understand this launches a separate instance of Maven to rebuild my plugin before redeploying it.

I think it's also quite unlikely that the issue would be due to the proxy, given that the error message complains about not being able to find the plugin in the Maven central repository (http://repo1.maven.org/maven2) - it wsould not find it there even if there was no proxy, because the artifact isn't there. To find it, Maven would have to go to the Atlassian public repo (https://maven.atlassian.com/repository/public) - if it did try there, but was blocked by the proxy, I would expect to see an error message about that, but there isn't one.

I have tried to put the proxy settings directly into the mvn.bat bundled in the Atlassian SDK toolkit, but, as expected, it didn't help either.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Off-topic

Get to know our Atlassian User Group Leaders from Bengaluru, India

Meet @Dinesh Dhinakaran, @Vishnu Vasudeva, @Rajeev Verma, and Jamshid Nalakath: Our extraordinary AUG leaders from Bengaluru, India. These four work together to strengthen the bonds of their local co...

136 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you