When the SDK creates a plugin, it comment the com.atlassian.jira.jira-core dependency:
<!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
<!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->
<!--
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
-->
Why is this normally not recommended and what are the downsides?
I want to use SelectCFType from it.
Thx
Harald,
Getting that dependency allows your code to reference direct classes at a lower level that the recommended by using services and manager interfaces.
I think that the downside is related to the grade of coupling your code will had with atlassian's api.
Sometimes, if you need to reference concrete classes, for example to inherit from them, this is required.
Just for you to know, i just try to remove this dependency in a custom mail handler i have that uses SelectCFType:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
Then i cannot use concrete classes:
Good answer. Loose coupling always makes sense. Even if the Jira Core classes will not change very frequently. Thx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.