Myeclipse 创建 Web Maven项目
2016-08-11 13:22
435 查看
1、创建Web项目
添加Maven支持
多模块企业级项目配置实例 pom.xml
添加Maven支持
<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.hi19pay.comm.ctp</groupId> <artifactId>demo-parent</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>demo-parent</name> <description>19pay comm demo-parent project</description> <licenses> <license> <name>19pay CTPI parent</name> <url>http://www.19pay.com.cn</url> <distribution>repo</distribution> <comments>A business-friendly OSS license</comments> </license> </licenses> <organization> <name>hi19pay</name> <url>http://www.19pay.com.cn</url> </organization> <developers> <developer> <name>jiangzx</name> <organization>hi19pay</organization> <organizationUrl>//www.19pay.com.cn</organizationUrl> <roles> <role>comm developer</role> </roles> <email>jiangzx@19pay.com.cn</email> </developer> </developers> <modules> <module>demo-util</module> <module>demo-entity</module> <module>demo-dao</module> <module>demo-service</module> <module>demo-web</module> </modules> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <springversion>3.0.1.RELEASE-A</springversion> <junitversion>4.12</junitversion> </properties> <build> <pluginManagement> <plugins> <!-- 编译源代码 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.6</source> <target>1.6</target> <compilerArguments> <!-- 指定外部lib路径 --> <extdirs>${project.basedir}/lib</extdirs> </compilerArguments> </configuration> </plugin> <!-- 打包源代码 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>3.0.1</version> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <!-- 生成javadoc --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.10.4</version> <executions> <execution> <id>attach-javadocs</id> <goals> <goal>jar</goal> </goals> </execution> </executions> <configuration> <aggregate>true</aggregate> <!-- 多模块工程中,将javadoc集中到父工程 --> <encoding>UTF-8</encoding> </configuration> </plugin> <!-- Test --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>true</skipTests> <!-- 打包过程忽略Junit测试 --> </configuration> </plugin> <!-- 将外部lib一起打成war包 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webResources> <resource> <directory>${project.basedir}/lib</directory> <targetPath>WEB-INF/lib</targetPath> <includes> <include>**/*.jar</include> </includes> </resource> </webResources> </configuration> </plugin> <!-- 生成manifest文件--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.3.1</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <!-- 依赖的jar--> </manifest> </archive> </configuration> </plugin> <!-- mybatis代码生成工具 --> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <verbose>true</verbose> <!--允许移动生成的文件--> <overwrite>true</overwrite> <!--允许覆盖生成的文件--> </configuration> </plugin> </plugins> </pluginManagement> </build> <distributionManagement> <repository> <id>releases</id> <name>Internal Releases</name> <url>http://192.168.63.133:9434/nexus/content/repositories/releases/ </url> </repository> <snapshotRepository> <id>snapshots</id> <name>Internal Snapshots</name> <url>http://192.168.63.133:9434/nexus/content/repositories/snapshots/ </url> </snapshotRepository> </distributionManagement> <dependencyManagement> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.2</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.7.7</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junitversion}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.3.2</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> <version>4.0</version> </dependency> <!-- Apache Commons Codec --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>org.dom4j</groupId> <artifactId>dom4j</artifactId> <version>2.0.0</version> </dependency> </dependencies> </dependencyManagement> </project>
多模块企业级项目配置实例 pom.xml
相关文章推荐
- myeclipse 10创建maven项目(java、javaweb类型)
- Maven的学习资料收集--(十)Myeclipse下创建Maven的Web项目
- Myeclipse2014使用maven创建web项目
- MyEclipse下创建基于Maven集成junit的web项目教程
- MyEclipse使用Maven创建web项目+搭建SSM框架教
- myeclipse maven web项目创建
- Myeclipse2014 用Maven创建第一个web项目(1)---helloworld
- MyEclipse使用Maven创建web项目+搭建SSM框架教程
- MyEclipse中用Maven创建Web项目
- MyEclipse使用Maven创建web项目+搭建SSM框架教
- Maven的学习资料收集--(十)Myeclipse下创建Maven的Web项目
- myeclipse 创建maven项目 creating maven-archetype-webapp has encountered a problem
- Myeclipse之创建maven web项目默认显示 Maven Webapp后缀
- MyEclipse+Maven创建web项目出现的错误总结
- Myeclipse2014 用Maven创建第一个web项目(1)---helloworld
- myeclipse无法创建maven web项目:Could not resolve archetype
- MyEclipse中用Maven创建Web项目(亲测有效)
- MyEclipse创建基于Maven的Web项目去掉项目名后缀方案(Maven Webapp)
- MyEclipse中用Maven创建Web项目
- Myeclipse 创建Maven项目:Cannot detect Web Project version