Publishing existing maven artifacts to VS Package Management


On a recent customer engagement, we hit a situation where the customer had some artifacts that were available locally (obtained through a script), but these were not available in a maven repo. When we tried to build the solution via a build server it failed.

We setup a maven based repository using VSTS Package Management as documented here, but this was not clear on how to upload an existing POM/JAR artifact.

After some research, and help from colleagues - https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html provided the hints

For POC purposes I tried to deploy JTidy to VSTS Package Management – and this command did it.


mvn deploy:deploy-file -DpomFile=C:\jtidy\jtidy-4aug2000r7-dev.pom -Dfile=C:\jtidy\jtidy-4aug2000r7-dev.jar -DrepositoryId=vstsinstance-visualstudio.com-mavenfeed -Durl=https://vsinstance.pkgs.visualstudio.com/_packaging/MavenFeed/maven/v1


You obviously need to change the values (eg vstsinstance etc), and need to ensure you follow the initial instructions to setup and Maven feed, as well as the proper settings.xml file

Hope this helps,

Ahmed


Comments (0)

Skip to main content