Jira Server is making declaring dependencies easier

Jira app development
Reading Time: 2 minutes

Bothered by out-of-sync dependencies?

Jira Server platform has hundreds of dependencies. Each app uses a subset of those to perform its function.

At the same time it is important for an app to declare a component in the same version as provided by Jira platform because failing to do so may break the functionality provided by the app.

During the Jira platform releases many dependencies are updated and it can be difficult for app developers to keep up with the changes. This can result in an app being compiled against an older version of a dependency, which is no longer provided by the platform.

So far, keeping the dependencies in sync has required discovering if a component version has changed in a new Jira version and then updating this component in an app. That has proved just too time-consuming and demanding.

Good news, we've fixed it!

With the changes we've introduced updating platform dependencies in an app becomes the matter of updating the Jira version in the app pom file.

The Maven build tool provides a way to import dependency versions from another pom via the <dependencyManagement> section. Having a proper dependency management defined in the Jira platform pom and importing it into an app allows you to significantly simplify version management.

Now the jira-project pom can be used by the apps to import the platform dependencies and get rid of the hard-coded platform component versions in their build files.

To do this an app can import the jira-project pom in its dependency management section:

<dependencyManagement>                  
  <dependency>                 
    <groupId>com.atlassian.jira</groupId>                 
    <artifactId>jira-project</artifactId>                 
    <version>${jira.version}</version>                 
    <type>pom</type>                 
    <scope>import</scope>
    </dependency>
</dependencyManagement>

You can then drop the platform dependencies definitions from the app's <dependencyManagement> section and also remove all the hard-coded component versions from the pom files.

How does the change affect me?

If you are working on an app which has the hard-coded dependency versions for platform components consider migrating it to import the jira-project pom. However, if you have your own way of keeping things up and running, this is fine, because the new way is just an option you can use to make your life easier.