I am trying to update my Jira DC addon to Jira 11, but after update the jira.version number to 11.0.0 in pom.xml and using atlas-run I get the error message that dependency to Open SAML api and impl is not added resp. could not be resolved.
These are transitive dependencies of jira-core, but are not provided by the maven central repositories:
e.g. https://mvnrepository.com/artifact/org.opensaml/opensaml-saml-api latest version that is public is 4.0.1. Since jira requires 5.0.0 the build will fail. Atlassian used to host or mirror these types of artifacts but no longer do that.
There are a long list of third party repositories that Atlassian want you to add to your maven configuration e.g:
from the plugin sdk:
Generally - if you add all of those - you will have minimal issues.
Personally - I don’t like to trust so many third party repos - so instead whenever these issues come up, I simply add an exclusion to the product that is requiring the particular artifact. Especially in the case of stuff that we don’t directly need for the compilation of our apps.
e.g. in our pom.xml:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bndlib</artifactId>
</exclusion>
<!-- The following exclusions are needed to compile, because these dependencies are no longer provided in Atlassian's Maven Repository -->
<exclusion>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-saml-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-saml-impl</artifactId>
</exclusion>
<exclusion>
<groupId>jta</groupId>
<artifactId>jta</artifactId>
</exclusion>
<exclusion>
<groupId>jndi</groupId>
<artifactId>jndi</artifactId>
</exclusion>
<exclusion>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</exclusion>
<exclusion>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>
The other approach recommended above, just overrides the version that your IDE sees. In my opinion it is not really a particularly useful fix - and very easy to accidentally compile extra stuff into your jar - e.g. by forgetting the provided