<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2009-2011 The MyBatis Team

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<!--
  version: $Id: pom.xml 4114 2011-11-27 19:03:32Z simone.tripodi $
-->
<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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.mybatis.generator</groupId>
    <artifactId>mybatis-generator</artifactId>
    <version>1.3.2</version>
  </parent>

  <artifactId>mybatis-generator-core</artifactId>
  <packaging>jar</packaging>
  <name>MyBatis Generator Core</name>

  <build>
    <!-- this build creates and installs an instrumented JAR file
         for use by the systests projects - so we can gather
         consolidated coverage information
    -->
    <plugins>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-site-plugin</artifactId>
      	<executions>
      	  <execution>
      	    <phase>prepare-package</phase>
      	    <goals>
      	      <goal>site</goal>
      	    </goals>
      	  </execution>
      	</executions>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-source-plugin</artifactId>
      	<executions>
      	  <execution>
      	    <phase>prepare-package</phase>
      	    <goals>
      	      <goal>jar-no-fork</goal>
      	    </goals>
      	  </execution>
      	</executions>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-javadoc-plugin</artifactId>
      	<executions>
      	  <execution>
      	    <phase>prepare-package</phase>
      	    <goals>
      	      <goal>jar</goal>
      	    </goals>
      	  </execution>
      	</executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>cobertura-instrument</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>instrument</goal>
            </goals>
          </execution>
        </executions>      
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.mybatis.generator.api.ShellRunner</mainClass>
            </manifest>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>cobertura-jar</id>
            <phase>integration-test</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>cobertura</classifier>
              <classesDirectory>${basedir}/target/generated-classes/cobertura</classesDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <executions>
          <execution>
            <id>cobertura-install</id>
            <phase>integration-test</phase>
            <goals>
              <goal>install</goal>
            </goals>
            <configuration>
              <classifier>cobertura</classifier>
            </configuration>
          </execution>
        </executions>      
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>${basedir}/src/main/assembly/src.xml</descriptor>
          </descriptors>
        </configuration>            
        <executions>
          <execution>
            <id>bundle</id>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.googlecode.maven-gcu-plugin</groupId>
        <artifactId>maven-gcu-plugin</artifactId>
        <executions>
          <execution>
            <phase>deploy</phase>
            <goals>
              <goal>upload</goal>
            </goals>
            <configuration>
              <uploads>
                <upload>
                  <file>${project.build.directory}/${project.artifactId}-${project.version}-bundle.zip</file>
                  <summary>MyBatis Generator ${project.version}</summary>
                  <labels>
                    <label>Featured</label>
                    <label>Type-Archive</label>
                    <label>Product-Generator</label>
                    <label>Version-${project.version}</label>
                  </labels>
                </upload>
              </uploads>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <arguments>-Prelease,gupload</arguments>
        </configuration>
      </plugin>
    </plugins>
  </build>
  
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0-beta-2</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>

  <dependencies>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <scm>
    <url>https://mybatis.googlecode.com/svn/sub-projects/generator/tags/mybatis-generator-1.3.2/mybatis-generator-core</url>
    <connection>scm:svn:https://mybatis.googlecode.com/svn/sub-projects/generator/tags/mybatis-generator-1.3.2/mybatis-generator-core</connection>
    <developerConnection>scm:svn:https://mybatis.googlecode.com/svn/sub-projects/generator/tags/mybatis-generator-1.3.2/mybatis-generator-core</developerConnection>
  </scm>
</project>
