mina maven配置

LJ 2014-06-05

下载mima的源代码,其项目采用了maven,自己开发新项目也可以按照这个项目结构来组织,

首先是mina的项目主pom.xml

<parent>

<groupId>org.apache</groupId>

<artifactId>apache</artifactId>

<version>11</version>

</parent>

因属于apache下面,所以这么写,公司的话

<parent>

<groupId>com.tobe</groupId>

<artifactId>tobe</artifactId>

<version>1</version>

</parent>

//maven版本

<prerequisites>

<maven>3.0.0</maven>

</prerequisites>

//组织信息

<organization>

<name>ApacheMINAProject</name>

<url>http://mina.apache.org/</url>

</organization>

//主项目信息

<groupId>org.apache.mina</groupId>

<version>2.0.7</version>

<artifactId>mina-parent</artifactId>

<name>ApacheMINA</name>

<packaging>pom</packaging>

//bug管理

<issueManagement>

<system>jira</system>

<url>http://issues.apache.org/jira/browse/DIRMINA</url>

</issueManagement>

//版本控制

<scm>

<connection>scm:svn:https://svn.apache.org/repos/asf/mina/mina/tags/2.0.7</connection>

<url>scm:svn:https://svn.apache.org/repos/asf/mina/mina/tags/2.0.7</url>

<developerConnection>scm:svn:https://svn.apache.org/repos/asf/mina/mina/tags/2.0.7</developerConnection>

</scm>

//组件发布的远程仓库

<distributionManagement>

<site>

<id>apache.websites</id>

<url>scp://people.apache.org/www/mina.apache.org/report/trunk/</url>

</site>

</distributionManagement>

//子模块

<modules>

<module>mina-legal</module>

<module>mina-core</module>

<module>mina-transport-apr</module>

<module>mina-filter-compression</module>

<module>mina-statemachine</module>

<module>mina-integration-beans</module>

<module>mina-integration-xbean</module>

<module>mina-integration-ognl</module>

<module>mina-integration-jmx</module>

<module>mina-example</module>

<module>mina-http</module>

</modules>

//jar依赖版本属性

<!--Jars-->

<version.commons.lang>2.6</version.commons.lang>

<version.easymock>2.5.2</version.easymock>

<version.easymockclassextension>2.5.2</version.easymockclassextension>

<version.jboss.javassist>3.7.ga</version.jboss.javassist>

<version.jdom>1.0</version.jdom>

<version.jmock>1.2.0</version.jmock>

<version.junit>4.10</version.junit>

<version.jzlib>1.1.1</version.jzlib>

<version.log4j>1.2.17</version.log4j>

<version.ognl>3.0.5</version.ognl>

<version.pmd>4.3</version.pmd>

<version.rmock>2.0.2</version.rmock>

<version.slf4j.api>1.6.6</version.slf4j.api>

<version.slf4j.log4j12>1.6.6</version.slf4j.log4j12>

<version.slf4j.jcl.over.slf4j>1.6.6</version.slf4j.jcl.over.slf4j>

<version.springframework>2.5.6.SEC03</version.springframework>

<version.tomcat.apr>5.5.23</version.tomcat.apr>

<version.xbean.spring>3.11.1</version.xbean.spring>

</properties>

//下面这么写,子模块中不用写版本号了,修改版本号,也不用到子模块中一个一个去修改了

<dependencyManagement>

<dependency>

<groupId>org.easymock</groupId>

<artifactId>easymockclassextension</artifactId>

<version>${version.easymockclassextension}</version>

<scope>test</scope>

</dependency>

<dependency>

<groupId>com.agical.rmock</groupId>

<artifactId>rmock</artifactId>

<version>${version.rmock}</version>

<scope>test</scope>

</dependency>

</dependencies>

</dependencyManagement>

<dependencies>

<!--commonlogginginterface-->

<dependency>

<groupId>org.slf4j</groupId>

<artifactId>slf4j-api</artifactId>

</dependency>

</dependencies>

相关推荐

fengshantao / 0评论 2016-03-25

claytang / 0评论 2013-05-06