Maven +eclipse+subverson (SVN) development (Environment building)

Source: Internet
Author: User
Tags svn sonatype
Tools Download

1 Download JDK

2. Install Eclipse to HTTP://WWW.ECLIPSE.ORG/DOWNLOADS/PACKAGES/ECLIPSE-IDE-JAVA-EE-DEVELOPERS/INDIGOSR1

Download the latest version of Jeeeclipse

3. Install Maven to:

Http://maven.apache.org/download.html

Download the configuration of the latest version of the MAVEN environment

1. Configure the JDK environment and MAVEN environment variables in My computer's properties

2. Configure the JDK you just installed in eclipse

3. Install the following plugins in eclipse:

1. Subversion Version Controller: http://subclipse.tigris.org/update_1.6.x

2, M2eclipse plug-in http://m2eclipse.sonatype.org/sites/m2e/


3, M2eclipse expansion http://m2eclipse.sonatype.org/sites/m2e-extras/

Or: http://download.jboss.org/jbosstools/updates/m2e-extensions/


Choose Maven Integration for Eclipse WTP (Web project plug-in)

Maven Integration for subeclipse (SVN plugin)


Run the project

The SVN download project requires the following two steps:

1. Configure SVN to build a resource pool

2. Configuring the SCM for MAVEN projects

1. Choose Checkout Maven Projects from SCM


2. Fill in the SVN address

Note that this address should be svn://192.168.16.51/repos/trunk.

Trunk directory because of this trunk directory.


3. Click Finish to download the project.


FAQ :

1, the best is the file format of the project Unified UTF-8 or GBK, and then in the Pom.xml compiled plug-in to add the following content:

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<configuration>

<source>1.5</source>

<target>1.5</target>

<encoding>UTF-8</encoding>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-resources-plugin</artifactId>

<configuration>

<source>1.5</source>

<target>1.5</target>

<encoding>UTF-8</encoding>

</configuration>

</plugin>


M2eclipse may be reported after eclipse runs using the specified Jvm-m2eclipse plug-in cannot find Com.sun Default-tools.jar

1. Add in Pom.xml

<profiles>

<profile>

<id>default-tools.jar</id>

<activation>

<property>

<name>java.vendor</name>

<value>sun Microsystems Inc.</value>

</property>

</activation>

<dependencies>

<dependency>

<groupId>com.sun</groupId>

<artifactId>tools</artifactId>

<version>1.5.0_05</version>

<scope>system</scope>

<systempath>${java.home}/. /lib/tools.jar</systempath>

</dependency>

</dependencies>

</profile>

</profiles>



2. Open the Eclipse.ini file to add:

-vm

H:\progra~1\java\jdk1.7.0_04\jre\bin\javaw.exe

Attention:

There can be no spaces, otherwise you should use the to instead, such as: ' Program Files ' are ' progra~1′

Javaw.exe inside the JRE

Be sure to: before-vmargs


File compilation for default eclipse:


Why can't I find a class when the Web project starts.

1, it is possible to update the version of a jar package in pom.xml, resulting in the long version is still left under the Webapp/web-inf/lib, this is a very common problem, if upgrading a submodule may also result in a long version of the various problems under LIB.


Why install Maven plugin error.
Choose 3.7 version of the download, MAVEN plug-in installation will rely on this plug-in, there will be no error, the information is as follows:
Cannot complete the install because one or more required items could not be found.
Software being Installed:maven integration for Eclipse (Required) 0.10.0.20100209-0800 ( Org.maven.ide.eclipse.feature.feature.group 0.10.0.20100209-0800)
Missing Requirement:maven Integration for Eclipse (Editors) 0.10.0.20100209-0800 (org.maven.ide.eclipse.editor 0.10.0.20100209-0800) requires ' bundle Org.eclipse.zest.core 0.0.0′but it could not being found
Cannot satisfy dependency:
From:maven Integration for Eclipse (Required) 0.10.0.20100209-0800 (org.maven.ide.eclipse.feature.feature.group 0.10.0.20100209-0800)
To:org.maven.ide.eclipse.editor [0.10.0.20100209-0800]

Install the GEF plug-in first
Address: http://download.eclipse.org/tools/gef/updates/interim/

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.