编程语言 php java

JEEWEB的Maven的配置文件pom.xml

java HTML我帮您 1年前  0次浏览
简介:

什么是POM?

POM是项目对象模型(Project Object Model)的简称,它是Maven项目中的文件,使用XML表示,名称叫做pom.xml。在Maven中,当谈到Project的时候,不仅仅是一堆包含代码的文件。一个Project往往包含一个配置文件,包括了与开发者有关的,缺陷跟踪系统,组织与许可,项目的URL,项目依赖,以及其他。它包含了所有与这个项目相关的东西。事实上,在Maven世界中,project可以什么都没有,甚至没有代码,但是必须包含pom.xml文件。

概览

下面是一个POM项目中的pom.xml文件中包含的元素。注意,其中的modelVersion是4.0.0,这是当前仅有的可以被Maven2&3同时支持的POM版本,它是必须的。

         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">
4.0.0

基本设置
...
...
...
...
...
...
...
...
...

构建过程的设置
...
...

项目信息设置
...
...
...
...
...
...
...
...

环境设置
...
...
...
...
...
...
...
...
...

基本的设置:

POM包含了一个project所需要的所有信息,当然也就包含了构建过程中所需要的插件的配置信息,事实上,这里申明了"who","what",和"where",然而构建生命周期(build lifecycle)s中说的是"when"和"how"。这并不是说POM并能影响生命周期的过程-事实上它可以。例如,配置一个可以嵌入ant任务到POM的mavem-antrun-plugin。它基本上就是一个声明。就像build.xml告诉ant当运行时它该做什么一样,一个POM申明了它自己的配置。如果外力迫使生命周期跳过了ant插件的执行,这并不影响那些已经执行过的插件产生的效果。这一点和build.xml不一样。

Maven坐标

上面的POM定义的是Maven2&3都承认的最小部分。groupId:artifactId:version是必须的字段(尽管在继承中groupId和version不需要明确指出)。这三个字段就像地址和邮戳,它标记了仓库中的特定位置,就像Maven projects的坐标系统一样。

JEEWEB详细配置如下:

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">
4.0.0

html580.jeeweb
jeeweb
war
1.0-SNAPSHOT
jeeweb
https://github.com/html580/JEEWEB

jeeweb
http://bbs.html580.com/forum.php?gid=47


设定除中央仓库(repo1.maven.org/maven2/)外的其他仓库,按设定顺序进行查找.

如有Nexus私服, 取消注释并指向正确的服务器地址.

nexus-repos
Team Nexus Repository
http://localhost:8081/nexus/content/groups/public



apache-repo
apache Repository
https://repository.apache.org/content/groups/public/


java-repo
java Repository
http://download.java.net/maven/2/


springsource-repo
SpringSource Repository
http://repo.spring.io/release/


springsource-repo-snapshot
SpringSource Repository
http://repo.spring.io/snapshot/


cloudhopper
Repository for Cloudhopper
http://maven.cloudhopper.com/repos/third-party/


jboss-repo-releases
Jboss Repository
https://repository.jboss.org/nexus/content/repositories/releases/


central
Maven Repository Switchboard
default
http://repo.maven.apache.org/maven2


maven-repo1
maven-repo1
default
http://repo1.maven.org/maven2/


sourceforge-releases
Sourceforge Releases
https://oss.sonatype.org/content/repositories/sourceforge-releases/




开发人员信息


dengzhifeng
280160522@qq.com
http://www.html580.com

software engineer

8



许可证


Apache License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0



问题反馈信息

JEEWEB
http://bbs.html580.com/forum.php?gid=47




UTF-8
version setting
4.2
3.1

3.1
4.0
2.4
15.0
1.3
1.6
1.9.2

4.11
1.9.5
1.5.2
1.3.174
8.1.8.v20121106

3.0.1
2.2
1.2
1.1.2

1.7.4
4.0.0.RELEASE
1.4.1.RELEASE

4.3.0.Final
4.3.0.Final
4.0.4.Final
5.0.2.Final

3.18.0-GA
2.6.6
1.2.2

1.7.5
1.0.13

0.2.23
1.1.34

4.3.1

1.6.1
2.3
3.2.3.Final
2.0-alpha-1

1.7.3

mysql driver setting
mysql
mysql-connector-java
5.1.13

oracle driver setting
com.oracle
ojdbc14
10.2.0.1.0

mssql driver setting
net.sourceforge.jtds
jtds
1.2.4

other setting
1.6
2.1
7.6.10.v20130312
UTF-8


依赖项定义

测试相关jar包

junit
junit
${junit.version}
test


org.mockito
mockito-all
${mockito.version}
test



org.springframework
spring-test
${spring.version}



com.h2database
h2
${h2.version}
test



org.eclipse.jetty
jetty-server
${jetty.version}
test


javax.servlet
org.eclipse.jetty.orbit




cglib asm 相关jar包

cglib
cglib
${cglib.version}


org.ow2.asm
asm
${asm.version}


utils 相关jar包

org.apache.commons
commons-lang3
${commons-lang3.version}


org.apache.commons
commons-collections4
${common-collections4.version}


com.google.guava
guava
${guava.version}


commons-io
commons-io
${commons-io.version}


commons-codec
commons-codec
1.7


commons-beanutils
commons-beanutils
1.8.3


commons-logging
commons-logging




commons-fileupload
commons-fileupload
${common.fileupload.version}


org.apache.commons
commons-compress
${common.compress.version}


org.apache.ant
ant
${ant.version}


ant-launcher
org.apache.ant




data source 相关jar包

com.alibaba
druid
${druid.version}


jdbc driver

${jdbc.driver.groupId}
${jdbc.driver.artifactId}
${jdbc.driver.version}
runtime


日志相关jar包

org.slf4j
slf4j-api
${slf4j.version}


org.slf4j
jcl-over-slf4j
${slf4j.version}



ch.qos.logback
logback-classic
${logback.version}


web相关jar包

javax.servlet
javax.servlet-api
${servlet.version}
provided


javax.servlet.jsp
jsp-api
${jsp.version}
provided


taglibs
standard
${standard.version}


javax.servlet
jstl
${jstl.version}


aspectj相关jar包

org.aspectj
aspectjrt
${aspectj.version}


org.aspectj
aspectjweaver
${aspectj.version}



spring相关jar包

org.springframework
spring-context
${spring.version}


org.springframework
spring-context-support
${spring.version}


org.springframework
spring-jdbc
${spring.version}


org.springframework
spring-orm
${spring.version}


org.springframework
spring-tx
${spring.version}

spring webmvc相关jar包

org.springframework
spring-webmvc
${spring.version}


org.springframework
spring-web
${spring.version}


spring jpa

org.springframework.data
spring-data-jpa
${spring.data.jpa.version}


jcl-over-slf4j
org.slf4j




hibernate相关jar包

org.hibernate
hibernate-core
${hibernate.core.version}


commons-logging
commons-logging


javassist
javassist




org.hibernate
hibernate-entitymanager
${hibernate.core.version}


org.javassist
javassist
${javassist.version}


commons-logging
commons-logging




org.hibernate
hibernate-ehcache
${hibernate.ehcache.version}


commons-logging
commons-logging


ehcache-core
net.sf.ehcache




org.hibernate.common
hibernate-commons-annotations
${hibernate.commons.annotaions.version}


commons-logging
commons-logging


org.hibernate
hibernate


commons-logging
commons-logging




hibernate validator 相关jar包

org.hibernate
hibernate-validator
${hibernate.validator.version}


apache shiro 相关jar包

org.apache.shiro
shiro-core
${shiro.version}


org.apache.shiro
shiro-web
${shiro.version}


org.apache.shiro
shiro-aspectj
${shiro.version}


org.apache.shiro
shiro-ehcache
${shiro.version}


org.apache.shiro
shiro-spring
${shiro.version}


org.apache.shiro
shiro-quartz
${shiro.version}


quartz
org.opensymphony.quartz




quartz

org.quartz-scheduler
quartz
${quartz.version}


c3p0
c3p0




encache 相关jar包

net.sf.ehcache
ehcache-core
${ehcache.core.version}
compile


slf4j-api
org.slf4j




json 相关jar包


com.alibaba
fastjson
${fastjson.version}


安全相关jar包

httpclient相关jar包

org.apache.httpcomponents
httpclient
${httpclient.version}


commons-logging
commons-logging




dom4j

dom4j
dom4j
${dom4j.version}


xml-apis
xml-apis




时间相关
日期美化

org.ocpsoft.prettytime
prettytime
${prettytime.version}

joda time 相关jar包

joda-time
joda-time
${joda-time.version}


jcaptcha 验证码

com.octo.captcha
jcaptcha
${jcaptcha.version}


com.octo.captcha
jcaptcha-integration-simple-servlet
${jcaptcha.version}


servlet-api
javax.servlet




html处理jar包

org.jsoup
jsoup
${jsoup.version}




${project.basedir}/src/main/webapp/WEB-INF/classes/

Compiler 插件, 设定JDK版本

org.apache.maven.plugins
maven-compiler-plugin
2.5.1

${jdk.version}
${jdk.version}
true



war 打包插件, 设定war包名称不带版本号

org.apache.maven.plugins
maven-war-plugin
2.3

${project.artifactId}



Eclipse 插件

org.apache.maven.plugins
maven-eclipse-plugin
2.9

false
false
2.0
增加设置项目encoding的文件


.settings/org.eclipse.core.resources.prefs

=${project.build.sourceEncoding}${line.separator}>>>




org.springframework.ide.eclipse.core.springnature




tomcat6插件

org.apache.tomcat.maven
tomcat6-maven-plugin
${tomcat.version}

/${project.artifactId}



tomcat7插件

org.apache.tomcat.maven
tomcat7-maven-plugin
${tomcat.version}

/${project.artifactId}



jetty插件

org.mortbay.jetty
jetty-maven-plugin
${jetty.version}


/${project.artifactId}




resource插件

org.apache.maven.plugins
maven-resources-plugin
2.6


install插件

org.apache.maven.plugins
maven-install-plugin
2.4


clean插件

org.apache.maven.plugins
maven-clean-plugin
2.5


ant插件

org.apache.maven.plugins
maven-antrun-plugin
1.7


dependency插件

org.apache.maven.plugins
maven-dependency-plugin
2.5.1
















发表评论