Home | History | Annotate | Download | only in lib
      1 <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">
      2   <modelVersion>4.0.0</modelVersion>
      3   <groupId>org.hamcrest</groupId>
      4   <artifactId>hamcrest-parent</artifactId>
      5   <packaging>pom</packaging>
      6   <version>1.1</version>
      7   <name>Hamcrest Parent</name>
      8 
      9   <inceptionYear>2006</inceptionYear>
     10   <organization>
     11     <name>Hamcrest</name>
     12     <url>http://code.google.com/p/hamcrest</url>
     13   </organization>
     14 
     15   <licenses>
     16     <license>
     17       <name>BSD style</name>
     18       <url>http://www.opensource.org/licenses/bsd-license.php</url>
     19       <distribution>repo</distribution>
     20     </license>
     21   </licenses>
     22 
     23   <scm>
     24     <developerConnection>scm:svn:https://hamcrest.googlecode.com/svn/tags/hamcrest-packaging-maven-1.1</developerConnection>
     25     <url>https://hamcrest.googlecode.com/svn/tags/hamcrest-packaging-maven-1.1</url>
     26   </scm>
     27 
     28   <modules>
     29     <module>hamcrest-all</module>
     30     <module>hamcrest-core</module>
     31     <module>hamcrest-generator</module>
     32     <module>hamcrest-integration</module>
     33     <module>hamcrest-library</module>
     34   </modules>
     35   
     36   
     37   <!-- NOTE:  all dependencies are declared at scope provided as they are optional -->
     38   <dependencyManagement>
     39     <dependencies>
     40       <dependency>
     41         <groupId>jmock</groupId>
     42         <artifactId>jmock</artifactId>
     43         <version>1.1.0</version>
     44         <scope>provided</scope>
     45       </dependency>
     46       <dependency>
     47         <groupId>junit</groupId>
     48         <artifactId>junit</artifactId>
     49         <version>4.0</version>
     50         <scope>provided</scope>
     51       </dependency>
     52       <dependency>
     53         <groupId>org.easymock</groupId>
     54         <artifactId>easymock</artifactId>
     55         <version>2.2</version>
     56         <scope>provided</scope>
     57       </dependency>
     58     </dependencies>
     59   </dependencyManagement>
     60 
     61   <dependencies>
     62     <dependency>
     63       <groupId>jmock</groupId>
     64       <artifactId>jmock</artifactId>
     65     </dependency>
     66     <dependency>
     67       <groupId>junit</groupId>
     68       <artifactId>junit</artifactId>
     69     </dependency>
     70     <dependency>
     71       <groupId>org.easymock</groupId>
     72       <artifactId>easymock</artifactId>
     73     </dependency>
     74   </dependencies>
     75   
     76   <distributionManagement>
     77     <!--  
     78       The id used must match a server id defined in ~/.m2/settings.xml
     79     -->
     80     <repository>
     81       <id>hamcrest (a] repo1.maven.org</id>
     82       <name>Central Maven Repository</name>
     83       <url>scp://repo1.maven.org/home/projects/hamcrest/repository</url>
     84     </repository>    
     85   </distributionManagement>
     86 
     87   <build>
     88     <plugins>
     89       <plugin>
     90         <groupId>org.apache.maven.plugins</groupId>
     91         <artifactId>maven-jar-plugin</artifactId>
     92         <version>2.1</version>
     93         <configuration>
     94           <archive>
     95             <compress>false</compress>
     96           </archive>
     97         </configuration>
     98       </plugin>
     99       <plugin>
    100         <groupId>org.codehaus.mojo.groovy</groupId>
    101         <artifactId>groovy-maven-plugin</artifactId>
    102         <version>1.0-alpha-3</version>
    103         <executions>
    104           <execution>
    105             <phase>generate-resources</phase>
    106             <goals>
    107               <goal>execute</goal>
    108             </goals>
    109             <configuration>
    110               <source>
    111                 <body>
    112                   def ant = new AntBuilder()
    113                   def script = "${basedir}/src/script/download-jars.sh"
    114                   def version = "${release.version}"
    115                   if ( version == "null" ){
    116                     println("ERROR: 'release.version' property not set.")
    117                   } else {
    118                     println("Using release version ${release.version}")
    119                   }                                      
    120                   if ( new File(script).exists() ){
    121                     // we are in top-level module
    122                     println("Found script "+script)
    123                     ant.exec(executable: script, dir: "${basedir}", 
    124                             spawn: false, failifexecutionfails: true, failonerror: true){
    125                       arg(value: "http://hamcrest.googlecode.com/files/")
    126                       arg(value: "hamcrest-${release.version}.zip" )
    127                       arg(value: "target")
    128                       arg(value: "hamcrest-${release.version}")
    129                     }
    130                   } else {
    131                     // we are in child module
    132                     ant.copy(file: "${download.artifact.dir}/${artifact.name}.jar", 
    133                             tofile: "${project.build.directory}/downloaded.jar", verbose: true)
    134                     ant.unjar(src: "${project.build.directory}/downloaded.jar",
    135                             dest: "${project.build.outputDirectory}")
    136                   }
    137                   </body>
    138               </source>
    139             </configuration>
    140           </execution>
    141         </executions>
    142       </plugin>
    143       <plugin>
    144         <groupId>org.apache.maven.plugins</groupId>
    145         <artifactId>maven-release-plugin</artifactId>
    146         <version>2.0-beta-6</version>
    147         <configuration>
    148           <autoVersionSubmodules>true</autoVersionSubmodules>
    149           <tagBase>https://hamcrest.googlecode.com/svn/tags</tagBase>
    150         </configuration>
    151       </plugin>
    152     </plugins>
    153     <extensions>
    154       <extension>
    155         <groupId>org.apache.maven.wagon</groupId>
    156         <artifactId>wagon-webdav</artifactId>
    157         <version>1.0-beta-2</version>
    158       </extension>
    159     </extensions>
    160   </build>
    161 
    162   <properties>
    163     <release.version>1.1</release.version>
    164     <download.dir>target</download.dir>
    165     <download.name>hamcrest-${release.version}</download.name>
    166     <artifact.name>${artifactId}-${release.version}</artifact.name>
    167     <download.artifact.dir>${basedir}/../${download.dir}/${download.name}/${download.name}</download.artifact.dir>    
    168   </properties>
    169 
    170 </project>