<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>pentaho-kettle</groupId>
        <artifactId>kettle-sdk-plugin-parent</artifactId>
        <version>8.3.0.0-SNAPSHOT</version>
    </parent>
    <groupId>cn.benma666</groupId>
    <artifactId>KettleEasyExpand</artifactId>
    <packaging>jar</packaging>
    <!-- -SNAPSHOT -->
    <version>0.2.1</version>
    <description>一个简化kettle插件开发的通用插件，采用JSON作为参数配置，省去ui调试设计步骤，只需一个类就可以开发一个插件。</description>

    <name>KettleEasyExpand</name>
    <url>https://gitee.com/majinju/KettleEasyExpand</url>

    <organization>
    	<url>https://gitee.com/majinju/KettleEasyExpand</url>
    	<name>benma666</name>
    </organization>
    <licenses>
       <license>
          <name>GNU GENERAL PUBLIC LICENSE Version 2, June 1991</name>
          <url>http://www.gnu.org/licenses/old-licenses/gpl-2.0.html</url>
          <distribution>actable</distribution>
       </license>
    </licenses>

    <developers>
        <developer>
            <name>majinju</name>
            <email>jinjuma@yeah.net</email>
            <organization>benma666</organization>
            <url>https://gitee.com/majinju/KettleEasyExpand</url>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:majinju/KettleEasyExpand.git</connection>
        <developerConnection>scm:git:git@gitee.com:majinju/KettleEasyExpand.git</developerConnection>
        <url>https://gitee.com/majinju/KettleEasyExpand</url>
    </scm>

	<distributionManagement>
        <snapshotRepository>
          <!-- 这个id需要在setting.xml中设置  -->
          <id>snapshots</id>
          <name>OSS Snapshots Repository</name>
          <!-- 这里的url就是Issue中回复的snapshots 的repo地址-->
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
          <id>snapshots</id>
          <name>OSS Staging Repository</name>
          <!-- 这里的url就是Issue中回复的staging 的repo地址-->
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
	</distributionManagement>

    <properties>
        <!-- 主要依赖库的版本定义 -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdk.version>1.8</jdk.version>
        <junit.version>4.11</junit.version>
        <kettle.version>8.3.0.0-SNAPSHOT</kettle.version>
        <spring-boot.version>2.6.2</spring-boot.version>
        <maven-assembly-plugin.version>3.1.1</maven-assembly-plugin.version>
    </properties>

    <dependencies>

		<!-- kettle start-->
        <dependency>
            <groupId>pentaho-kettle</groupId>
            <artifactId>kettle-core</artifactId>
            <version>${kettle.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>pentaho-kettle</groupId>
            <artifactId>kettle-engine</artifactId>
            <version>${kettle.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>commons-lang</artifactId>
                    <groupId>commons-lang</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>pentaho-kettle</groupId>
            <artifactId>kettle-ui-swt</artifactId>
            <version>${kettle.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.swt</groupId>
            <artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
            <version>4.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>pentaho-kettle</groupId>
            <artifactId>kettle-dbdialog</artifactId>
            <version>${kettle.version}</version>
            <scope>provided</scope>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>org.pentaho.di.plugins</groupId>-->
<!--            <artifactId>excel-plugins-impl</artifactId>-->
<!--            <version>${kettle.version}</version>-->
<!--            <scope>provided</scope>-->
<!--        </dependency>-->
		<!-- kettle end-->
    </dependencies>
    <build>
        <finalName>KettleEasyExpand</finalName>
        <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
        <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
        <outputDirectory>${basedir}/target/classes</outputDirectory>
        <testOutputDirectory>${basedir}/target/classes</testOutputDirectory>

        <plugins>
            <!-- compiler插件, 设定JDK版本 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <showWarnings>true</showWarnings>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

			<!-- Source -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

            <!-- clean插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.5</version>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>distro-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <!--注意,此id必须与setting.xml中指定的一致,不要自作聪明改它名字 releases  snapshots-->
            <id>releases</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <!--发布到中央SNAPSHOT仓库插件-->
                <plugins>
<!--                    <plugin>-->
<!--                        <groupId>org.sonatype.plugins</groupId>-->
<!--                        <artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--                        <version>1.6.7</version>-->
<!--                        <extensions>true</extensions>-->
<!--                        <configuration>-->
<!--                            <serverId>ossrh</serverId>-->
<!--                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
<!--                            <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
<!--                        </configuration>-->
<!--                    </plugin>-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                    <!--生成源码插件-->
                    <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>

                    <!--生成API文档插件-->
                    <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>
                        <configuration>
                            <skip>false</skip>
<!--                            <doclint>none</doclint>-->
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <charset>${project.build.sourceEncoding}</charset>
                            <encoding>${project.build.sourceEncoding}</encoding>
                            <docencoding>${project.build.sourceEncoding}</docencoding>
                        </configuration>
                    </plugin>

                    <!--gpg插件-->
                    <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>

            <distributionManagement>
                <snapshotRepository>
                    <!--注意,此id必须与setting.xml中指定的一致  releases  snapshots-->
                    <id>releases</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>releases</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
                </repository>
            </distributionManagement>
        </profile>

    </profiles>
</project>
