<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.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>
    <groupId>jp.co.tis.gsp</groupId>
    <artifactId>gsp-dba-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <version>4.5.0</version>
    <name>GSP Maven Mojo for DBA</name>
    <description>
      To automate the routine work of the DBA, it is a tool to be able to concentrate on the data modeling work.
    </description>
    <url>https://github.com/coastland/gsp-dba-maven-plugin</url>
    
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    
    <developers>
        <developer>
            <name>Yoshitaka Kawashima</name>
            <email>kawasima1016@gmail.com</email>
            <organization>coastland</organization>
            <organizationUrl>https://github.com/coastland</organizationUrl>
        </developer>
        <developer>
            <name>Hideo Ariyoshi</name>
            <email>hariyoshi0427@gmail.com</email>
            <organization>coastland</organization>
            <organizationUrl>https://github.com/coastland</organizationUrl>
        </developer>
        <developer>
            <name>Satoshi Kurokawa</name>
            <email></email>
            <organization>coastland</organization>
            <organizationUrl>https://github.com/coastland</organizationUrl>
        </developer>
        <developer>
            <name>morimoto-kenta</name>
            <email>moriken_judo@yahoo.co.jp</email>
            <organization>coastland</organization>
            <organizationUrl>https://github.com/coastland</organizationUrl>
        </developer>
        <developer>
            <name>Naoki Tamura</name>
            <email>tamu.0.0.tamu@gmail.com</email>
            <organization>coastland</organization>
            <organizationUrl>https://github.com/coastland</organizationUrl>
        </developer>
    </developers>
    
    <scm>
        <connection>scm:git:git://github.com/coastland/gsp-dba-maven-plugin.git</connection>
        <developerConnection>scm:git:ssh://github.com/coastland/gsp-dba-maven-plugin.git</developerConnection>
        <url>https://github.com/coastland/gsp-dba-maven-plugin/tree/master</url>
    </scm>
    
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh-snapshot</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <seasarVersion>2.4.46</seasarVersion>
        <mavenVersion>3.0.5</mavenVersion>
        <mavenPluginPluginVersion>3.3</mavenPluginPluginVersion>
        <jacoco.ut.execution.data.file>${project.build.directory}/coverage-reports/jacoco-ut.exec</jacoco.ut.execution.data.file>
        <builtByUser>${user.name}</builtByUser>
    </properties>

    <prerequisites>
        <maven>${mavenVersion}</maven>
    </prerequisites>

    <build>
        <extensions>
            <extension>
                <!-- this extension is required by wagon in order to pass the proxy -->
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-http-lightweight</artifactId>
                <version>2.4</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Built-By>${builtByUser}</Built-By>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${mavenPluginPluginVersion}</version>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <argLine>-Dfile.encoding=UTF-8</argLine>
                            <excludes>
                                <exclude>jp.co.tis.gsp.tools.dba.mojo.*</exclude>
                                <exclude>jp.co.tis.gsp.test.util.*</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.2</version>
                    <configuration>
                        <!-- 依存モジュールJDK8以降のものが存在するためビルドはJDK8で行う -->
                        <source>1.6</source>
                        <target>1.6</target>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <repositories>
        <repository>
            <id>maven.seasar.org</id>
            <name>The Seasar Foundation Maven Repository</name>
            <url>https://maven.seasar.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
      <dependency>
        <groupId>org.seasar.doma</groupId>
        <artifactId>doma</artifactId>
        <version>2.16.0</version>
        <scope>provided</scope>
      </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
            <version>2.4.4</version>
            <exclusions>
                <exclusion>
                    <artifactId>plexus-container-default</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-tools-annotations</artifactId>
            <version>${mavenPluginPluginVersion}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>maven-project</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>plexus-container-default</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${mavenVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
            <version>4.13.1</version>
        </dependency>

        <dependency>
            <groupId>org.seasar.container</groupId>
            <artifactId>s2-framework</artifactId>
            <version>${seasarVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.seasar.container</groupId>
            <artifactId>s2-extension</artifactId>
            <version>${seasarVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.seasar.container</groupId>
            <artifactId>s2-tiger</artifactId>
            <version>${seasarVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.seasar.container</groupId>
            <artifactId>s2jdbc-gen</artifactId>
            <version>${seasarVersion}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jta_1.1_spec</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jpa_3.0_spec</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.javacsv</groupId>
            <artifactId>javacsv</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.7</version>
        </dependency>

        <dependency>
            <groupId>com.github.jsqlparser</groupId>
            <artifactId>jsqlparser</artifactId>
            <version>0.9.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-j2ee_1.4_spec</artifactId>
            <version>1.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-ejb_3.0_spec</artifactId>
            <version>1.0.1</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.182</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>sql-maven-plugin</artifactId>
            <version>1.5</version>
            <exclusions>
                <exclusion>
                    <artifactId>maven-project</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
            </exclusions>
        </dependency>        
        
        
        <!-- Test -->
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-compat</artifactId>
            <version>${mavenVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${mavenVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-aether-provider</artifactId>
            <version>${mavenVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.sonatype.sisu.inject</groupId>
            <artifactId>guice-plexus-shim</artifactId>
            <version>2.3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-invoker</artifactId>
            <version>2.0.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-connector-file</artifactId>
            <version>1.13.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.2.10.jre6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.49</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.ibm.db2</groupId>
            <artifactId>jcc</artifactId>
            <version>11.1.4.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle.database.jdbc</groupId>
            <artifactId>ojdbc8</artifactId>
            <version>19.7.0.0</version>
            <scope>test</scope>
        </dependency>
       <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>8.2.1.jre8</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>solr</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>1.7</version>
                        <executions>
                            <execution>
                                <id>add-source</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>src/addon/solr/java</source>
                                    </sources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.apache.solr</groupId>
                    <artifactId>solr-solrj</artifactId>
                    <version>4.1.0</version>
                    <optional>true</optional>
                </dependency>

                <dependency>
                    <groupId>org.apache.solr</groupId>
                    <artifactId>solr-core</artifactId>
                    <version>4.1.0</version>
                    <optional>true</optional>
                    <exclusions>
                        <exclusion>
                            <groupId>woodstox</groupId>
                            <artifactId>wstx-asl</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>

                <dependency>
                    <groupId>net.unit8.solr</groupId>
                    <artifactId>solr-jdbc-s2jdbc</artifactId>
                    <version>0.2.0</version>
                    <optional>true</optional>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>ossrh</id>
            <build>
                <plugins>
                    <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-source-plugin</artifactId>
                       <version>2.2.1</version>
                       <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>    
        </profile>
        <profile>
            <id>all_test</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.19.1</version>
                        <executions>
                            <execution>
                                <id>default-test</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration combine.self="override">
                                    <argLine>-Dfile.encoding=UTF-8 ${jacocoArgs}</argLine>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.7.6.201602180812</version>
                        <executions>
                            <execution>
                                <id>prepare-agent</id>
                                <phase>test-compile</phase>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <destFile>${jacoco.ut.execution.data.file}</destFile>
                                    <propertyName>jacocoArgs</propertyName>
                                </configuration>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <dataFile>${jacoco.ut.execution.data.file}</dataFile>
                                    <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>2.0.0</version>
                        <configuration>
                            <pom>src/it/simple-jpa-test/pom.xml</pom>
                            <addTestClassPath>true</addTestClassPath>
                            <invokerPropertiesFile>invoker.properties</invokerPropertiesFile>
                            <settingsFile>src/test/resources/settings.xml</settingsFile>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <goals>
                                <goal>clean</goal>
                                <goal>gsp-dba:generate-ddl</goal>
                                <goal>gsp-dba:execute-ddl</goal>
                                <goal>gsp-dba:generate-entity</goal>
                                <goal>resources:testResources</goal>
                                <goal>test</goal>
                            </goals>
                            <properties>
                              <gsp.version>${project.version}</gsp.version>
                            </properties>
                        </configuration>
                        <executions>
                            <execution>
                                <id>gsp-install</id>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                           </execution>
                           <execution>
                               <id>db2</id>
                               <goals>
                                   <goal>run</goal>
                               </goals>
                               <configuration>
                                   <profiles>
                                       <profile>db2</profile>
                                   </profiles>
                               </configuration>
                           </execution>
                           <execution>
                               <id>h2</id>
                               <goals>
                                   <goal>run</goal>
                               </goals>
                               <configuration>
                                   <profiles>
                                       <profile>h2</profile>
                                   </profiles>
                               </configuration>
                           </execution>
                           <execution>
                               <id>mysql</id>
                               <goals>
                                   <goal>run</goal>
                               </goals>
                               <configuration>
                                   <profiles>
                                       <profile>mysql</profile>
                                   </profiles>
                               </configuration>
                           </execution>
                           <execution>
                               <id>oracle</id>
                               <goals>
                                   <goal>run</goal>
                               </goals>
                               <configuration>
                                   <profiles>
                                       <profile>oracle</profile>
                                   </profiles>
                               </configuration>
                           </execution>
                           <execution>
                               <id>postgresql</id>
                               <goals>
                                   <goal>run</goal>
                               </goals>
                               <configuration>
                                   <profiles>
                                       <profile>postgresql</profile>
                                   </profiles>
                               </configuration>
                           </execution>
                           <execution>
                               <id>sqlserver</id>
                               <goals>
                                   <goal>run</goal>
                               </goals>
                               <configuration>
                                   <profiles>
                                       <profile>sqlserver</profile>
                                   </profiles>
                               </configuration>
                           </execution>
                       </executions>
                   </plugin>
                </plugins>
            </build>
            
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-report-plugin</artifactId>
                        <reportSets>
                            <reportSet>
                                <reports>
                                    <report>report-only</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <reportSets>
                            <reportSet>
                                <inherited>true</inherited>
                                <reports>
                                    <report>report</report>
                                </reports>
                                <configuration>
                                    <excludes>
                                        <exclude>**/HelpMojo.class</exclude>
                                        <exclude>**/GenerateService.class</exclude>
                                        <exclude>**/SolrGenDialect.class</exclude>
                                        <exclude>**/ViewAnalyzer.class</exclude>
                                    </excludes>
                                    <dataFile>${jacoco.ut.execution.data.file}</dataFile>
                                    <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                                </configuration>
                            </reportSet>
                        </reportSets>
                    </plugin>
                </plugins>
            </reporting>
          </profile>
          <profile>
            <id>disable-java8-doclint</id>
            <activation>
              <jdk>[1.8,)</jdk>
            </activation>
            <properties>
              <additionalparam>-Xdoclint:none</additionalparam>
            </properties>
          </profile>
    </profiles>
</project>
