Build the Eclipse project of tucany SDO

Source: Internet
Author: User
Tags sdo
The project structure of Tuscany is troublesome. We are not very comfortable with Eclipse, but it is still relatively simple. The method is as follows:

1) download the following:

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

2) use SVN to get https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo code

3) add Maven to the environment variable path and set java_home.

4) In cmd, go to the <SDO-source-root>/SDO directory and execute MVN
(Attention: ensure that the network is connected)

5) in cmd, go to the <SDO-source-root>/SDO-API directory and execute MVN-peclipse Eclipse: Eclipse

6) in cmd, go to the <SDO-source-root>/SDO/impl directory and execute MVN-peclipse Eclipse: Eclipse

7) in cmd, go to the <SDO-source-root>/SDO/tools directory and execute MVN-peclipse Eclipse: Eclipse

The subsequent work needs to be followed by e-text. Basically, it is relatively simple and commonly used eclipse operations. If it is hard to say, copy it:

* 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>/. m2/Repository, 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 shoshould 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 shocould 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.