Use eclipse to build a geotools Project

Source: Internet
Author: User

Because geotools was originally built using Maven, you cannot directly import the project to eclipse for compilation. To build geotools using eclipse, perform the following operations:
1. Download and install maven2 at http://maven.apache.org/. configure the maven_homeenvironment variable and configure the bindirectory to the pathenvironment variable.
2. Switch to the geotools main directory and execute the following command: MVN install (this step is to download the public library file). The steps are as follows:


3. Run the following command in the geotools main directory: MVN Eclipse: eclipse to generate the Eclipse project file.
4. Install the Eclipse plug-in of maven2. The address isHttp://m2eclipse.sonatype.org/sites/m2e,

5. Configure the classpath variable m2_repo in eclipse, pointing to % homedrive % homepath %/. m2/Repository (this is the public library file downloaded by Maven ).
6. Import the converted geotools project to eclipse.

The detailed steps for installing maven2 are as follows:

1) download the maven-2.0.x.tar.gzpackage from http://maven.apache.org/download.html.
Go to the directory you downloaded and decompress the package. In Linux, decompress the package with tar. As follows:
Tar zxvf maven-2.0.tar.gz or unzip maven-2.0.zip
2) The "maven-2.0.x" Directory will be created
3) Add the bin directory to your system path (assuming the decompressed directory is/usr/local) as follows:
Export Path =/usr/local/maven-2.0.x/bin: $ path or set Path = "C: \ Program Files \ maven-2.0.x \ bin"; % PATH %
4) Confirm that the java_home environment variable has been set
5) Run "MVN -- version". if the version is displayed, the installation is successful.

Reprinted from: http://hi.baidu.com/hantati/blog/item/555d4f50e43ff16e84352414.html

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.