How to use 'DynamicImport-Package' instruction

Tansu Aksan April 6, 2017

Hi, I am trying to load classes at run time.

this.getClass().getClassLoader().loadClass("com.atlassian.jira.bc.issue.IssueService")

For this purpose, I added 'DynamicImport-Package' attirbute under instructions tag of 'maven-jira-plugin' like this.  

<DynamicImport-Package>com.atlassian.jira.bc.issue.*,</DynamicImport-Package>

I check that the instruction is in MANIFEST.MF.

DynamicImport-Package: com.atlassian.jira.bc.issue.*,

When i try to load the class from this package which is specified in 'DynamicImport-Package' attribute, i am getting "ClassNotFoundException".

I don't know what else to check for. Anyone know what could be the cause for this behavior ?  

What should be the way to do it ?

Thanks

 

1 answer

0 votes
Sam Hall
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 6, 2017

Hi Tansu - Welcome to the community. Since your question is development related, you might want to try asking this over at: https://community.developer.atlassian.com as well (if you haven't already).

There are a lot of helpful and experienced people over there, so you will probably get a quicker response.

You can read more about the Developer Community in this article: https://community.atlassian.com/t5/Feedback-Forum-articles/The-Atlassian-Developer-Community/ba-p/459061

Suggest an answer

Log in or Sign up to answer