Build your Eclipse projects
Build your Java projects in the cloud with Ant or Maven and Visual Studio Online.
Connect to Visual Studio Online
Show the team explorer views.
You'll just use the team explorer here.
In the team explorer view, connect to Visual Studio Online.
Configure the servers.
Add the server.
Provide the URL to your Visual Studio Online account (http://[account].visualstudio.com) and sign in with your Microsoft account.
Connect to the team project.
Set up your build
If you haven't already, upload the code that you're going to build.
From the team explorer in Eclipse, open the builds page.
Create a build definition.
Name the build definition.
Set the trigger to define when builds are run.
Set up the source of the build from a Team Foundation Git repository. Each time you push a commit to any of the selected branches, a build is started automatically because this is a CI build.
Choose the hosted build controller and copy the build output to the server.
Create a build project file.
Create a build configuration based on your Ant or Maven build file.
Choose your Ant or Maven build file to use to build your Java project.
Save your build definition.
Commit and push the changes required for the build to your Git repository.
Now you've created a new build definition for your Java project! Because you pushed a commit to the repository, a build has already been queued.
Since this is a CI build, a build is started every time you push a commit to one of the branches in your source settings tab.
Q: I want to use Ant to build my app in Visual Studio Online, but I'm not using it now. What do I need to do?
A: Set up a local Ant build, and then use the build file when you create your build definition in Visual Studio Online. The Ant manual will help you get started.
Q: Can I build my Java projects contained in a TFVC team project?
A: Yes. See how to do that here.
Q: When I try to create a build definition, I get an error that my workspace does not contain a Git repository with its upstream in the current team project. What should I do?
A: If you get this error, check if you have already imported a project into your Eclipse workspace from a Git team project on Visual Studio Online. If so, you need to configure branches to define the upstream for your Git repository. From the Git Repositories view, select a local branch for the repository and choose Configure Branch from the context menu. Select the values for Upstream Branch and Remote based on the repository that you cloned. Now create your build definition.
Q: What if my build fails?
A: Check here to see the requirements to use the hosted build controller to build your code.
Try this next
Manage your backlog in Visual Studio Online to get the most out of your account.