Missed Team ’24? Catch up on announcements here.

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

Create plugin JAR file

dhaval soni
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.
June 6, 2013

Hi,

I have created a plugin and i can see two generated JAR files under "target" directory.

two jar file as below:

1. jira-custom-plugin-1.0.jar plugin (Size - 535 KB)

2. jira-custom-plugin-1.0-test.jar plugin (Size 55 MB)

Now, i have extrated first plugin jar file then, in META-INF shows maven folder containing pom.xml

and second JAR file shows - "maven" directory and "lib" which conatains all library files.

so, when i upload first one then it did not work at JIRA.(As it looks like, due to dependencies libarary not existed and it included in test jar file).

Can you suggest me how it could be resolve or cotaining in single file..

Thanks

14 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Mizan
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.
June 6, 2013

I dont think there is any issue wth the JAR file since the plugin work fine in the local 2990 env. You need to check the REST module . the the URL of local and live might be different

eg: local : localhost:2990/jira

live: localhost:8080

0 votes
Mizan
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.
June 6, 2013

Great :) dont forget to vote up

0 votes
dhaval soni
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.
June 6, 2013

@Mizan

Thanks Mizan, it looks like working. I have changed rest url from '/jira/rest/..' to '/rest/...' and again generated jar file and that 535 KB actual jar file is working here.. :) i will check all features, hopefully all should be work. As there is no library files included , so, all dependencies will be manage thorugh POM.xml file? , i am not sure how dependency jar files are found in generated JAR file. Thank You Dhaval soni

0 votes
dhaval soni
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.
June 6, 2013

@Nic Brough @Mizan

I have executed again through "atlas-run package" and it shows me same two JAR file generated under target folder where test jar file contains all libraries and actual jar file has size in KB and not containing jar library files.

I assume, if i upload both the files then it would works correctly but it may not be correct way.

Can you please suggest what can be the cause of generating two jar instead of single one. or any troubleshoot way.

Thanks


0 votes
dhaval soni
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.
June 6, 2013

Yes, my plugin works completely fine in local 2990. but not at live.

Its reason looks like libraries are not included in JAR file and it included in test jar file.

(so, my actual jira file's size is just 535 kb but test jar file has 55MB around). I am not sure what it happens and libraries are included in test jar file.

URL:In jira live, i observed it called rest service as i got the log falled in atlassian-log of server jira file. But after that ajax response fall under error only each time.. also, unable to save data to active object...

(all works fine at local JIRA).

0 votes
Mizan
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.
June 6, 2013

No its not due to two atlassian-plugin.xml one is only for tests . Are you saying that the plugin works fine on the 2990 environment but does not work as expected in the live ?

If yes check the code which uses URLs since your plugin has REST module this might be a reason . base url of 2990 env cantain /jira as context .

0 votes
dhaval soni
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.
June 6, 2013

ya, right, i observed its date time got updated after executing atlas-package.

But the it shows two files and size again test file has higher then actual . :(

Is it due to , my stuff shows two atlassian-plugin.xml in src/test/resource and src/main/resource..?

0 votes
dhaval soni
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.
June 6, 2013

ya, right, i observed its date time got updated after executing atlas-package.

But it shows two files and size again test file has higher then actual . :(

Is it due to , my stuff shows two atlassian-plugin.xml in src/test/resource and src/main/resource..?

0 votes
dhaval soni
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.
June 6, 2013

executed "atlas-package" and it shows same that two files under "target" folder .

please let me know if i have to refer some other location to see that file.

0 votes
dhaval soni
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.
June 6, 2013

At live jira instance, plugin gets instlaled and i can see my menu and screen.

but when it calls rest service then also, i able to get log falled which i wrote in rest service but did not return the result and AJAX response and nothing work...

(in log file, i can see log message which i entered and no any other errors looks).

0 votes
Mizan
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.
June 6, 2013

Take an xml backup of you 2990 jira before you do atlas-clean . It is ok if you dont do atlas-clean ... Atlas clean will only delete the target folder . Atlas-package will rebuild the jar file .

What does the log says when you install the fiirst jar file ?

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 6, 2013

You don't usually need to clean before you package. Try it though - run package, and copy the .jar it creates somewhere safe. Then use clean, and then package again and compare the output. You should find the only differences are date/time stamps.

0 votes
dhaval soni
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.
June 6, 2013

Thanks for your comments.

i had done atlas-clean then after i used atlas-run command only while developing and got generated these two files.

I have not used atlas-package command.

(let me execute "atlas-package"). will it be ok if don't use atlas-clean ?

0 votes
Mizan
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.
June 6, 2013

There is a huge difference between the 2 jar files . usually both files have the similar size.

Can you try atlas-clean and again do atlas-package then test jira-custom-plugin-1.0.jar in a test JIRA server and not the 2990 Jira

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events