Need help with Create A Plugin Skeleton tutorial - dependency issues.

I am trying to work my way thru the tutorial at

https://developer.atlassian.com/display/DOCS/Create+a+plugin+skeleton

I have created the skeletal 'refapp' plugin using the command atlas-create-refapp-plugin

and executed the atlas-run command, which results in

Downloading: https://maven.atlassian.com/repository/public/com/atlassian/refapp/atlassian-refapp/2.19.2/atlassian-refapp-2.19.2.war
[WARNING] Unable to get resource 'com.atlassian.refapp:atlassian-refapp:war:2.19.2' from repository atlassian-public (https://maven.atlassian.com/repository/public): GET request of: com/atlassian/refapp/atlassian-refapp/2.19.2/atlassian-refapp-2.19.2.war from atlassian-public failed
Downloading: file:///opt/atlassian-plugin-sdk-4.2.3/repository/com/atlassian/refapp/atlassian-refapp/2.19.2/atlassian-refapp-2.19.2.war
[INFO] Unable to find resource 'com.atlassian.refapp:atlassian-refapp:war:2.19.2' in repository atlassian-plugin-sdk (file:///opt/atlassian-plugin-sdk-4.2.3/repository)
Downloading: http://repo1.maven.org/maven2/com/atlassian/refapp/atlassian-refapp/2.19.2/atlassian-refapp-2.19.2.war
[INFO]
Unable to find resource 'com.atlassian.refapp:atlassian-refapp:war:2.19.2' in repository central (http://repo1.maven.org/maven2)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR

I just download the Atlassian SDK last week, surely it is current enough to have the right dependency references?

atlas-version

ATLAS Version: 4.2.3
ATLAS Home: /opt/atlassian-plugin-sdk-4.2.3
ATLAS Scripts: /opt/atlassian-plugin-sdk-4.2.3/bin
ATLAS Maven Home: /opt/atlassian-plugin-sdk-4.2.3/apache-maven
--------
Executing: /opt/atlassian-plugin-sdk-4.2.3/apache-maven/bin/mvn --version -gs /opt/atlassian-plugin-sdk-4.2.3/apache-maven/conf/settings.xml
Apache Maven 2.1.0 (r755702; 2009-03-18 14:10:27-0500)
Java version: 1.6.0_45
Java home: /opt/jdk1.6.0_45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-358.6.2.el6.x86_64" arch: "amd64" Family: "unix"

What do I need to do to get back on track? Disappointed that I can't even follow a simple tutorial without dependency issues right out of the gate...

3 answers

1 accepted

So, ultimately, while I don't understand the failure (since there was no settings.xml file to mess up the repo access), cleaning the local ~/.m2/repository did solve the problem. Kudos to Mary for pointing me in the direction of the local repo.

The artifact does exist. Can you navigate to the repository with your browser?

https://maven.atlassian.com/content/groups/public/com/atlassian/refapp/atlassian-refapp/2.19.2/

I've also seen this issue if you have a local ~/.m2/settings.xml defined. To test if this is the problem, temporarily rename this file settings.xml.save and try atlas-run again.

Yes, I can navigate to it with my browser.

No local .m2/settings.xml:

pushd ~/.m2
~/.m2
$ ls -al
total 12
drwxrwxr-x. 3 kwood kwood 4096 Jul 16 16:20 .
drwx------. 56 kwood kwood 4096 Jul 24 18:12 ..
drwxrwxr-x. 131 kwood kwood 4096 Jul 24 18:31 repository

I deleted the local repository (.m2/repository) and am trying again.

deleting the repo and running atlas-compile again, this time it compiled. But, atlas-run never completes. It dumps over 7200 lines of log messages (so too long to cut and paste here). It begins with

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running ut.com.atlassian.plugins.tutorial.refapp.MyComponentUnitTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.052 sec

Results :

....

Starting refapp

....

[INFO] refapp started successfully in 34s at http://localhost.localdomain:5990/refapp
[INFO]
Type Ctrl-D to shutdown gracefully
[INFO] Type Ctrl-C to exit
[INFO] [talledLocalContainer] - GET https://marketplace.atlassian.com/rest/1.0/
[INFO]
[talledLocalContainer] - MPAC returned error 404 for audit event (updates)

and ends with a bunch of messages like this:

[INFO] [talledLocalContainer] Warning: The encoding 'UTF-8' is not supported by the Java runtime.
[INFO] [talledLocalContainer] - META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration
[INFO] [talledLocalContainer] - META-INF/services/javax.xml.transform.TransformerFactory
[INFO] [talledLocalContainer] - META-INF/services/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager
[INFO] [talledLocalContainer] Warning: The encoding 'UTF-8' is not supported by the Java runtime.

then just sits there and never does anything, i.e. I never see the refapp display.

Ken,

It looks like the APP started successfully. See this message:

[INFO] refapp started successfully in 34s at http://localhost.localdomain:5990/refapp

Did you try navigating to this location in your browser?

I will say atlas-run spits out a lot of data; it even spits out data while the application is running after a successful start. I think a "silent" mode would be a good thing to add.

OK, with so much stuff coming out, I missed the line telling me to go to the browser with that URL, my bad!

I'll try that.

So, I tried another one:

https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Writing+Gadgets+for+JIRA

which has the sources at

JIRA 5.0 plugin version: https://bitbucket.org/atlassian_tutorial/jira-gadget-2

So, I downloaded the source, and did 'atlas-compile' with the same kind of results:

Downloading: https://maven.atlassian.com/repository/public/com/atlassian/gadgets/atlassian-gadgets/3.1.13/atlassian-gadgets-3.1.13.pom
[WARNING] Unable to get resource 'com.atlassian.gadgets:atlassian-gadgets:pom:3.1.13' from repository atlassian-public (https://maven.atlassian.com/repository/public): GET request of: com/atlassian/gadgets/atlassian-gadgets/3.1.13/atlassian-gadgets-3.1.13.pom from atlassian-public failed
Downloading: file:///opt/atlassian-plugin-sdk-4.2.3/repository/com/atlassian/gadgets/atlassian-gadgets/3.1.13/atlassian-gadgets-3.1.13.pom
[INFO] Unable to find resource 'com.atlassian.gadgets:atlassian-gadgets:pom:3.1.13' in repository atlassian-plugin-sdk (file:///opt/atlassian-plugin-sdk-4.2.3/repository)
Downloading: http://repo1.maven.org/maven2/com/atlassian/gadgets/atlassian-gadgets/3.1.13/atlassian-gadgets-3.1.13.pom
[INFO]
Unable to find resource 'com.atlassian.gadgets:atlassian-gadgets:pom:3.1.13' in repository central (http://repo1.maven.org/maven2)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR

BTW, I know my SDK is ok, I've have several of our own plugins that were internally developed for jira 4, and they compile fine (i.e. have no dependency issues), just trying to understand what I have to change to migrate them from Jira 4 to Jira 5, and can't even get Atlassian's examples to compile! Very frustrating...

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published 8 hours ago in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

33 views 0 3
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