import com.atlassian.jira.ComponentManager

Mrityunjay Kumar May 25, 2015

1) I am upgrading from JIRA v6.2 to v6.4.2, I want to make changes in my custom plugins. From where to download the below jars? Plz help me to resolve this dependency in eclipse.

import  com.atlassian.jira.ComponentManager;

import  com.atlassian.jira.issue.CustomFieldManager;

import  com.atlassian.jira.issue.ModifiedValue;

import  com.atlassian.jira.issue.MutableIssue;

 import  com.atlassian.jira.issue.fields.CustomField;

import  com.atlassian.jira.issue.fields.layout.field.FieldLayout;

import  com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem;

 import  com.atlassian.jira.issue.fields.layout.field.FieldLayoutManager;

 import  com.atlassian.jira.issue.fields.layout.field.FieldLayoutStorageException;

 import  com.atlassian.jira.issue.util.DefaultIssueChangeHolder;

 import  com.atlassian.jira.project.Project;

 

POM file:

<dependency>

           <groupId>com.atlassian.jira</groupId>

 

           <artifactId>atlassian-jira</artifactId>

 

           <version>${jira.version}</version>

 

           <scope>provided</scope>

 

 </dependency>

2) in the POM file what should be the value for "jira.data.version" if JIRA version installed is 6.4.2 ?

 

<properties>

<jira.version>6.4.2</jira.version>

<jira.data.version>?</jira.data.version>

 </properties>

 

 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Andreas Ebert
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.
May 25, 2015

Artefact atlassian-jira is an outdated dependency. Use jira-api and, if required, jira-core instead. There are in the same groupId com.atlassian.jira.

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

Additionally, stop using ComponentManager. It has been deprecated approximately forever. Use ComponentAccessor instead.

0 votes
Hangsu Ma
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.
May 25, 2015

From the look of your pom, i am guessing your are using atlassian sdk.

If that's the case, for your first question, you can run

atlas-mvn eclipse: clean eclipse:eclipse

This will remove your current classpath from old version, generate current import and download source code for your dependencies with the newer version specified in your pom by <jira.version>6.4.2<jira.version>

 

For the second issue, 

Do a search in your pom.xml for "jira.data.version"

If you find something similar to this:

&lt;plugin&gt;
    &lt;groupId&gt;com.atlassian.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-jira-plugin&lt;/artifactId&gt;
    &lt;version&gt;${amps.version}&lt;/version&gt;
    &lt;extensions&gt;true&lt;/extensions&gt;
    &lt;configuration&gt;
        &lt;productVersion&gt;${jira.version}&lt;/productVersion&gt;
        &lt;productDataVersion&gt;${jira.version}&lt;/productDataVersion&gt;
        &lt;useFastdevCli&gt;true&lt;/useFastdevCli&gt;
        &lt;productDataPath&gt;${project.basedir}/src/test/resources/generated-test-resources-${jira.data.version}.zip&lt;/productDataPath&gt;
    &lt;/configuration&gt;
&lt;/plugin&gt;

Then you are just using the jira.data.version to specify the pre-generated zip file of your JIRA home data.

These zips are generated from running

atlas-create-home-zip

And you can leave it as it is if you didn't generate a new data zip, JIRA will detect and migrate the data zip to newer version on startup (atlas-run)

 

PS: Ignore above if you are not using atlas-sdk, and have a look at this:

https://developer.atlassian.com/docs/getting-started/set-up-the-atlassian-plugin-sdk-and-build-a-project/install-the-atlassian-sdk-on-a-linux-or-mac-system

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.
May 25, 2015

If you are working within the Atlassian SDK (or even with your own maven setup with the right Atlassian settings), you don't need to download anything, the build process will get the right stuff automatically.

For the data version, the easiest answer is "same as JIRA version".  However, if you have "upgrade data" tasks in your addon, you may want to use an older version so you test the data upgrade.  And it won't do you much harm to take a lower version either - I often just use 6.4 for all 6.4.x development

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