<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>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>5</version>
    </parent>

    <groupId>com.legsem.legstar</groupId>
    <artifactId>legstar-cob2trans</artifactId>
    <version>1.5.2</version>

    <name>LegStar COBOL to Transformers Generator</name>
    <description>Generates Transformers from COBOL source.</description>
    <url>http://www.legsem.com/legstar/legstar-cob2trans</url>

    <properties>
        <legstarCoreVersion>1.5.8</legstarCoreVersion>
        <legstarCob2XsdVersion>0.3.5</legstarCob2XsdVersion>
        <antInternalVersion>1.7.0</antInternalVersion> <!-- Used for legstar builds and tests -->
        <antVersion>1.6.5</antVersion>  <!-- Expected to be provided at runtime -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
        <buildDate>${maven.build.timestamp}</buildDate>
    </properties>

    <issueManagement>
        <system>Google Code Issue Tracking</system>
        <url>http://code.google.com/p/legstar/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:svn:http://legstar.googlecode.com/svn/tags/legstar-cob2trans-1.5.2</connection>
        <developerConnection>scm:svn:https://legstar.googlecode.com/svn/tags/legstar-cob2trans-1.5.2</developerConnection>
        <url>http://legstar.googlecode.com/svn/tags/legstar-cob2trans-1.5.2</url>
    </scm>

    <distributionManagement>

        <site>
            <id>local.website</id>
            <name>Local Website</name>
            <url>file:///${legstar-dev-website-local-dir}/legstar-cob2trans</url>
        </site>

    </distributionManagement>

    <mailingLists>
        <mailingList>
            <name>LegStar users mailing list</name>
            <subscribe>http://groups.google.com/group/legstar-user/subscribe</subscribe>
            <unsubscribe>http://groups.google.com/group/legstar-user/subscribe</unsubscribe>
            <post>legstar-user@googlegroups.com</post>
            <archive>http://groups.google.com/group/legstar-user/topics</archive>
        </mailingList>
        <mailingList>
            <name>LegStar dev mailing list</name>
            <subscribe>http://groups.google.com/group/legstar-dev/subscribe</subscribe>
            <unsubscribe>http://groups.google.com/group/legstar-dev/subscribe</unsubscribe>
            <post>legstar-dev@googlegroups.com</post>
            <archive>http://groups.google.com/group/legstar-dev/topics</archive>
        </mailingList>
    </mailingLists>

    <developers>
        <developer>
            <id>fady</id>
            <name>Fady Moussallam</name>
            <email>fady AT legsem.com</email>
            <organization>Legsem.com</organization>
            <roles>
                <role>Project Manager</role>
                <role>Architect</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>LegSem</name>
        <url>http://www.legsem.com/</url>
    </organization>

    <dependencies>

        <dependency>
            <groupId>ant</groupId>
            <artifactId>ant</artifactId>
            <version>${antVersion}</version>
        </dependency>

        <dependency>
            <groupId>com.legsem.legstar</groupId>
            <artifactId>legstar-cob2xsd</artifactId>
            <version>${legstarCob2XsdVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.legsem.legstar</groupId>
                    <artifactId>legstar-cobcgen</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.legsem.legstar</groupId>
                    <artifactId>legstar-coxbapi</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.legsem.legstar</groupId>
            <artifactId>legstar-coxbgen</artifactId>
            <version>${legstarCoreVersion}</version>
        </dependency>

        <dependency>
            <groupId>com.legsem.legstar</groupId>
            <artifactId>legstar-cob2xsd</artifactId>
            <version>${legstarCob2XsdVersion}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>

        <!-- JUnit. -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>1.0-beta-2</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-webdav</artifactId>
                <version>1.0-beta-2</version>
            </extension>
        </extensions>

        <pluginManagement>

            <plugins>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.0-beta-9</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>2.2</version>
                    <dependencies>
                     <dependency>
                         <groupId>org.apache.maven.doxia</groupId>
                         <artifactId>doxia-module-docbook-simple</artifactId>
                         <version>1.1.4</version>
                     </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.1</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant</artifactId>
                            <version>${antInternalVersion}</version>
                        </dependency>
                        <dependency>
                            <groupId>ant-contrib</groupId>
                            <artifactId>ant-contrib</artifactId>
                            <version>1.0b3</version>
                        </dependency>
                        <dependency>
                            <groupId>commons-net</groupId>
                            <artifactId>commons-net</artifactId>
                            <version>1.4.1</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant-commons-net</artifactId>
                            <version>${antInternalVersion}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant-nodeps</artifactId>
                            <version>${antInternalVersion}</version>
                        </dependency>
                    </dependencies>

                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.2-beta-5</version>
                </plugin>

            </plugins>

        </pluginManagement>

        <plugins>

            <!-- Produce source jar for each module -->
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Produce javadoc jar for each module -->
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <links>
                        <link>http://download.oracle.com/javaee/1.5/api/</link>
                        <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
                    </links>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                  <!-- Executable jar -->
                  <execution>
                      <id>bundle-exe-jar</id>
                      <phase>package</phase>
                      <goals>
                          <goal>jar</goal>
                      </goals>
                      <configuration>
                          <classifier>exe</classifier>
                          <archive>
                              <manifest>
                                  <addClasspath>true</addClasspath>
                                  <classpathPrefix>lib/</classpathPrefix>
                                  <mainClass>com.legstar.coxb.cob2trans.exe.Cob2TransGeneratorMain</mainClass>
                              </manifest>
                          </archive>
                      </configuration>
                  </execution>

                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <!-- Get the cob2xsd samples (needed for distribution). -->
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>legstar-cob2xsd</includeArtifactIds>
                            <includeClassifiers>test</includeClassifiers>
                        </configuration>
                    </execution>

                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <!-- Create zip distribution. -->
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/assemble/distribution.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <!-- This will check that the distribution file is valid. -->
                    <execution>
                        <id>test-distribution</id>
                        <phase>integration-test</phase>
                        <configuration>
                            <tasks>
                                <ant antfile="${basedir}/src/main/ant/test-distribution.xml" />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>

    </build>

</project>
