天天看點

Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)



Build your Java projects in the cloud with Ant and Visual Studio Online.

  1. If you haven't already, upload the code that you're going to build. 
  2. From the team explorer in Eclipse, open the builds page.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  3. Create a build definition.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  4. Name the build definition.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  5. Set the trigger to define when builds are run.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  6. Set up the folder or folders from version control that you want to include in the build.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  7. Choose the hosted build controller and specify the build drop location, and specify a drop location.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
    The drop location must be a version control folder in your team project.
  8. Create a build project file.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  9. Create a build configuration based on your Ant build file.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  10. Choose your build file.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  11. Get Java from version control.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  12. Create an archive from the JDK you're using.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  13. Add an Ant archive the same way you added Java.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
    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.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)
  14. 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.
    Build your Eclipse projects(Visual Studio online編譯Eclipse中的項目)

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.

繼續閱讀