【Maven】pom.xml(1)
在pom.xml加入:
- <build>
- <finalName>oauth2</finalName>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- <include>**/*.jsp</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>8.1.14.v20131031</version>
- <configuration>
- <scanIntervalSeconds>30</scanIntervalSeconds>
- <webApp>
- <contextPath>/</contextPath>
- </webApp>
- </configuration>
- </plugin>
- </plugins>
- </build>
或者加入:
- <build>
- <finalName>oauth2</finalName>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- <include>**/*.jsp</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.12</version>
- <configuration>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- <excludes>
- <exclude>**/Abstract*.java</exclude>
- <exclude>**/*Main.java</exclude>
- </excludes>
- <junitArtifactName>junit:junit</junitArtifactName>
- <argLine>-Xmx512m</argLine>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.mybatis.generator</groupId>
- <artifactId>mybatis-generator-maven-plugin</artifactId>
- <version>${mybatis.generator.version}</version>
- </plugin>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>8.1.14.v20131031</version>
- <configuration>
- <scanIntervalSeconds>30</scanIntervalSeconds>
- <webApp>
- <contextPath>/</contextPath>
- </webApp>
- </configuration>
- </plugin>
- </plugins>
- </build>
整个pom.xml的配置
- <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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.xuan</groupId>
- <artifactId>oauth2</artifactId>
- <packaging>war</packaging>
- <version>0.0.1-SNAPSHOT</version>
- <name>maven</name>
- <url>http://maven.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <junit.version>4.8.2</junit.version>
- <servlet.version>2.5</servlet.version>
- <jsp.version>2.1</jsp.version>
- <slf4j.version>1.6.6</slf4j.version>
- <log4j.version>1.2.14</log4j.version>
- <commons.lang3.version>3.1</commons.lang3.version>
- <commons.codec.version>1.8</commons.codec.version>
- <httpcomponents.version>4.2.5</httpcomponents.version>
- <commons.fileupload.version>1.2.2</commons.fileupload.version>
- <commons.io.version>2.4</commons.io.version>
- <commons.email.version>1.2</commons.email.version>
- <commons.validator.version>1.4.0</commons.validator.version>
- <commons.exec.version>1.2</commons.exec.version>
- <mysql.connector.java.version>5.1.25</mysql.connector.java.version>
- <tomcat.jdbc.version>7.0.39</tomcat.jdbc.version>
- <spring.version>3.1.2.RELEASE</spring.version>
- <mybatis.version>3.2.5</mybatis.version>
- <mybatis.spring.version>1.2.2</mybatis.spring.version>
- <mybatis.generator.version>1.3.2</mybatis.generator.version>
- <freemarker.version>2.3.19</freemarker.version>
- <jackson.version>2.0.1</jackson.version>
- <spymemcached.version>2.10.6</spymemcached.version>
- <!-- Used by MyBatis Generator to Generate Codes -->
- <classPathEntry.mysql.location>${basedir}/target/${project.artifactId}/WEB-INF/lib/mysql-connector-java-${mysql.connector.java.version}.jar</classPathEntry.mysql.location>
- <javaModelGenerator.targetProject>${basedir}/src/main/java</javaModelGenerator.targetProject>
- <sqlMapGenerator.targetProject>${basedir}/src/main/resources</sqlMapGenerator.targetProject>
- <javaClientGenerator.targetProject>${basedir}/src/main/java</javaClientGenerator.targetProject>
- <mybatis.generator.configurationFile>${basedir}/src/test/resources/generatorConfig.xml</mybatis.generator.configurationFile>
- <mybatis.generator.overwrite>true</mybatis.generator.overwrite>
- </properties>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${servlet.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>${jsp.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j.version}</version>
- <exclusions>
- <exclusion>
- <groupId>com.sun.jmx</groupId>
- <artifactId>jmxri</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.jdmk</groupId>
- <artifactId>jmxtools</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.jms</groupId>
- <artifactId>jms</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>${commons.lang3.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>${commons.codec.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>${httpcomponents.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>${commons.fileupload.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>${commons.io.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- <version>${commons.email.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-validator</groupId>
- <artifactId>commons-validator</artifactId>
- <version>${commons.validator.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-exec</artifactId>
- <version>${commons.exec.version}</version>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>${mysql.connector.java.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jdbc</artifactId>
- <version>${tomcat.jdbc.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-orm</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-tx</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis</artifactId>
- <version>${mybatis.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis-spring</artifactId>
- <version>${mybatis.spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.freemarker</groupId>
- <artifactId>freemarker</artifactId>
- <version>${freemarker.version}</version>
- </dependency>
- <!-- 支持JSON输出 -->
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>net.spy</groupId>
- <artifactId>spymemcached</artifactId>
- <version>${spymemcached.version}</version>
- </dependency>
- <!--
- <dependency>
- <groupId>com.jodconverter-code</groupId>
- <artifactId>jodconverter</artifactId>
- <version>2.2.2</version>
- </dependency>
- -->
- </dependencies>
- <build>
- <finalName>oauth2</finalName>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- <include>**/*.jsp</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>8.1.14.v20131031</version>
- <configuration>
- <scanIntervalSeconds>30</scanIntervalSeconds>
- <webApp>
- <contextPath>/</contextPath>
- </webApp>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
【Maven】pom.xml(1)的更多相关文章
- 【Maven】pom.xml(2)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...
- 【maven】 pom.xml详解
pom.xml详解 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www ...
- 【maven】pom.xml报错:Cannot detect Web Project version.
新建的maven项目 报错如下: Cannot detect Web Project version. Please specify version of Web Project through &l ...
- 【maven】 pom.xml内容没有错,但一直报错红叉 解决办法
1.首先看一下下面的这两个项目,一个是新建的,一个是原来的老项目 2.myEcplise中是点击如下图 Maven4MyEcplise, Ecplise中也是右键,只不过点击Mavene而已,两个一样 ...
- 【maven】pom.xml文件没错,但是项目有小红叉,Problems中可以看到错误:“Dynamic Web Module 3.0 requires Java 1.6 or newer.”
解决方法: 1.将 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>m ...
- 【maven】pom.xml中"spring-boot-maven-plugin"报红问题
问题原因 插件下载速度太慢了,即是从国外的中央仓库里下载的. 没有刷新maven spring-boot-maven-plugin没加版本号(有些电脑不加版本号,也是不会爆红的) 问题解决 maven ...
- 【Maven】pom.xml 配置 eclipse错误
<!-- servlet --> <dependency> <groupId>javax.servlet</groupId> <artifactI ...
- 【maven】pom.xml的exclusions排除依赖传递
在引用两个有冲突的依赖时,就需要把其中一个的依赖中某个依赖排除掉 exclusions 例如: <dependency> <groupId>org.activiti</g ...
- 【Linux】Jenkins安装(一)
摘要 本章介绍Jenkins的简单使用,关于Jenkins的安装,参照[Linux]Jenkins安装(一) 事例说明:在linux环境下,安装的jenkins,集成svn,tomcat的环境,项目是 ...
随机推荐
- 插头DP--URAL1519Formula 1
去年的老朋友.挺怀念的,回来看看. $n \leq 12,m \leq 12$,$n*m$的01矩形,问在0中走路的欧拉回路数.答案保证longlong范围. 先设计插头:左右括号和空插头:然后分3* ...
- 并发编程辅助工具-java.util.concurrent
1. CountDownLatch 类似于计数器的功能,主要用于控制某个任务的执行先后顺序,可以控制某个任务在其他任务(可能是多线程的)执行完 之后,才会去执行. public static void ...
- Linux主机被SSH精神病(Psychos)暴力攻破后成为肉鸡的攻防过程
近日公司局域网突然变得非常慢,上网受到很大影响,不仅仅是访问互联网慢,就连访问公司内部服务器都感到异常缓慢.于是对本局域网网关进行测试: $ ping 10.10.26.254 发现延时很大, ...
- Codeforces 540 D Bad Luck Island
Discription The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors andp pap ...
- Oracle版本–EBS R12.1.1
select * from v$version; Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Productio ...
- sqlalchemy的merge使用
1.先看下文档 merge(instance, load=True) Copy the state of a given instance into a corresponding instance ...
- time is always a factor, time is always now!!!!
https://www.linkedin.com/pulse/time-always-now-joe-alderman ---------------------------------------- ...
- 设计模式入门之原型模式Prototype
//原型模式:用原型实例指定创建对象的种类,并通过拷贝这些原型创建新的对象 //简单来说,当进行面向接口编程时,假设须要复制这一接口对象时.因为不知道他的详细类型并且不能实例化一个接口 //这时就须要 ...
- [游戏]L4D求生之路官方比赛地图修补完好说明
游戏模式:L4D求生之路4356(1.0.2.1)药抗比赛模式 更新日期:2015.06.04 -----毫不留情01----- 1.开局补给手枪 -----毫不留情02----- 1.开局补给手枪 ...
- VS2013带来的"新特性"
VS2013除了引入"Bootstrap"库以外,最大的变化就是.net Framework 4.5下面的都不支持了.也就是说,假设不把.net库升级成.net Framework ...