Problems arising from integration of SSH using Maven

Source: Internet
Author: User

Development tools-STS

Server-Tomcat

Development Environment windows 8.1

1. This always happens when you use STS to create a Maven project-the directory is missing

The quickest and easiest way is:

Click Finish:

However, I cannot use myeclipse for this operation. After the operation, I need to manually create SRC. Main. Java and SRC. Test. Java, and perform the following operations:

Src/main/Java and src/main/resource are both modified to target/classes, while src/test/Java is changed to target/test-classes.

2. When writing the Struts-core package to configure Pom. XML, an error is prompted.

Because when using the m2eclipse plug-in, after adding a struts2-core.jar package to Pom. XML, You need to rely on the tools. jar at the Java Runtime for dependency. However, eclipse cannot read the tools package.

Solution: Copy tools. jar in the c: \ Program Files \ Java \ jdk1.6.0 _ 10 \ Lib \ directory

C: \ Documents and Settings \ Dell \. m2 \ repository \ com \ sun \ tools \ 1.5.0 \ directory, and rename tools. jar to tools-1.5.0.jar

Note: Although compilation can be performed after the configuration is completed, a warning prompt will be prompted during the project startup, indicating that tools. jar is missing in POM. xml:

We just need to add a tools-1.5.0.pom file under the directory of tools 1.5.0 as follows:

<? XML version = "1.0" encoding = "UTF-8"?>

<Project xsi: schemalocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns = "http://maven.apache.org/POM/4.0.0"

Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance">

<Modelversion> 4.0.0 </modelversion>

<Groupid> com. Sun </groupid>

<Artifactid> tools </artifactid>

<Version> 1.5.0 </version>

</Project>

In this way, you can.

3. Another problem occurs when Tomcat is started.

I found some information on Baidu, which is caused by the jar package, but I didn't add the jar package. Finally, I found a solution on Google.

If this is configured, the servlet package will be provided by the container tomcat. Start it again.

Problems arising from integration of SSH using Maven

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.