I'm trying to start doing continuous integration on my Java/Maven project, using Team Foundation Server. I am trying to build two projects: a library, and a main project.
When I compile the main project from my local box, it's currently getting the library.jar file from a local Artifactory server (which my superiors would like to go away).
I've gotten the library to build, being triggered by changes to the git repo. I would like the main project to be able to use this generated artifact when it compiles, but I cannot find documentation on how to point Maven to the TFS artifact.
Have you managed to do this in your own project? How would I go about creating the reference to the library.jar?
EDIT: I'm not necessarily looking to have build triggering. I'm trying to figure out dependency management.
Not sure if I totally got your point, seems that you want to start doing continuous integration on this process: Your library project auto build triggered by changes to the git repo, then your main project build using the generated library.jar earlier.
It's likely chain the build definition. This Feature is under plan, but don't have yet.
Check the QA on this website:
Can I chain builds so that one build triggers another?
Not yet.
There's also an ancient suggestion on User Voice under planned , you could track the status.
Also take a look at this similar question: How to chain builds in TFS 2015?
If you just want to build your Java app with Maven, look at this tutorial.
You can add a Powershell task in your build definition to download the library build artifacts via Rest API: Get Build Artifacts.
For the settings.xml file, you can upload it into the version control and specify "--settings settings.xml" to use it.