Build your Java projects in the cloud with Ant and Visual Studio Online.
- 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 folder or folders from version control that you want to include in the build.
-
Choose the hosted build controller and specify the build drop location, and specify a drop location.
The drop location must be a version control folder in your team project.
-
Create a build project file.
-
Create a build configuration based on your Ant build file.
-
Choose your build file.
-
Get Java from version control.
-
Create an archive from the JDK you're using.
-
Add an Ant archive the same way you added Java.
You've created a new build project file based on your Ant build file. You can save the build definition and start building your app.
-
Since this is a CI build, it'll run every time you check code in to the version control folders that it uses. If you want to verify that it works now, go ahead and queue a build.
Q&A
Q:Where are the Java and Ant archives stored?
A:They're added to the libs folder in your team project where all of your Java builds can access them.
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 use Maven to build my project in Visual Studio Online?
A:Yes, but you'll have to use a local build controller.
Q:My team project uses Git for version control. Can I still build my Eclipse projects in Visual Studio Online?
A:Not in that team project. You can create another team project that uses TFVC for version control in the same Visual Studio Online account that has your current team project, and use that to build your Eclipse projects.
Q:When I map the root folder for my team project, does it move the projects that I already have mapped?
A:No, the projects that you already have mapped will continue to be mapped to the local folders that you're using now.
A:What do I do if my build fails?
A:See if you need to do something else to use the hosted build controller to build your code.