Use Maven to build the development environment of struts2 on jdk1.4.2

Source: Internet
Author: User

 

1. Download struts-2.0.14-all.zip and struts-2.0.14-backport.zip packages.

 

2. extract these two file to Struts-2.0.14 folder. After extract, the structure shoshould be like below:

 

Apps/

Backport/

Docs/

LIB/

Src/

3. Navigate to backport directory.

4. Run the following command to generate jdk1.4.2 jar package.

 

Java-jar retrotranslator-transformer-1.2.2.jar-advanced-srcjar ../lib/struts2-spring-plugin-2.0.14.jar-destjar struts2-spring-plugin-j4-2.0.14.jar

Java-jar retrotranslator-transformer-1.2.2.jar-advanced-srcjar ../lib/ognl-2.6.11.jar-destjar ognl-j4-2.6.11.jar

Java-jar retrotranslator-transformer-1.2.2.jar-advanced-srcjar ../lib/freemarker-2.3.8.jar-destjar freemarker-j4-2.3.8.jar

 

5. Run the following to install jdk1.4.2 jar files to Maven repository.

MVN install: Install-file-dgroupid = org. Apache. Struts-dartifactid = struts2-core-j4-dversion = 2.0.14-dpackaging = jar-dfile = struts2-core-j4-2.0.14.jar-dgeneratepom = true

MVN install: Install-file-dgroupid = org. Apache. Struts-dartifactid = struts2-spring-plugin-j4-dversion = 2.0.14-dpackaging = jar-dfile = struts2-spring-plugin-j4-2.0.14.jar-dgeneratepom = true

MVN install: Install-file-dgroupid = com. opensymphony-dartifactid = xwork-j4-dversion = 2.0.7-dpackaging = jar-dfile = xwork-j4-2.0.7.jar-dgeneratepom = true

MVN install: Install-file-dgroupid = ognl-dartifactid = ognl-j4-dversion = 2.6.11-dpackaging = jar-dfile = ognl-j4-2.6.11.jar-dgeneratepom = true

MVN install: Install-file-dgroupid = org. freemarker-dartifactid = freemarker-j4-dversion = 2.3.8-dpackaging = jar-dfile = freemarker-j4-2.3.8.jar-dgeneratepom = true

6. Add the following configuration in project Pom. xml file.

 

 

<Dependency> <br/> <groupid> Org. apache. struts </groupid> <br/> <artifactid> struts2-core-j4 </artifactid> <br/> <version> 2.0.14 </version> <br/> </dependency> <br/> <dependency> <br/> <groupid> Org. apache. struts </groupid> <br/> <artifactid> struts2-spring-plugin-j4 </artifactid> <br/> <version> 2.0.14 </version> <br/> </dependency> <br/> <dependency> <br/> <groupid> COM. opensymphony </groupid> <br/> <artifactid> xwork-j4 </artifactid> <br/> <version> 2.0.7 </version> <br/> </dependency> <br/> <dependency> <br/> <groupid> Org. springframework </groupid> <br/> <artifactid> spring </artifactid> <br/> <version> 2.0.5 </version> <br/> </dependency> <br/> <dependency> <br/> <groupid> ognl </groupid> <br/> <artifactid> ognl-j4 </artifactid> <br/> <version> 2.6.11 </version> <br/> </dependency> <br/> <groupid> Org. freemarker </groupid> <br/> <artifactid> freemarker-j4 </artifactid> <br/> <version> 2.3.8 </version> <br/> </dependency> <br/> <dependency> <br/> <groupid> net. SF. extends translator </groupid> <br/> <artifactid> extends translator-runtime </artifactid> <br/> <version> 1.2.7 </version> <br/> </dependency> <br/> <dependency> <br/> <groupid> net. SF. extends translator </groupid> <br/> <artifactid> extends translator-transformer </artifactid> <br/> <version> 1.2.7 </version> <br/> </dependency> <br/> <dependency> <br/> <groupid> backport-util-concurrent </groupid> <br/> <artifactid> backport-util-concurrent </artifactid> <br /> <version> 3.0 </version> <br/> </dependency>

 

7. Run "MVN package" to compile project or "MVN jetty: Run" to start project.

 

 

 

 

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.