Build your Eclipse projects(Visual Studio online编译Eclipse中的项目)

来源:互联网 发布:e盾网络验证容易破解吗 编辑:程序博客网 时间:2024/05/16 02:21


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.

      Builds in the team explorer home page  
  3. Create a build definition.

      New build definition link in the team explorer builds page  
  4. Name the build definition.

      General tab in the build definition dialog box 
  5. Set the trigger to define when builds are run.

      Trigger tab in the build definitoin dialog box with the continuous integration trigger selected  
  6. Set up the folder or folders from version control that you want to include in the build.

      Workspace tab in the build definition dialog box with the source control folder mapped to the project to be built  
  7. Choose the hosted build controller and specify the build drop location, and specify a drop location.

      Build defaults tab in the build definition dialog box with the hosted build controller selected and the drops folder set

    The drop location must be a version control folder in your team project.

  8. Create a build project file.

      Create button in the project file tab of the build definition dialog box 
  9. Create a build configuration based on your Ant build file.

      Create build configuration wizard, select a build configuration wizard page with Ant selected 
  10. Choose your build file.

      Ant build file page of the Ant build coniguration wizard with the project build file selected  
  11. Get Java from version control.

      Build configuration wizard, source control selected for Java, Select button 
  12. Create an archive from the JDK you're using.

    Add Java Archive dialog box with the local JDK selected 
  13. Add an Ant archive the same way you added Java.

    Add Ant archive dialog box, local Ant selected

    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.

    Project file tab of the build definition dialog box with the project file created
  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 definition context meny in the team explorer builds page, queue 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. TheAnt 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.

0 0
原创粉丝点击