Hi,
I have created a stash plugin and stash-plugin-module using the command available in the atlassian sdk: atlas-create-stash-plugin.bat / atlas-create-stash-plugin-module.bat
I would like to use the stash-scm-git-api, so I tried to add the following code to the pom file of my project:
<dependency> <groupId>com.atlassian.stash</groupId> <artifactId>stash-scm-git-api</artifactId> <scope>provided</scope> </dependency>
But the stash-scm-git-api is not found by maven.
How can I reference this API in a Maven project? I have installed Stash2.4.1 but I don't know how I can make a pom.xml file aware about the JAR to lookup.
Thanks!
Community moderators have prevented the ability to post new answers.
Hi Alex,
How are you running maven? If you're using raw mvn you will need the Atlassian repositories in your settings.xml, otherwise try using 'atlas-mvn' which has the correct configuration. This is the artifact from our maven repository.
Cheers,
Charles
Great, thanks for your quick answer.
In fact, I'm developing from IDEA Intelij, by importing the Maven project pom.xml that was created by atlas-* commands. Eveything seems to be correctly imported, and I was able to compile the default stash project with it.
Is the "settings.xml" located in $(atlassian.sdk\apache-maven\conf ?
As I understand, there is a Maven repository in my $(UserProfile)\.m2. I can see some of the stash jar there. How can I download and install the artifact from the URL you give me?
I'm really sorry about this dumb question, I'm completely new to this Maven thing (but I did lots of Java 15 ago, but at this time, Maven was not available yet).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I might be templated to run 'atlas-mvn compile' again, which will download/cache the git-api artifact, and then refresh IDEA. I think that will allow IDEA to find the correct artifact without you having to modify your settings.xml.
Otherwise some more information:
https://developer.atlassian.com/display/DOCS/Atlassian+Maven+Repositories
https://developer.atlassian.com/display/DOCS/Verifying+Your+Maven+Settings
In any case don't manually add things to the .m2 directory, that will cause you no end of trouble.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great! running "atlas-mvm compile" download and install the packages.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.