build the eclipse project of tucany sdo

日期: 2008-05-26 作者:hongsoft 来源:TechTarget中国

  tuscany的项目结构比较麻烦,我们用eclipse的不太适应,不过其实还是是比较简单的,方法如下:
 
  1)Download the following:


      * JDK 5.0+ (J2SE 1.5.0+)
      * Apache Maven (2.0.4+)
      * Subversion (1.2+)


  2)用svn取到 https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo 的代码


  3)在环境变量 path中加入 maven,设置JAVA_HOME


  4)在cmd中,转到 <sdo-source-root>/sdo目录,执行 mvn
  ( attention:保证网络是连通的)


  5)在cmd中,转到 <sdo-source-root>/sdo/sdo-api目录,执行 mvn -Peclipse eclipse:eclipse


  6)在cmd中,转到 <sdo-source-root>/sdo/impl目录,执行 mvn -Peclipse eclipse:eclipse


  7)在cmd中,转到 <sdo-source-root>/sdo/tools目录,执行 mvn -Peclipse eclipse:eclipse


  后面的工作就需要按E文的来了,基本上是比较简单常用的eclipse操作,比较的不好说,就copy了:


      * Start up eclipse
      * Switch to the Java perspective
      * Execute “File => Import … => General => Existing project into workspace
      * Click “Browse …” Navigate to the spec/sdo-api directory and click OK
      * Select the sdo-api project and click OK
      * After Eclipse has built the project you will see that there are compile errors. This is because Maven has created build dependencies for the project on the contents of your maven repository, but Eclipse doesn”t yet know where that repository is. You must create and assign a value to the M2_REPO variable within eclipse to resolve these dependencies
          o Right click in the Package Explorer frame on the root of the newly created project and select Properties => Java Build Path
          o Click on the “Libraries” tab and select “Add Variable…”, “Configure Variables …”, “New …”
          o Set Name to M2_REPO and Click on “Folder…”
          o Navigate to the “repository” folder/directory (on Windows this is Documents and Settings<user>.m2repository, on Linux it is ~/.m2/repository) and click OK
          o Accept the request for doing a full rebuild
          o Cancel away from the “Configure Variables” dialog
          o Click “OK” on the Project Properties Window
          o When building is complete the project should now have no errors


  Now repeat the same instructions for importing the sdo-impl and sdo-tools projects into the eclipse environment. You aklready have the M2_REPO variable defined now, so these projects should build OK.


  At this point you have three separate projects each dependent on binary artifacts in your maven repository. Don”t be tricked into thinking that
if you modify the sdo-impl project, that those changes will be picked up by the sdo-tools project. If you want this behaviour then follow these steps


      * In the package exlporer pane of the Java perspective, Right Click on Properties and select the libraries tab
      * Select the M2_REPO/commonj/sdo-api* library entry and click “remove”
      * Select the Projects tab and click “Add…”
      * Select the SDO API project and click OK
      * If you plan to work in the tools project
          o Select the “Order and Export” tab and select the sdo-api project and click OK (this means that the sdo-impl project will expose the interfaces of the sdo-api project, so that you don”t have to import them into projects which depend on the sdo-impl project)
          o Repeat the above instructions, removing the sdo-api and sdo-impl library dependencies from the tools project, and adding a project dependency for the sdo-tools project on the sdo-impl project


  原文出处:http://gocom.primeton.com/blog8905_2403.htm

我们一直都在努力坚持原创.......请不要一声不吭,就悄悄拿走。

我原创,你原创,我们的内容世界才会更加精彩!

【所有原创内容版权均属TechTarget,欢迎大家转发分享。但未经授权,严禁任何媒体(平面媒体、网络媒体、自媒体等)以及微信公众号复制、转载、摘编或以其他方式进行使用。】

微信公众号

TechTarget微信公众号二维码

TechTarget

官方微博

TechTarget中国官方微博二维码

TechTarget中国

作者

hongsoft
hongsoft

相关推荐

  • 既熟悉又陌生的开源项目

    Eclipse基金会已成立整整10年了。目前这个开源组织拥有众多项目,其中就包含了最为出名的Java IDE Eclipse以及Mylyn。本文,我们将给您介绍10个已经“掀起波澜”的Eclipse项目。

  • Eclipse中隐藏的5个非常有用的功能

    Eclipse就是一头野兽,它也是一套设备,神秘但更具威力。有些人称它为一个持续变形机。另一些人则称它是一个变异体。

  • 推荐五个提高Java开发效率的工具

    Java已经越来越受程序的重视,俗话说磨刀不误砍柴工,好的工具可以提高Java开发效率,这些工具你都了解吗?

  • Java程序员应该知道的十个调试技巧

    任何一种编程语言都离来开调试这一环节,调试可以帮助识别和解决应用程序缺陷,那么做为java程序呗,你知道在Eclipse中怎样进行调试吗?