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

what is the difference between the jira-core and jira-api?

kevin September 22, 2015

I want to ask that what is the difference between the jira-core and jira-api

1 answer

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
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 23, 2015

In JIRA's early days (I'd have to dig through the history be sure exactly when, but it was somewhere in the 4.x line), there was only the "atlassian-jira" artifact.  This contained all of the JIRA code, and plugin developers had no way of knowing what code they used would change and under what circumstance.

This caused a lot of problems both for the JIRA development team and plugin developers.  The JIRA developers did not know what changes they could make without breaking plugins, and the plugin developers did not know what was safe to use without getting broken by upgrades.

We then introduced the Java API Policy for JIRA, which defined a clear contract for how we separate what we consider internal details (jira-core) from what we think plugin developers should talk to (jira-api).  The lines blur in a few places because this was introduced retroactively, and where we've noticed this you will often find things in jira-api marked as @Internal to make it as clear as we can that even though for some reason we had to include it, we consider that class or method to be an internal detail that we are free to change.

In the absence of any annotation or documentation to the contrary, then, jira-api is the module containing the classes that we intend to hold stable within a major version, and jira-core contains things that plugin developers should not use unless they run into a problem that cannot be solved any other way (in which case, they should open an improvement request so we can hopefully fix that).

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 23, 2015

I should qualify this by saying that for me "early days" means any time before I joined, which was just after 5.0 was released. I couldn't resist the stroll down memory lane and went looking. The separate jira-api and jira-core modules were introduced in 4.3. The monolithic atlassian-jira module was removed in 6.0.

kevin September 23, 2015

Thanks, but these time, I want to do a component/s picker, which is the same as version/s picker. When i use some classes but these classed do not exist in jira-api. Dose it means that i have to import jira-core? Are there other methods?

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 23, 2015

It may be that there are services in the API that provide the functionality that you need, or it may be that we don't provide them because what you're talking about changing is not something we intended to be extensible by add-ons. The components field is a system field, and I don't think we expect plugins to be altering how that gets displayed.

TAGS
AUG Leaders

Atlassian Community Events