<?xml version="1.0" encoding="UTF-8"?>
<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.jenkins-ci.plugins</groupId>
		<artifactId>plugin</artifactId>
		<version>3.57</version>
		<relativePath />
	</parent>
	<artifactId>matlab</artifactId>
	<version>2.7.0</version>
	<packaging>hpi</packaging>

	<developers>
		<developer>
			<id>mathworks_ci_team</id>
			<name>MathWorks</name>
			<email>nbhoski@mathworks.com</email>
		</developer>
	</developers>
	
	<properties>
		<jenkins.version>2.164.3</jenkins.version>
		<java.level>8</java.level>
	</properties>
	
	<name>MATLAB Plugin</name>
	<description>Jenkins plugin for MATLAB</description>
	<url>https://github.com/jenkinsci/matlab-plugin</url>
	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://opensource.org/licenses/MIT</url>
		</license>
	</licenses>
	<repositories>
		<repository>
			<id>repo.jenkins-ci.org</id>
			<url>https://repo.jenkins-ci.org/public/</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>repo.jenkins-ci.org</id>
			<url>https://repo.jenkins-ci.org/public/</url>
		</pluginRepository>
	</pluginRepositories>

	<scm>
		<connection>scm:git:ssh://github.com/jenkinsci/matlab-plugin.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/jenkinsci/matlab-plugin.git</developerConnection>
		<url>http://github.com/jenkinsci/matlab-plugin</url>
	  <tag>matlab-2.7.0</tag>
  </scm>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.jenkins.tools.bom</groupId>
				<artifactId>bom-2.164.x</artifactId>
				<version>4</version>
				<scope>import</scope>
				<type>pom</type>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
	
    <!--  Pipeline Step dependencies -->
    
	<dependency>
		<groupId>org.jenkins-ci.plugins</groupId>
		<artifactId>matrix-project</artifactId>
	</dependency>

	<dependency>
		<groupId>org.jenkins-ci.plugins.workflow</groupId>
		<artifactId>workflow-step-api</artifactId>
	</dependency>
	<dependency>
		<groupId>org.jenkins-ci.plugins.workflow</groupId>
		<artifactId>workflow-api</artifactId>
	</dependency>
	
	<!--  Jenkins workflow test dependencies -->
	
	<dependency>
		<groupId>org.jenkins-ci.plugins.workflow</groupId>
		<artifactId>workflow-basic-steps</artifactId>	
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.jenkins-ci.plugins.workflow</groupId>
		<artifactId>workflow-cps</artifactId>	
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.jenkins-ci.plugins.workflow</groupId>
		<artifactId>workflow-durable-task-step</artifactId>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.jenkins-ci.plugins.workflow</groupId>
		<artifactId>workflow-job</artifactId>	
		<scope>test</scope>
	</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- Plugin to download the matlab run scripts and keep it under class 
				resource folder -->
			<plugin>
				<groupId>com.googlecode.maven-download-plugin</groupId>
				<artifactId>download-maven-plugin</artifactId>
				<version>1.5.0</version>
				<executions>
					<execution>
						<id>get-matlab-runner-scripts</id>
						<phase>validate</phase>
						<goals>
							<goal>wget</goal>
						</goals>
						<configuration>
							<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v0/run-matlab-command.zip</url>
							<unpack>true</unpack>
							<outputDirectory>${basedir}/src/main/resources</outputDirectory>
							<skipCache>true</skipCache>
                            <overwrite>true</overwrite>
						</configuration>
					</execution>
					<execution>
						<id>get-matlab-gen-script</id>
						<phase>validate</phase>
						<goals>
							<goal>wget</goal>
						</goals>
						<configuration>
							<url>https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip</url>
							<unpack>false</unpack>
							<outputDirectory>${basedir}/src/main/resources</outputDirectory>
							<skipCache>true</skipCache>
                            <overwrite>true</overwrite>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<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-javadoc-plugin
										</artifactId>
										<versionRange>
											[2.10.4,)
										</versionRange>
										<goals>
											<goal>javadoc</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.7.1</version>
				</plugin>
				<!-- Delete the runner files during clean operation -->
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.0.0</version>
					<executions>
						<execution>
							<id>default-clean</id>
							<phase>clean</phase>
							<goals>
								<goal>clean</goal>
							</goals>
							<configuration>
								<filesets>
									<fileset>
										<directory>${basedir}/src/main/resources</directory>
										<includes>
											<include>**/*.bat</include>
											<include>**/*.sh</include>
											<include>**/*.txt</include>
											<include>**/*.zip</include>
										</includes>
										<followSymlinks>false</followSymlinks>
									</fileset>
								</filesets>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
