struts-Source to Eclipse project

Source: Internet
Author: User
Tags jboss
After struts2, you compile and manage your code with MAVEN.

So you need to study the struts source comrades, when using Elipse to read code, it is best to guide the Eclipse Project, or everywhere wrong,

The bottom procedure assumes that you have installed JDK environment, please check your JDK environment is OK, run->cmd->java-version

Showing your JDK version number indicates that your JDK environment is good.

First please download maven and configure the MAVEN system environment:

1, My Computer-> properties-"advanced-" environment variable: Create an environment variable: M2_home value: C:\apache-maven-3.0.4 (here is your own maven path);

2, in the PATH environment variable append,%m2_home%\bin, the environment variable values are separated by semicolons, so you need to add a semicolon before adding this value;

3, download the struts source, choose download Struts-src.zip

4, please configure maven download some of the package path, the configuration file for Maven installation directory C:\apache-maven-3.0.4\conf\settings.xml, mainly modified

<localRepository> your directory </localRepository> defaults to default: ~/.m2/repository. Here I change to <localRepository>D:\path\to\local\repo</localRepository>

5, run cmd, into the root of your decompression struts, the implementation of MVN Eclipse:eclipse. Note that there may be an error in this process, please see the error hint, I use this version of the error hint there are two

A, in the directory with no find archetypes this block, the solution, please edit pom.xml with the directory, comment out

<!--<module>archetypes</module>-->;

b, under the apps can not find a module: Jboss-blank, please edit the Apps directory Pom.xml <!--<module>jboss-blank</module>--> comment out.

Perform the Maven eclipse:eclipse again.

5. In Eclipse, change the compilation variable add path: Window->prefrence->java->build path->classpath variables, the directory written in the fourth step of the new m2_repo=, As in the fourth step, I wrote D:\path\to\local\repo. To this, please import core and want to workcore two items.

struts-2.3.16.3 Source http://download.csdn.net/detail/yhscsdn/7988221

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.