`

maven 添加外部包

 
阅读更多
<?xml version="1.0" encoding="UTF-8"?>
<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>com.zk.mgun</groupId>
  <artifactId>cdjh</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <modules>
    <module>cdjh-access</module>
    <module>cdjh-bath</module>
    <module>cdjh-web</module>
  </modules>
  <dependencies>
  	<dependency>
  		<groupId>org.apache.shiro</groupId>
  		<artifactId>shiro-core</artifactId>
  		<version>${shiro-core-version}</version>
  	</dependency>
  	
  	<dependency>
	  <groupId>org.apache.shiro</groupId>
	  <artifactId>shiro-web</artifactId>
	  <version>${shiro-web-version}</version>
	</dependency>
  	<dependency>
  		<groupId>javax.servlet</groupId>
  		<artifactId>servlet-api</artifactId>
  		<scope>provided</scope>
  		<version>${java-servlet-version}</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-context</artifactId>
  		<version>${org.springframework.version}</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-context-support</artifactId>
  		<version>${org.springframework.version}</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-web</artifactId>
  		<version>${org.springframework.version}</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-webmvc</artifactId>
  		<version>${org.springframework.version}</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-tx</artifactId>
  		<version>${org.springframework.version}</version>
  	</dependency>
  	
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-orm</artifactId>
  		<version>${org.springframework.version}</version>
  	</dependency>
  	
  	<dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-core</artifactId>
         <version>4.3.7.Final</version>
    </dependency>
    <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-c3p0</artifactId>
         <version>4.3.7.Final</version>
    </dependency>
    <dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
			<version>4.3.7.Final</version>
	</dependency>
	
        <dependency>
		    <groupId>org.springframework</groupId>
		    <artifactId>spring-core</artifactId>
		    <version>${org.springframework.version}</version>
		</dependency>
	
	  <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <version>1.1.10.RELEASE</version>
      </dependency>
      
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-commons</artifactId>
			<version>1.9.0.RELEASE</version>
		</dependency>
	
	<dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jpa</artifactId>
        <version>1.7.1.RELEASE</version>
    </dependency>
	
	<!-- AOP begin -->
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjrt</artifactId>
			<version>1.7.1</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.7.1</version>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>2.2.2</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>asm</groupId>
			<artifactId>asm</artifactId>
			<version>3.3.1</version>
			<scope>runtime</scope>
		</dependency>
		<!-- AOP end -->
    
    <dependency>
		<groupId>mysql</groupId>
		<artifactId>mysql-connector-java</artifactId>
		<version>5.1.9</version>
	</dependency>
    <dependency>
		<groupId>org.mybatis</groupId>
		<artifactId>mybatis</artifactId>
		<version>3.2.0</version>
		<scope>provided</scope>
	</dependency>
	
	<!-- 日志相关jar包 -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<!-- common-logging 实际调用slf4j -->
		<!-- <dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency> -->
		<!-- java.util.logging 实际调用slf4j -->
		<!-- <dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency> -->
		
		<!-- <dependency>
		  <groupId>log4j</groupId>
		  <artifactId>log4j</artifactId>
		  <version>1.2.17</version>
		</dependency> -->
		
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis</artifactId>
			<version>3.0.5</version>
		</dependency>
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis-spring</artifactId>
			<version>1.0.0</version>
		</dependency>

        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <!-- <version>1.8.6</version> -->
            <version>2.1.7</version>
        </dependency>

        <dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>
  </dependencies>
  <properties>
  	<shiro-core-version>1.2.3</shiro-core-version>
  	<shiro-web-version>1.2.3</shiro-web-version>
  	<java-servlet-version>2.5</java-servlet-version>
  	<slf4j.version>1.7.9</slf4j.version>
  	<!-- <version>4.1.3.RELEASE</version> -->
  	<!-- <org.springframework.version>3.1.2.RELEASE</org.springframework.version> -->
  	<org.springframework.version>4.1.3.RELEASE</org.springframework.version>
  	<spring-data-releasetrain.version>Evans-SR1</spring-data-releasetrain.version>
  	
  </properties>
  
  
  <repositories>
	<repository>
		<id>nexus</id>
		<name>local private nexus</name>
		<url>http://maven.oschina.net/content/groups/public/</url>
		<releases>
			<enabled>true</enabled>
		</releases>
		<snapshots>
			<enabled>false</enabled>
		</snapshots>
	</repository>
  </repositories>
  <pluginRepositories>
	<pluginRepository>
		<id>nexus</id>
		<name>local private nexus</name>
		<url>http://maven.oschina.net/content/groups/public/</url>
		<releases>
			<enabled>true</enabled>
		</releases>
		<snapshots>
			<enabled>false</enabled>
		</snapshots>
	</pluginRepository>
  </pluginRepositories>
  
  <profiles>
     <profile>
            <id>student</id>
            <activation>
         		<jdk>1.7</jdk>
         		 <activeByDefault>true</activeByDefault>
         	</activation>
         	<properties>
         	    <resource-version>student</resource-version>
         	</properties>
     </profile>
     <profile>
            <id>test</id>
            <activation>
         		<jdk>1.7</jdk>
         		 <activeByDefault>true</activeByDefault>
         	</activation>
         	<properties>
         	    <resource-version>test</resource-version>
         	</properties>
     </profile>
  </profiles>
  
  <build>
      <resources>
          <resource>
              <directory>src/main/java</directory>
              <includes>
                  <include>**/*.xml</include>
                  <include>**/*.ftl</include>
              </includes>
          </resource>
          <resource>
              <directory>src/main/resources</directory>
              <includes>
                  <include>**/*.xml</include>
              </includes>
              <excludes>
                  <exclude>student/*</exclude>
                  <exclude>test/*</exclude>
              </excludes>
          </resource>
          <resource>
              <directory>src/main/resources/${resource-version}</directory>
              <includes>
                  <include>**/*.xml</include>
              </includes>
          </resource>
      </resources>
      
  </build>
  
  
  
</project>

 

注意这时需要把jar 拷贝到WEB-INF/lib 中新建一个文件夹

 

引入子模块

<dependency>
		<groupId>adbrr</groupId>
		<artifactId>adbrr</artifactId>
		<version>2.0</version>
		<scope>system</scope>
		<systemPath>${project.basedir}/lib/adbrr.jar</systemPath>
    </dependency>

 

 

 

 

 

 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics