<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>

	<groupId>com.jr-database-tools.dbworkbench</groupId>
	<artifactId>connectorbuilder-maven-plugin</artifactId>
	<packaging>maven-plugin</packaging>
	<version>25.1.0</version>

	<contributors></contributors>
	<developers>
		<developer>
			<name>jr-database-tools GmbH</name>
			<email>info@jr-database-tools.com</email>
			<organizationUrl>https://www.jr-database-tools.com</organizationUrl>
		</developer>
	</developers>
	<description>The PL/SQL Connector Builder Maven-Plugin is the CI/CD part of the PL/SQL Enterprise Workbench containing the PL/SQL Connector Builder generating the Java access code to call the stored procedures configured by the PL/SQL Enterprise Workbench.</description>
	<url>https://www.jr-database-tools.com</url>
	<scm>
		<url>https://www.jr-database-tools.com</url>
	</scm>
	<name>PL/SQL Connector Builder Maven-Plugin</name>
	<licenses>
		<license>
			<comments>Free to use, reverse engineering prohibited and without any warranty.</comments>
			<url>https://www.jr-database-tools.com/free_to_use_licence</url>
		</license>
	</licenses>

	<properties>
		<!-- project encoding -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- source version -->
		<maven.compiler.target>11</maven.compiler.target>
		<maven.compiler.source>11</maven.compiler.source>

    <!-- maven dependencies -->
    <maven-plugin-api-version>3.9.9</maven-plugin-api-version>
    <maven-core-version>3.9.9</maven-core-version>
    <maven-plugin-annotations-version>3.15.1</maven-plugin-annotations-version>
    <maven-plugin-plugin-version>3.15.1</maven-plugin-plugin-version>
    <maven-resources-plugin-version>3.3.1</maven-resources-plugin-version>
    <build-helper-maven-plugin-version>3.6.0</build-helper-maven-plugin-version>
    <exec-maven-plugin-version>3.4.1</exec-maven-plugin-version>
    <maven-compiler-plugin-version>3.13.0</maven-compiler-plugin-version>
    <maven-resources-plugin-version>3.3.0</maven-resources-plugin-version>
    <build-helper-maven-plugin-version>3.3.0</build-helper-maven-plugin-version>

    <!-- oracle jdbc driver -->
    <com.oracle.database.jdbc.ojdbc11-version>23.6.0.24.10</com.oracle.database.jdbc.ojdbc11-version>

		<!-- sonatype properties -->
		<nexus-staging-maven-plugin-version>1.6.13</nexus-staging-maven-plugin-version>
		<maven-gpg-plugin-version>3.2.7</maven-gpg-plugin-version>
	</properties>

	<dependencies>
		<!-- apache maven development -->
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${maven-plugin-api-version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>${maven-plugin-annotations-version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<version>${maven-core-version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- oracle jdbc driver -->
		<dependency>
			<groupId>com.oracle.database.jdbc</groupId>
			<artifactId>ojdbc11</artifactId>
			<version>${com.oracle.database.jdbc.ojdbc11-version}</version>
		</dependency>
		<dependency>
			<groupId>com.oracle.database.security</groupId>
			<artifactId>oraclepki</artifactId>
			<version>${com.oracle.database.jdbc.ojdbc11-version}</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>${build-helper-maven-plugin-version}</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>target/connectorbuilder</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${maven-resources-plugin-version}</version>
        <executions>
          <execution>
            <id>copy connectorbuilder sources</id>
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/connectorbuilder</outputDirectory>
              <resources>
                <resource>
                  <directory>../connectorbuilder/src/main/java</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin-version}</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>${maven-plugin-plugin-version}</version>
			</plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.8.1</version>
        <executions>
          <execution>
            <id>obfuscate</id>
            <phase>verify</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>${exec-maven-plugin-version}</version>
        <executions>
          <execution>
            <id>obfuscate</id>
            <phase>verify</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <workingDirectory>${basedir}/.</workingDirectory>
              <executable>java</executable>
              <arguments>
                <argument>-jar</argument>
                <argument>./obfuscate/ZKM.jar</argument>
                <argument>obfuscate_zkm.cfg</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>${nexus-staging-maven-plugin-version}</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>false</autoReleaseAfterClose>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>${maven-gpg-plugin-version}</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
