It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What's the proper method to determine the latest version of SAL?

Jeff Stricker Feb 20, 2013

I had been developing a simple plugin against Stash 2.0.3. In order to test it with our running Stash 2.1.2 instance, I changed the stash.version and stash.data.version in the pom.xml from 2.0.3 to 2.1.2. When I execute atlas-run, most dependencies are downloaded, but one fails:

Downloading: https://m2proxy.atlassian.com/repository/public/com/atlassian/sal/sal-api/2.1.2/sal-api-2.1.2.pom
[INFO] Unable to find resource 'com.atlassian.sal:sal-api:pom:2.1.2' in repository atlassian-public (https://m2proxy.atlassian.com/repository/public)

Downloading: http://repo1.maven.org/maven2/com/atlassian/sal/sal-api/2.1.2/sal-api-2.1.2.pom
[INFO] Unable to find resource 'com.atlassian.sal:sal-api:pom:2.1.2' in repository central (http://repo1.maven.org/maven2)

Downloading: https://m2proxy.atlassian.com/repository/public/com/atlassian/sal/sal-api/2.1.2/sal-api-2.1.2.jar
[INFO] Unable to find resource 'com.atlassian.sal:sal-api:jar:2.1.2' in repository atlassian-public (https://m2proxy.atlassian.com/repository/public)

Downloading: http://repo1.maven.org/maven2/com/atlassian/sal/sal-api/2.1.2/sal-api-2.1.2.jar
[INFO] Unable to find resource 'com.atlassian.sal:sal-api:jar:2.1.2' in repository central (http://repo1.maven.org/maven2)

Is there a matching release of SAL for each release of Stash, or should I have the dependency below set to a fixed value?

<dependency>
    <groupId>com.atlassian.sal</groupId>
    <artifactId>sal-api</artifactId>
    <version>${stash.version}</version>
    <scope>provided</scope>
</dependency>

1 answer

1 accepted

1 vote
Answer accepted
Jason Hinch Atlassian Team Feb 20, 2013

The best way to ensure you are using the same versions of APIs as Stash is to use a import scope on our parent pom.

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-parent</artifactId>
            <version>${stash.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dpendencies>
</dependencyManagement>

You then can omit the version from all the dependencies which Stash provides that you have defined in the dependencies section.

Jeff Stricker Feb 20, 2013

There's a small typo in the above XML, but otherwise, this worked fantastically. Thanks!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,971 views 1 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you