0

Does exists any JAR which allow my JSF application:

  1. Connect with TFS url (like tfs.company.com.br\server);
  2. Pass destination directory and changeset as parameters;
  3. "Download" all sources from changeset in my destination directory;

Important: we don't have any workItem, we just use TFS as repository.

I've searched for it in Google, but I just have found jars for Jenkins which allows me to make a job for it. That's not exactly what I want.

Waldrich
  • 23
  • 1
  • 5
  • You want the TFS SDK for Java: http://www.microsoft.com/en-us/download/details.aspx?id=22616 – Edward Thomson Oct 10 '14 at 13:43
  • I downloaded this `com.microsoft.tfs.sdk-11.0.0.jar` before make the question but I couldn't find out how to use it to make what I want to do. – Waldrich Oct 10 '14 at 14:12

1 Answers1

0

Once you've downloaded the TFS Java SDK, have a look at a an introductory post to see how you make calls to TFS using the TFS Object Model.

That sample is about work items, but once you understand the object model you should be able to work out how to make calls related to version control. Also, as the object model is consistent between Java and .NET, you should be able to look at a C# example that does something similar to what you want and adapt those as needed.

Community
  • 1
  • 1
Richard Banks
  • 12,456
  • 3
  • 46
  • 62
  • Thanks @Richard! By looking C# example, I came across this link: tinyurl.com/n3d5es4. This link is ALMOST what I want but it doesn't work: the message `The constructor TFSTeamProjectCollection(String, String, String, String, String, String, String) is undefined` is returned. So I tried this: `URI serverURI = new URI(COLLECTION_URL); Credentials credentials = new DefaultNTCredentials(); TFSTeamProjectCollection tpc = new TFSTeamProjectCollection(serverURI, credentials);` Finally, I had to put native folder (which is inside jar) in my enviroment variables and it worked fine =) – Waldrich Oct 13 '14 at 17:23