Help needed for Jira 10 maven POM.xml dependency update using BOM

I am trying to follow the instructions at https://developer.atlassian.com/server/jira/platform/preparing-for-jsw-10-jsm-6/#centralized-dependency-management and change to

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

But maven is complaining, that it does not know “import”.

[WARNING] 'dependencies.dependency.scope' for com.atlassian.jira:jira-api-bom:pom must be one of [provided, compile, runtime, test, system] but is 'import'. @ line 23, column 14

Also for other dependencies scope provided should be used, omitting version specifications.

But also here maven is complaining and reminds me to add version number.

This is my current dependency block in pom.xml.

<dependencies>
		<dependency>
		    <groupId>com.atlassian.jira</groupId>
		    <artifactId>jira-api-bom</artifactId>
		    <version>${jira.version}</version>
		    <type>pom</type>
		    <scope>import</scope>
		</dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <version>1.0.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>2.6.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-api</artifactId>
            <version>${upm.license.compatibility.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-api</artifactId>
            <version>${upm.license.compatibility.version}</version>
            <scope>provided</scope>
        </dependency>
 </dependencies>

Does somebody understanding the update of dependencies im pom.xml described in the release notes of Jira 10?

Best regards, Holger

I think you’ve got to put the import dependency into the <dependencyManagement> section of your pom. Something like this:

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

Thank you! Okay, now maven doesn’t complain. But now atlas-run fails with compile errors because certain libraries seems not to be found e.g. javax.ws.rs.

Where and how do I now need to add e.g.?

	        <dependency>
	            <groupId>javax.ws.rs</groupId>
	            <artifactId>jsr311-api</artifactId>
	            <scope>provided</scope>
	        </dependency>
	        <dependency>
	            <groupId>javax.xml.bind</groupId>
	            <artifactId>jaxb-api</artifactId>
	            <scope>provided</scope>
	        </dependency>

Also under dependencyManagement? This seems not to work that simply.

Have a look at the jsr311 mentions at https://bitbucket.org/atlassian/atlassian-rest/src/8.0.x/UPGRADE_720.md.

Replace those dependencies with Jakarta dependencies.