Missed Team ’24? Catch up on announcements here.

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

JIRA 7 updates for pom.xml in plugin development

Holger Schimanski
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.
August 21, 2015

JIRA 7 is on the way and significant changes in API are announced. What do I have to change in my pom.xml esp. in the dependencies and properties section?

Update <jira.version>6.2</jira.version> to <jira.version>7.0.0-m01b </jira.version> (and following atlas-mvn eclipse:eclipse and changes in your code regarding changes in API), okay. But what else?

See below for a typical pom.xml from my plugins using AO, UPM License Management, REST, 

 

Best regards
Holger

&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
...
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.jira&lt;/groupId&gt;
            &lt;artifactId&gt;jira-api&lt;/artifactId&gt;
            &lt;version&gt;${jira.version}&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.jira&lt;/groupId&gt;
            &lt;artifactId&gt;jira-core&lt;/artifactId&gt;
            &lt;version&gt;${jira.version}&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
            &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
            &lt;version&gt;2.3&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.activeobjects&lt;/groupId&gt;
            &lt;artifactId&gt;activeobjects-plugin&lt;/artifactId&gt;
            &lt;version&gt;${ao.version}&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.upm&lt;/groupId&gt;
            &lt;artifactId&gt;plugin-license-storage-lib&lt;/artifactId&gt;
            &lt;version&gt;${upm.license.compatibility.version}&lt;/version&gt;
            &lt;scope&gt;compile&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.upm&lt;/groupId&gt;
            &lt;artifactId&gt;plugin-license-storage-plugin&lt;/artifactId&gt;
            &lt;version&gt;${upm.license.compatibility.version}&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.upm&lt;/groupId&gt;
            &lt;artifactId&gt;licensing-api&lt;/artifactId&gt;
            &lt;version&gt;${upm.license.compatibility.version}&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.upm&lt;/groupId&gt;
            &lt;artifactId&gt;upm-api&lt;/artifactId&gt;
            &lt;version&gt;${upm.license.compatibility.version}&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.sal&lt;/groupId&gt;
            &lt;artifactId&gt;sal-api&lt;/artifactId&gt;
            &lt;version&gt;${sal.api.version}&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.templaterenderer&lt;/groupId&gt;
            &lt;artifactId&gt;atlassian-template-renderer-api&lt;/artifactId&gt;
            &lt;version&gt;${atlassian.templaterenderer.version}&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;commons-lang&lt;/groupId&gt;
            &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
            &lt;version&gt;2.4&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.osgi&lt;/groupId&gt;
            &lt;artifactId&gt;spring-osgi-core&lt;/artifactId&gt;
            &lt;version&gt;1.1.3&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
            &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
            &lt;version&gt;1.6.6&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
            &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
            &lt;version&gt;4.1.1&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.mockito&lt;/groupId&gt;
            &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
            &lt;version&gt;1.8.5&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.jsoup&lt;/groupId&gt;
            &lt;artifactId&gt;jsoup&lt;/artifactId&gt;
            &lt;version&gt;1.3.3&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
            &lt;artifactId&gt;jsr311-api&lt;/artifactId&gt;
            &lt;version&gt;1.1.1&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
            &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
            &lt;version&gt;2.1&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.atlassian.plugins.rest&lt;/groupId&gt;
            &lt;artifactId&gt;atlassian-rest-common&lt;/artifactId&gt;
            &lt;version&gt;1.0.2&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.wink&lt;/groupId&gt;
            &lt;artifactId&gt;wink-client&lt;/artifactId&gt;
            &lt;version&gt;1.1.3-incubating&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;build&gt;
        &lt;plugins&gt;
            &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;productDataPath&gt;${basedir}/generated-test-resources.zip&lt;/productDataPath&gt;
                    &lt;instructions&gt;
                        &lt;Private-Package&gt;com.atlassian.upm.license.storage.lib*&lt;/Private-Package&gt;
                        &lt;DynamicImport-Package&gt;com.atlassian.upm.api.license.entity;version="${upm.license.compatibility.version}", com.atlassian.upm.api.license;version="${upm.license.compatibility.version}", com.atlassian.upm.api.util;version="${upm.license.compatibility.version}", com.atlassian.upm.license.storage.plugin;version="${upm.license.compatibility.version}"&lt;/DynamicImport-Package&gt;
                    &lt;/instructions&gt;
                    &lt;bundledArtifacts&gt;
                        &lt;bundledArtifact&gt;
                            &lt;groupId&gt;com.atlassian.upm&lt;/groupId&gt;
                            &lt;artifactId&gt;plugin-license-storage-plugin&lt;/artifactId&gt;
                            &lt;version&gt;${upm.license.compatibility.version}&lt;/version&gt;
                        &lt;/bundledArtifact&gt;
                    &lt;/bundledArtifacts&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
            &lt;plugin&gt;
                &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                &lt;configuration&gt;
                    &lt;source&gt;1.6&lt;/source&gt;
                    &lt;target&gt;1.6&lt;/target&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;com.atlassian.maven.plugins&lt;/groupId&gt;
                &lt;artifactId&gt;maven-amps-plugin&lt;/artifactId&gt;
                &lt;version&gt;${amps.version}&lt;/version&gt;
                &lt;extensions&gt;true&lt;/extensions&gt;
            &lt;/plugin&gt;
            &lt;plugin&gt;
                &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                &lt;executions&gt;
                    &lt;execution&gt;
                        &lt;id&gt;copy-storage-plugin&lt;/id&gt;
                        &lt;phase&gt;process-resources&lt;/phase&gt;
                        &lt;goals&gt;
                            &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                        &lt;/goals&gt;
                        &lt;configuration&gt;
                            &lt;outputDirectory&gt;${project.build.outputDirectory}&lt;/outputDirectory&gt;
                            &lt;includeArtifactIds&gt;plugin-license-storage-plugin&lt;/includeArtifactIds&gt;
                            &lt;stripVersion&gt;true&lt;/stripVersion&gt;
                        &lt;/configuration&gt;
                    &lt;/execution&gt;
                &lt;/executions&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;properties&gt;
        &lt;jira.version&gt;6.2&lt;/jira.version&gt;
        &lt;amps.version&gt;5.0.13&lt;/amps.version&gt;
        &lt;ao.version&gt;0.19.7&lt;/ao.version&gt;
        &lt;upm.license.compatibility.version&gt;2.1.5&lt;/upm.license.compatibility.version&gt;
        &lt;sal.api.version&gt;2.4.0&lt;/sal.api.version&gt;
        &lt;atlassian.templaterenderer.version&gt;1.0.5&lt;/atlassian.templaterenderer.version&gt;
    &lt;/properties&gt;
&lt;/project&gt;

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Volodymyr Krupach
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.
August 27, 2015

Please see here how to resolve com.oracle:ojdbc6:jar problem:
https://answers.atlassian.com/questions/24289952

Holger Schimanski
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.
August 28, 2015

Thanks for this idea! Because of the reply on AMPS-1275 I found out that I can use maven-amps-plugin:5.1.13, where this is dependency is no longer automatically appears. Therefor no manual add of odbj6.jar needed. :-)

0 votes
Holger Schimanski
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.
January 25, 2016

Removed copy-storage-plugin including DynamicImport-Package part which no longer needed and also is conflicting with Atlassian SDK 6.2.2 resp AMPS 6.2.1

0 votes
Holger Schimanski
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.
August 28, 2015

Switching to maven-amps-plugin:5.1.13 solved my dependency issues I am able to start JIRA 7 via atlas-run now.

0 votes
Holger Schimanski
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.
August 27, 2015

I have changed <jira.version>7.0.0-m01b</jira.version> and <upm.license.compatibility.version>2.15</upm.license.compatibility.version>. I removed dependecy to plugin-license-storage-lib and plugin-license-storage-plugin. I changed version 2.3 to 2.5 for <groupId>javax.servlet</groupId>. Needed to update my java version to 1.7 resp. 1.8 jdk. Then atlas-mvn eclipse:eclipse and changing User to ApplicationUser and ThirdPartyPluginLicenseStorageManagerImpl to PluginLicenseManager. Then updated Atlassian SDK to 5.1.1 with AMPS 5.1.11. Therefore <amps.version>5.1.11</amps.version> I cannot start JIRA via atlas-run because of some dependency problems. AMPS-1276 - Unknown packaging: atlassian-plugin and AMPS-1275 - Unresolved dependency for maven-amps-plugin:5.1.11 to com.oracle:ojdbc6:jar:11.2.0.2.0. Any ideas, guys?

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