Hello!
I'm a bit new to Bitbucket and pipelines.
Is there a way to use a artifact from one pipeline in an other pipline?
Suppose you got separate repos and pipelines for these repos:
If my-app got a dependency to my-common how do I solve that?
Is there a way to install the my-common in some maven repo that is accessible from the pipeline that build's my-app?
Best regards
Fredrik
Hello!
I think solved it, but any comments for improvements are welcome.
1) I created a private maven-repo for eg at mymavenrepo.com
2) I followed the tutorial at: https://confluence.atlassian.com/bitbucket/java-with-bitbucket-pipelines-872013773.html
I choosed to go for using a settings.xml of my own instead of using sed.
3) I deployed it in my pipeline like:
- mvn -s ../settings.xml clean install deploy:deploy-file -DgroupId=mygroup -DartifactId=myartifact -Dversion=1.2.3 -Dpackaging=jar -Dfile=path/to/my.jar -DrepositoryId=my-private-repo -Durl=https://mymavenrepo.com/repo/qwertyuiopa/
4) Now in my other projects where I have dependency to this artifact I add the dependecy in my pom.xml and in my local settings.xml I added the server and the repo like they did in the tutorial in step 2 above.
Best regards
Fredrik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.