Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

0 votes
Answer 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.

Hi,

I think that you are behind proxy.

Try to configure it in setting.xml

https://answers.atlassian.com/questions/149242/proxy-setup-for-jira-plugin-development

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
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Happy New Year and Welcome New Marketplace Partner Program Partners!

Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...

442 views 5 16
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you