0

I have a Maven project with several dependencies, all taken from the Maven repo. The project is hosted / stored in VSTS and uses CI. All bar one of the dependencies were available from the Maven Repository online so now I have to find a way of adding this .jar file to this project (and VSTS for the CI build) and making Maven recognise and use it.

Can anyone point me in the right direction?

Thanks

Stephen Wilson
  • 1,362
  • 1
  • 16
  • 30
  • Don't you have a company-internal Nexus/Artifactory? This would be the right place to put such a jar. – J Fabian Meier Jun 25 '18 at 12:04
  • Too expensive for one single .jar that will probably be replaced with an api call within a year. – Stephen Wilson Jun 25 '18 at 12:10
  • @StephenWilson You can refer this post https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-to-a-maven-project to add jar file inside your maven project (git repo), then commit and push to remote repo. – Marina Liu Jun 26 '18 at 08:26

2 Answers2

0

If you don't have or want a Nexus/Artifactory, I would install the jar on every relevant account/computer with the help of the Maven install plugin (see https://stackoverflow.com/a/4955695/927493).

But let me stress that it is standard practise to have a Nexus/Artifactory running in the company - there are free OpenSource versions, and they are easy to set up. Furthermore, you have a canonical place for the artifacts you create yourself.

J Fabian Meier
  • 26,766
  • 8
  • 52
  • 98
0

You should be able to create your own feed with the VSTS Packages Extension.

See here for instructions how to setup a feed and publish an artifact to the feed.

This is an alternative to Artifactory and is no extra cost to your existing VSTS.

mikelowe
  • 116
  • 3