Build struts2 spring3 mybatis maven Project Build pom. xml, struts2maven

Source: Internet
Author: User

Build struts2 spring3 mybatis maven Project Build pom. xml, struts2maven

When building an ssm project in maven, you can leave a backup for yourself.

 

Environment Description:

MyEclipse10

Maven 3.2.3

Framework:

Struts2 2.3.24.1

Spring3 3.0.5.RELEASE

Mybatis 3.2.2

Database:

For mysql 5.7

 

<Project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion> 4.0.0 </modelVersion> <groupId> MavenDemo </groupId> <artifactId> MavenDemo </artifactId> <version> 0.0.1-SNAPSHOT </version> <packaging> war </packaging> <name/> <description/> <properties> <Project. build. sourceEncoding> UTF-8 </project. build. sourceEncoding> <struts. version> 2.3.24.1 </struts. version> <struts. exist sist. version> 3.12.1.GA </struts. exist sist. version> <spring. version> 3.0.5.RELEASE </spring. version> <mybatis. version> 3.2.2 </mybatis. version> <mybatis. spring. version> 1.2.1 </mybatis. spring. version> <mysql. version> 5.1.37 </mysql. version> <slf4j. version> 1.7.5 </slf4j. version> <aspectj. v Ersion> 1.6.10 </aspectj. version> </properties> <dependencies> <! -- Struts2 dependency package --> <dependency> <groupId> org. apache. struts </groupId> <artifactId> struts2-core </artifactId> <version >$ {struts. version }</version> </dependency> <groupId> javassist </groupId> <artifactId> javassist </artifactId> <version >$ {struts. exist sist. version }</version> </dependency> <groupId> org. apache. struts </groupId> <artifactId> struts2-spring-plugin </artifactId> <version >$ {Struts. version} </version> </dependency> <! -- Spring dependency package --> <dependency> <groupId> org. springframework </groupId> <artifactId> spring-core </artifactId> <version >$ {spring. version }</version> </dependency> <groupId> org. springframework </groupId> <artifactId> spring-aop </artifactId> <version >$ {spring. version }</version> </dependency> <groupId> org. springframework </groupId> <artifactId> spring-test </artifactId> <version >$ {spri Ng. version }</version> </dependency> <groupId> org. springframework </groupId> <artifactId> spring-tx </artifactId> <version >$ {spring. version }</version> </dependency> <groupId> org. springframework </groupId> <artifactId> spring-beans </artifactId> <version >$ {spring. version }</version> </dependency> <groupId> org. springframework </groupId> <artifactId> spring-context </artif ActId> <version >$ {spring. version }</version> </dependency> <groupId> org. springframework </groupId> <artifactId> spring-aspects </artifactId> <version >$ {spring. version }</version> </dependency> <groupId> org. springframework </groupId> <artifactId> spring-orm </artifactId> <version >$ {spring. version }</version> </dependency> <groupId> org. springframework </groupId> <artifac TId> spring-oxm </artifactId> <version >$ {spring. version }</version> </dependency> <groupId> org. springframework </groupId> <artifactId> spring-web </artifactId> <version >$ {spring. version }</version> </dependency> <! -- Mybatis dependency package --> <dependency> <groupId> org. mybatis </groupId> <artifactId> mybatis </artifactId> <version >$ {mybatis. version }</version> </dependency> <groupId> org. mybatis </groupId> <artifactId> mybatis-spring </artifactId> <version >$ {mybatis. spring. version }</version> </dependency> <! -- Myql dependency package --> <dependency> <groupId> mysql </groupId> <artifactId> mysql-connector-java </artifactId> <version >$ {mysql. version }</version> </dependency> <! -- Aspectj dependency package --> <dependency> <groupId> org. aspectj </groupId> <artifactId> aspectjrt </artifactId> <version >$ {aspectj. version }</version> </dependency> <! -- <Dependency> <groupId> org. aspectj </groupId> <artifactId> aspectjweaver </artifactId> <version >$ {aspectj. version }</version> </dependency> --> <! -- Slf4j dependency package --> <dependency> <groupId> org. slf4j </groupId> <artifactId> slf4j-log4j12 </artifactId> <version >$ {slf4j. version }</version> </dependency> <! -- Test --> <! -- <Dependency> <groupId> junit </groupId> <artifactId> junit </artifactId> <version >$ {junit. version }</version> </dependency> --> </dependencies> <build> <! -- Source folder location definition --> <sourceDirectory >$ {basedir}/src </sourceDirectory> <! -- Output Folder location definition --> <outputDirectory >$ {basedir}/WebRoot/WEB-INF/classes </outputDirectory> <! -- Define the resource file location --> <resources> <resource> <directory >$ {basedir}/src </directory> <excludes> <exclude> **/*. java </exclude> </excludes> </resource> </resources> <plugins> <! -- Package the plugin --> <plugin> <artifactId> maven-war-plugin </artifactId> <configuration> <webappDirectory >$ {basedir}/WebRoot </webappDirectory> <warSourceDirectory> $ {basedir}/WebRoot </warSourceDirectory> </configuration> </plugin> <! -- Compile the plug-in --> <plugin> <artifactId> maven-compiler-plugin </artifactId> <configuration> <source> 1.6 </source> <target> 1.6 </target> </configuration> </plugin> </plugins> </build> </project>

 

Pom download

 

Then there is this basic ssm project, but it is basically just an empty project, just a simple test of the downstream process.

Project download

 

Well, let's try again later.

 

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.