Eclipse+maven+spring Configuration

Source: Internet
Author: User
Tags jboss tomcat server

Since the company can't access the extranet, the configuration of Maven and spring is difficult, but eventually it's done, so let's record the configuration process. First of all, of course, the Java development environment should be configured. Then download and install the following software:

1. Download the decompression installation eclipse:http://www.eclipse.org/downloads/

2.Maven installation and configuration: http://jingyan.baidu.com/article/d8072ac45d3660ec94cefd51.html

3.Spring Eclipse Offline Installation: Https://spring.io/tools/sts/all, Download Springsource-tool-suite-3.7.0.release-e4.5-updatesite.zip

4.Tomcat Server Configuration and installation: http://tomcat.apache.org/download-60.cgi

Due to the inability to connect to the extranet, MAVEN has something that could not be downloaded resulting in a new MAVEN project error (Could not resolve archetype Org.apache.maven.archetypes: Maven-archetype-webapp ), the solution is as follows:

Locate the file in the diagram:

The following changes setting.xml, add the agent, you can refer to this blog: http://www.cnblogs.com/chenying99/archive/2013/06/09/3127930.html

This Hello world level of operation Error, is suspected to be a network problem, so let other colleagues to help me try to access http://repo1.maven.org/maven2/org/apache/maven/plugins/ Maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom address, found completely no problem, feeling unusually depressed. Later on-line check, found that because of the Unicom network, can not access the maven.org website. There are two theories to solve this problem, one is to set up the agent in Maven's configuration file and the other is to set the mirrors of the central repository that can be accessed under the Unicom network in the MAVEN configuration file. Because it is not good to find a stable agent, I searched the internet for two available mirror sites, configured as follows:
1. Open the Maven configuration file (settings.xml file under the Conf directory in the MAVEN installation directory)
2, search mirrors keyword, if there is no <mirrors> node under the note description, then establish mirrors node, with mirrors node all configuration as follows (copy the following, paste into the configuration file):
<mirrors>
<!--Mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| This mirror serves have an ID, that matches, the mirrorof element of this mirror. IDs is used
| For inheritance and direct lookup purposes, and must is unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>human readable name for this mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-
<mirror>
<id>ibiblio.org</id>
<name>ibiblio Mirror of Http://repo1.maven.org/maven2/</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
<mirrorOf>central</mirrorOf>
<!--states, North Carolina--
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>jboss Public Repository group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</mirror>
</mirrors>

After the modification is complete, the new MAVEN project can be created successfully, and after the new eclipse will automatically download the various files, after the new completion, new problems are encountered,Javaweb: Error message the superclass " Javax.servlet.http.HttpServlet "was wasn't found on the Java Build Path, the original is not configured Tomcat, can refer to the following this blog configuration good tomcat:http:// blog.csdn.net/fei20072050104/article/details/21785565.

1, right-click Web Project, Properties->build Path->java Build path->libraries-> Add libray...->server Runtime->tomcat Server. Java Build Orader and Export in the path interface, select Tomcat.

When you do this, you need to set up an Apache server if you open the Server runtime blank. Set the method to: Window->preferences->server->runtime environment, add-on, select the Apache version and click Next. Then fill in the installation (unpacked) address of your Apache server software.

Eclipse+maven+spring Configuration

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.