<!--suppress ALL -->
<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>

	<!-- The Basics -->
	<groupId>org.utplsql</groupId>
	<artifactId>org.utplsql.sqldev</artifactId>
	<version>1.4.0</version>
	<packaging>bundle</packaging>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<jdk.version>1.8</jdk.version>
		<jdk.version.test>1.8</jdk.version.test>
		<!-- requires SQL Developer 4.1.0 or higher (first version based on JDK 1.8) -->
		<sqldev.basedir>/Applications/SQLDeveloper21.4.2.app/Contents/Resources/sqldeveloper</sqldev.basedir>
		<final.name>utplsql_for_SQLDev_${project.version}</final.name>
		<!-- arguments to by added by jacoco plugin for test runs with coverage -->
		<!-- -noverify is required in some environments to avoid java.lang.VerifyError -->
		<argLine>-noverify -Djava.util.logging.config.file=${project.basedir}/src/test/resources/logging.conf</argLine>
	</properties>
	<dependencies>
		<!-- SQL Developer specific dependencies part 1 (not available in public Maven repositories) -->
		<!-- Versions of scope system are based on SQL Developer 21.4.2. Version numbers are reduced to major.minor.bugfix format. -->
		<!-- The actual version is not that important, since the these libraries are provided. -->
		<!-- Therefore it is not planned to update them with every change of sqldev.basedir. Updated for 21.4.2 -->
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>idert</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/lib/idert.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.javatools-nodeps</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/external/oracle.javatools-nodeps.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>javatools</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/lib/javatools.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.ide.ceditor</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/extensions/oracle.ide.ceditor.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.ide</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/extensions/oracle.ide.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>uic</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/lib/uic.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.ide.navigator</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/extensions/oracle.ide.navigator.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>javax-ide</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/lib/javax-ide.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.dbtools-common</artifactId>
			<version>21.4.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/sqldeveloper/lib/dbtools-common.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.sqldeveloper</artifactId>
			<version>21.4.2</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/sqldeveloper/extensions/oracle.sqldeveloper.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.sqldeveloper.utils</artifactId>
			<version>21.4.2</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/sqldeveloper/extensions/oracle.sqldeveloper.utils.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.sqldeveloper.worksheet</artifactId>
			<version>21.4.2</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/sqldeveloper/extensions/oracle.sqldeveloper.worksheet.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.sqldeveloper.schemabrowser</artifactId>
			<version>21.4.2</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/sqldeveloper/extensions/oracle.sqldeveloper.schemabrowser.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>ojdbc8</artifactId>
			<version>21.4.0</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/jdbc/lib/ojdbc8.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>dbapi</artifactId>
			<version>21.4.2</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/lib/dbapi.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.ide.db</artifactId>
			<version>21.4.2</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/extensions/oracle.ide.db.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.jdeveloper.db.connection</artifactId>
			<version>21.4.2</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/jdev/extensions/oracle.jdeveloper.db.connection.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.jdeveloper.java.core.jar</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/jdev/extensions/oracle.jdeveloper.java.core.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.jdeveloper.runner.jar</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/jdev/extensions/oracle.jdeveloper.runner.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>oracle.ide.runner</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/ide/extensions/oracle.ide.runner.jar</systemPath>
		</dependency>
		<dependency>
			<!-- overriding oddgen dependency -->
			<groupId>oracle</groupId>
			<artifactId>javatools-nodeps</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/modules/oracle.javatools/javatools-nodeps.jar</systemPath>
		</dependency>
		<!-- SQL Developer specific dependencies part 2 (used for tests only) -->
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>jewt4.jar</artifactId>
			<version>12.2.1</version>
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/modules/oracle.bali.jewt/jewt4.jar</systemPath>
		</dependency>		
		<dependency>
			<groupId>oracle</groupId>
			<artifactId>share.jar</artifactId>
			<version>12.2.1</version> <!-- original version is JEWT_MAIN_GENERIC_210114.0102.S, that's basically a date -->
			<scope>system</scope>
			<systemPath>${sqldev.basedir}/modules/oracle.bali.share/share.jar</systemPath>
		</dependency>		
		<!-- SQL Developer specific dependencies part 3 (available in public maven repositories) -->
		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<version>3.0.2</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<!-- SQL Developer is using this older version, osgi.core-5.0.0.jar -->
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
			<version>5.0.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- other dependencies -->
		<dependency>
			<!-- used mainly to access the database via JdbcTemplate -->
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>5.3.16</version>
		</dependency>
		<dependency>
			<!-- transitive reference, but IntelliJ wants to have it explicit (to avoid warnings) -->
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>5.3.16</version>
		</dependency>
		<dependency>
			<!-- used for HtmlUtils.htmlEscape in RunnerPanel -->
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>5.3.16</version>
		</dependency>
		<dependency>
			<!-- optional, for RunGenerator and TestGenerator -->
			<groupId>org.oddgen</groupId>
			<artifactId>org.oddgen.sqldev</artifactId>
			<version>0.3.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.2</version>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>23.0.0</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

	<!-- Build Settings -->
	<build>
		<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
		<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>**/*.*</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<version>3.10.0</version>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${jdk.version}</source>
					<target>${jdk.version}</target>
					<!-- used by Maven build -->
					<testSource>${jdk.version.test}</testSource>
					<testTarget>${jdk.version.test}</testTarget>
					<includes>
						<include>**/*.java</include>
					</includes>
				</configuration>
				<executions>
					<!-- used by Eclipse when updating project -->
					<execution>
						<id>test-compile</id>
						<phase>process-test-sources</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
						<configuration>
							<source>${jdk.version.test}</source>
							<target>${jdk.version.test}</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<!-- argline moved to properties, to make it work with jacoco plugin -->
					<includes>
						<include>**/*.java</include>
					</includes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<!-- version inherited from plugin section -->
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<format>{0,date,yyyyMMdd.HHmmss}</format>
					<items>
						<item>timestamp</item>
					</items>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>3.0.0</version><!--$NO-MVN-MAN-VER$-->
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<configuration>
							<target>
								<copy failonerror="true" file="sqldeveloper.xml" tofile="target/sqldeveloper.xml" />
								<copy failonerror="true" file="bundle.xml" tofile="target/bundle.xml" />
								<copy failonerror="true" file="extension.xml"
									tofile="target/classes/META-INF/extension.xml" />
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>1.0.0</version>
				<executions>
					<execution>
						<phase>initialize</phase>
						<goals>
							<goal>read-project-properties</goal>
						</goals>
						<configuration>
							<urls>
								<url>
									file:///${project.basedir}/src/main/resources/org/utplsql/sqldev/resources/UtplsqlResources.properties
								</url>
							</urls>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>parse-version</id>
						<goals>
							<goal>parse-version</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.google.code.maven-replacer-plugin</groupId>
				<artifactId>replacer</artifactId>
				<version>1.5.3</version>
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>replace</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<includes>
						<include>${project.basedir}/target/sqldeveloper.xml</include>
						<include>${project.basedir}/target/bundle.xml</include>
						<include>${project.basedir}/target/classes/META-INF/extension.xml</include>
					</includes>
					<replacements>
						<replacement>
							<token>#EXTENSION_VERSION#</token>
							<value>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${buildNumber}</value>
						</replacement>
						<replacement>
							<token>#EXTENSION_SHORT_VERSION#</token>
							<value>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</value>
						</replacement>
						<replacement>
							<token>#EXTENSION_DEPLOYABLE#</token>
							<value>${final.name}.zip</value>
						</replacement>
						<replacement>
							<token>#EXTENSION_NAME#</token>
							<value>${EXTENSION_NAME}</value>
						</replacement>
						<replacement>
							<token>#EXTENSION_OWNER#</token>
							<value>${EXTENSION_OWNER}</value>
						</replacement>
						<replacement>
							<token>#EXTENSION_DESCRIPTION#</token>
							<value>${EXTENSION_DESCRIPTION}</value>
						</replacement>
						<replacement>
							<token>#MIN_SQLDEV_VERSION#</token>
							<value>${MIN_SQLDEV_VERSION}</value>
						</replacement>
					</replacements>
				</configuration>
			</plugin>
			<plugin>
				<!-- builds the OSGi bundle including MANIFEST.MF with build version number and properties -->
				<!-- IMPORTANT NOTICE: -->
				<!-- disable OSGi facets in IntelliJ (2020.1) to get rid of the following types of warnings/errors: -->
				<!--   - Warning:osgi: [org.utplsql.sqldev] Host ...= for this fragment/require bundle cannot be found on the classpath -->
				<!--   - Warning:osgi: [org.utplsql.sqldev] No translation found for macro: ... -->
				<!--   - Error:osgi: [org.utplsql.sqldev] Input file does not exist: target/classes/META-INF/extension.xml  -->
				<!--   - Error:osgi: [org.utplsql.sqldev] Invalid value for Bundle-Version, ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} does not match \d{1,9}(\.\d{1,9}(\.\d{1,9}(\.[-\w]+)?)?)? -->
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>4.2.1</version>
				<extensions>true</extensions>
				<configuration>
					<finalName>${project.name}</finalName>
					<archive>
						<addMavenDescriptor>false</addMavenDescriptor>
					</archive>
					<instructions>
						<Bundle-SymbolicName>${project.name}</Bundle-SymbolicName>
						<Bundle-Version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</Bundle-Version>
						<Bundle-Build>${buildNumber}</Bundle-Build>
						<Include-Resource>
							{maven-resources},
							{maven-dependencies},
							META-INF/extension.xml=target/classes/META-INF/extension.xml
						</Include-Resource>
						<Export-Package>
							org.utplsql.sqldev.coverage,
							org.utplsql.sqldev.dal,
							org.utplsql.sqldev.exception,
							org.utplsql.sqldev.menu,
							org.utplsql.sqldev.model,
							org.utplsql.sqldev.model.oddgen,
							org.utplsql.sqldev.model.parser,
							org.utplsql.sqldev.model.preference,
							org.utplsql.sqldev.model.runner,
							org.utplsql.sqldev.model.ut,
							org.utplsql.sqldev.oddgen,
							org.utplsql.sqldev.parser,
							org.utplsql.sqldev.resources,
							org.utplsql.sqldev.runner,
							org.utplsql.sqldev.snippet,
							org.utplsql.sqldev.ui.common,
							org.utplsql.sqldev.ui.coverage,
							org.utplsql.sqldev.ui.preference,
							org.utplsql.sqldev.ui.runner
						</Export-Package>
						<_exportcontents>
							org.aspectj.runtime.internal,
							org.aspectj.lang,
							org.aspectj.runtime,
							org.aspectj.lang.reflect,
							org.springframework.core.style,
							org.springframework.lang
						</_exportcontents>
						<_noee>true</_noee>
						<Require-Bundle>
							oracle.javatools,
							oracle.javatools-nodeps,
							oracle.jdeveloper.db.connection,
							oracle.jdeveloper.runner,
							oracle.idert,
							oracle.ide,
							oracle.ide.db,
							oracle.ide.runner,
							oracle.sqldeveloper,
							oracle.sqldeveloper.schemabrowser,
							oracle.sqldeveloper.utils,
							oracle.sqldeveloper.worksheet,
							oracle.uic
						</Require-Bundle>
						<Import-Package>!*</Import-Package>
						<Embed-Directory>lib</Embed-Directory>
						<Embed-Transitive>true</Embed-Transitive>
						<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.3.0</version><!--$NO-MVN-MAN-VER$-->
				<configuration>
					<finalName>${final.name}</finalName>
					<appendAssemblyId>false</appendAssemblyId>
					<descriptors>
						<descriptor>sqldev_assembly.xml</descriptor>
					</descriptors>
					<recompressZippedFiles>true</recompressZippedFiles>
				</configuration>
				<executions>
					<execution>
						<id>deploy-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>net.nicoulaj.maven.plugins</groupId>
				<artifactId>checksum-maven-plugin</artifactId>
				<version>1.9</version>
				<executions>
					<execution>
						<id>calculate-checksums</id>
						<phase>package</phase>
						<goals>
							<goal>artifacts</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.5</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<!-- Dummy plugin used in Eclipse IDE only -->
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-dependency-plugin</artifactId>
										<versionRange>[3.1.2,)</versionRange>
										<goals>
											<goal>copy-dependencies</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											build-helper-maven-plugin
										</artifactId>
										<versionRange>
											[3.1.0,)
										</versionRange>
										<goals>
											<goal>parse-version</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>buildnumber-maven-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<!-- More Project Information -->
	<name>org.utplsql.sqldev</name>
	<description>Extension for running unit tests in SQL Developer.</description>
	<url>https://github.com/utPLSQL/utPLSQL-SQLDeveloper</url>
	<inceptionYear>2018</inceptionYear>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<organization>
		<name>utPLSQL</name>
		<url>http://utplsql.org/</url>
	</organization>
	<developers>
		<developer>
			<email>philipp.salvisberg@trivadis.com</email>
			<name>Philipp Salvisberg</name>
			<url>https://github.com/PhilippSalvisberg/</url>
			<id>PhilippSalvisberg</id>
			<roles>
				<role>lead</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<!-- Environment Settings -->
	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/utPLSQL/utPLSQL-SQLDeveloper/issues</url>
	</issueManagement>
	<scm>
		<connection>scm:git:git://github.com/utPLSQL/utPLSQL-SQLDeveloper.git</connection>
		<developerConnection>scm:git:git@github.com:utPLSQL/utPLSQL-SQLDeveloper.git</developerConnection>
		<tag>master</tag>
		<url>https://github.com/utPLSQL/utPLSQL-SQLDeveloper</url>
	</scm>
</project>
