Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Where to write my plugin code.....need help

Alok kumar Singh
Contributor
April 17, 2012

I have created skeleton plugin and I can see it on "localhost:9090"......now i want to write my own classes.....the problem is I am not getting from where should I start.....should I write my code into....src\main\java\Examplemacro.java....or I should create another class for my code......plz help.....ASAP

2 answers

2 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 17, 2012

Technically, it doesn't really matter where you put the code, as long as your atlassian-plugin.xml points to the right place. But src\main\java\ is the right directory if you want to follow standards. You can call it whatever you like, but make sure you make the right changes to atlassian-plugin.xml

When starting out, you might find it easier to start coding by amending the files it's created for you, but you'll need to change them eventually, so I'd suggest doing that first. Make sure the skeleton compiles and runs ok, then have a go at renaming it without making other changes. Once you've got the hang of renaming it, you'll see how it all works.

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 17, 2012

> Examplemacro.java

This makes me think you used the confluence, and not the jira archetype?

But it doesn't make a great deal of difference, Nic is right.

Alok kumar Singh
Contributor
April 17, 2012

yes by mistake i did atlas-create-confluence-plugin......

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 17, 2012

If you've picked the wrong archetype, it's worth going back to the right one. Although they're similar and you can convert them, it's easier to redo from start. (Yes, I've done exactly the same. Many times. I blame starting new code before I've had enough coffee)

Alok kumar Singh
Contributor
April 17, 2012

yup...thnx nic...i did that....:-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events