`

一个maven 配置文件

阅读更多
   1. <?xml version="1.0"?>  
   2. <project>  
   3.   <modelVersion>4.0.0</modelVersion>  
   4.   <groupId>test</groupId>  
   5.   <artifactId>hibernateBundle</artifactId>  
   6.   <packaging>bundle</packaging>  
   7.   <name>Spring OSGi Bundle</name>  
   8.   <version>1.0.0</version>  
   9.   <url>http://www.springframework.org/osgi</url>  
  10.     
  11.   <properties>  
  12.     <slf4j.version>1.4.3</slf4j.version>  
  13.     <spring.maven.artifact.version>2.5.1</spring.maven.artifact.version>  
  14.   </properties>  
  15.     
  16.   <dependencies>  
  17.     <dependency>  
  18.       <groupId>org.springframework.osgi</groupId>  
  19.       <artifactId>junit.osgi</artifactId>  
  20.       <version>3.8.2-SNAPSHOT</version>  
  21.       <scope>test</scope>  
  22.     </dependency>  
  23.     <dependency>  
  24.       <groupId>org.springframework</groupId>  
  25.       <artifactId>spring-test</artifactId>  
  26.       <version>${spring.maven.artifact.version}</version>  
  27.       <scope>test</scope>  
  28.     </dependency>  
  29.     <dependency>  
  30.       <groupId>org.springframework</groupId>  
  31.       <artifactId>spring-core</artifactId>  
  32.       <version>${spring.maven.artifact.version}</version>  
  33.     </dependency>  
  34.     <dependency>  
  35.       <groupId>org.springframework</groupId>  
  36.       <artifactId>spring-context</artifactId>  
  37.       <version>${spring.maven.artifact.version}</version>  
  38.     </dependency>  
  39.     <dependency>  
  40.       <groupId>org.springframework</groupId>  
  41.       <artifactId>spring-beans</artifactId>  
  42.       <version>${spring.maven.artifact.version}</version>  
  43.     </dependency>  
  44.       
  45.     <dependency>  
  46.       <groupId>org.slf4j</groupId>  
  47.       <artifactId>jcl104-over-slf4j</artifactId>  
  48.       <version>${slf4j.version}</version>  
  49.     </dependency>  
  50.   
  51.     <dependency>  
  52.       <groupId>org.slf4j</groupId>  
  53.       <artifactId>slf4j-api</artifactId>  
  54.       <version>${slf4j.version}</version>  
  55.     </dependency>  
  56.       
  57.     <dependency>  
  58.       <groupId>org.slf4j</groupId>  
  59.       <artifactId>slf4j-log4j12</artifactId>  
  60.       <version>${slf4j.version}</version>  
  61.     </dependency>  
  62.       
  63.     <dependency>  
  64.      <groupId>org.osgi</groupId>  
  65.      <artifactId>org.osgi.core</artifactId>  
  66.      <version>4.0</version>  
  67.     </dependency>  
  68.       
  69.     <dependency>  
  70.             <groupId>com.oracle</groupId>  
  71.             <artifactId>ojdbc14</artifactId>  
  72.             <version>10.2.0.3.0</version>  
  73.    </dependency>  
  74.    <dependency>  
  75.     <groupId>org.hibernate</groupId>  
  76.     <artifactId>hibernate-annotations</artifactId>  
  77.     <version>3.4.0.GA</version>  
  78.     <exclusions>  
  79.         <!--排除Slf4j有冲突-->  
  80.         <exclusion>  
  81.             <groupId>org.slf4j</groupId>  
  82.             <artifactId>slf4j-api</artifactId>  
  83.         </exclusion>  
  84.     </exclusions>  
  85.     </dependency>  
  86.       
  87.   </dependencies>  
  88.   
  89.   <!-- for packaging as an OSGi bundle, we use the maven-bundle-plugin -->  
  90.     
  91.   <!-- see http://felix.apache.org/site/maven-bundle-plugin-bnd.html for more info -->  
  92.   <build>  
  93.     <plugins>  
  94.       <plugin>  
  95.         <groupId>org.apache.felix</groupId>  
  96.         <artifactId>maven-bundle-plugin</artifactId>  
  97.         <extensions>true</extensions>  
  98.         <version>1.0.0</version>  
  99.         <configuration>  
 100.            <instructions>  
 101.                <manifestLocation>META-INF</manifestLocation>  
 102.                <Export-Package>test.*</Export-Package>  
 103.                <Import-Package>*</Import-Package>  
 104.            </instructions>  
 105.         </configuration>  
 106.       </plugin>  
 107.         
 108.        <plugin>     
 109.             <groupId>org.apache.maven.plugins</groupId>     
 110.             <artifactId>maven-dependency-plugin</artifactId>   
 111.             <version>2.0</version>  
 112.             <executions>     
 113.                 <execution>     
 114.                     <id>copy-dependencies</id>     
 115.                     <phase>package</phase>     
 116.                     <goals>     
 117.                         <goal>package</goal>     
 118.                     </goals>     
 119.                     <configuration>     
 120.                         <outputDirectory>lib</outputDirectory>     
 121.                         <overWriteReleases>false</overWriteReleases>     
 122.                         <overWriteSnapshots>false</overWriteSnapshots>     
 123.                         <overWriteIfNewer>true</overWriteIfNewer>     
 124.                     </configuration>     
 125.                 </execution>     
 126.             </executions>     
 127.         </plugin>   
 128.         
 129.     </plugins>  
 130.   </build>  
 131.     
 132.   <!-- ================================================ -->  
 133.   <!--            Repository Configuration              -->  
 134.   <!-- ================================================ -->  
 135.   
 136.   <repositories>  
 137.     <repository>      
 138.       <id>apache.m2.incubator</id>  
 139.       <name>Apache M2 Incubator Repository</name>  
 140.       <url>http://people.apache.org/repo/m2-incubating-repository/</url>  
 141.     </repository>    
 142.     <repository>  
 143.        <id>eclipse-repository</id>  
 144.        <name>Eclipse Repository</name>  
 145.        <url>http://repo1.maven.org/eclipse/</url>  
 146.     </repository>  
 147.    
 148.     <repository>  
 149.       <id>spring-ext</id>  
 150.       <name>Spring External Dependencies Repository</name>  
 151.       <url>  
 152.         https://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/  
 153.       </url>  
 154.     </repository>  
 155.   
 156.       
 157.     <repository>  
 158.       <id>i21-s3-osgi-repo</id>  
 159.       <name>i21 osgi artifacts repo</name>  
 160.       <snapshots>  
 161.          <enabled>true</enabled>  
 162.       </snapshots>  
 163.       <url>http://s3.amazonaws.com/maven.springframework.org/osgi</url>  
 164.     </repository>      
 165.       
 166.       
 167.     <repository>  
 168.       <id>i21-s3-maven-repo</id>  
 169.       <name>i21 S3 milestone repo</name>  
 170.       <url>http://s3.amazonaws.com/maven.springframework.org/milestone</url>  
 171.     </repository>  
 172.       
 173.     <!--  
 174.       
 175.     Spring-DM snapshot repository - disabled by default  
 176.       
 177.     <repository>  
 178.      <snapshots><enabled>true</enabled></snapshots>  
 179.       <id>springframework.org</id>  
 180.       <name>Springframework Maven SNAPSHOT Repository</name>  
 181.       <url>http://s3.amazonaws.com/maven.springframework.org/snapshot</url>  
 182.     </repository>  
 183.     -->  
 184.   </repositories>  
 185.   
 186.   <pluginRepositories>  
 187.     <pluginRepository>  
 188.       <id>maven-repo</id>  
 189.       <name>maven repo</name>  
 190.       <url>http://repo1.maven.org/maven2/</url>  
 191.     </pluginRepository>  
 192.      <pluginRepository>    
 193.       <id>flex-mojos-repository</id>    
 194.       <url>http://flex-mojos.googlecode.com/svn/trunk/repository/</url>    
 195.       <releases>    
 196.         <enabled>true</enabled>    
 197.       </releases>    
 198.       <snapshots>    
 199.         <enabled>false</enabled>    
 200.       </snapshots>    
 201.     </pluginRepository>    
 202.     <pluginRepository>    
 203.       <id>epseelon-repository</id>    
 204.      <url>http://m2repo.epseelon.org/</url>    
 205.       <releases>    
 206.         <enabled>true</enabled>    
 207.       </releases>    
 208.       <snapshots>    
 209.         <enabled>false</enabled>    
 210.       </snapshots>    
 211.     </pluginRepository>    
 212.   </pluginRepositories>  
 213.     
 214. </project>  
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics