0

I need to use TFS (now Azure DevOps) as the local repository manager for Maven artifacts in a corporate network where there is no access to internet.

Currently we use Nexus where we get the artifacts downloaded externally and then get into the network and upload them to Nexus manually. We want to get rid of Nexus and use TFS as the repository manager. The problem is I don't find an option in TFS to upload the artifacts. See the pic Maven Packages screen.

I just followed this and got the jar of my project published but what I want is to upload all the jars present in .m2/repository to TFS. Please help me with any documentation.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
ShefZee
  • 95
  • 7
  • Nexus and Artifactory are the most common way of managing artifacts inside a company network. Why do you want to replace Nexus with TFS? – J Fabian Meier Apr 14 '19 at 18:05
  • Why would you like to get rid of Nexus? Nexus is exactly intended for that job so to be honest I don't understand your idea to go to TFS which does not make sense? Why don't you have a firewall in front of Nexus and control via staging the download ...etc (there other tools which can help there) instead of manually doing this? – khmarbaise Apr 14 '19 at 18:06
  • 1
    We use TFS for git source code management and also using it to store NPM modules. TFS has the capability to store maven artifacts and to create build pipelines. So I was exploring the possibility of using TFS for all the processes. – ShefZee Apr 14 '19 at 19:05
  • @ShefZee in the docs you have a good tutorial how to do it (run `mvn deploy` where the `pom.xml` exist), just is for one .jar, if you want to upload all the jars quickly (and not one by one) so you need to write a script. – Shayki Abramczyk Apr 15 '19 at 06:29
  • 1
    Why do you use TFS also as NPM storage cause Nexus can do this as well ...I don't know why you are going this way and why not using a repository manager ? – khmarbaise Apr 15 '19 at 06:44
  • @khmarbaise another team were already using TFS to store NPM packages. So we just requested them to add us to their group. – ShefZee Apr 19 '19 at 06:14
  • Sorry but that another team is using TFS as repository storage already does not really makes it better. A repository manager like Nexus can handle things like NPM, Ruby Gems, Yum Repos, Docker Registry etc. and Artifacts for Maven/Gradle... What I missed is the performance impact cause TFS is not optimized for fast access etc. a repository manager is... – khmarbaise Apr 20 '19 at 12:28

1 Answers1

0

Glad to see you're evaluating Azure Artifacts.

We don't have a good "bulk import" guide for Maven, so I can't point you to links right off the bat. @Shayki Abramczyk has a good suggestion in the comments above of scripting mvn deploy to go through all of the pom.xml files in your repository folder.

Alex Mullans
  • 1,699
  • 2
  • 17
  • 34
  • Okies.. So if I am using nexus and if I do mvn package, all the dependencies in my project will be cached into the nexus-proxy repository. So this feature is not available in TFS as of now. Am I correct? – ShefZee Apr 19 '19 at 06:18
  • That is available (as of yesterday), assuming your dependencies are coming from Maven Central. Enable the Maven Central upstream source on your feed to have that happen: https://learn.microsoft.com/en-us/azure/devops/artifacts/how-to/set-up-upstream-sources?view=azure-devops#add-upstream-sources-to-existing-feed – Alex Mullans Apr 19 '19 at 11:34
  • I was able to see only npm & nuget as upstream sources..just googled and found this thread.. https://developercommunity.visualstudio.com/content/problem/507291/azure-devops-upstream-sources-for-maven-is-not-vis.html Let me try to update TFS.. Thank you ! – ShefZee Apr 19 '19 at 12:18
  • Ah, sorry, I missed that this was TFS. Maven Upstreams won't be available in TFS until 2019 Update 1. – Alex Mullans Apr 19 '19 at 16:17