<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.umlet</groupId>
	<artifactId>umlet-parent</artifactId>
	<version>15.1</version>
	<packaging>pom</packaging>
	<url>http://www.umlet.com/</url>

	<licenses>
		<license>
			<name>GNU General Public License (GPL)</name>
			<url>http://www.gnu.org/licenses/gpl.txt</url>
		</license>
	</licenses>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>http://github.com/umlet/umlet/issues</url>
	</issueManagement>

	<scm>
		<url>http://github.com/umlet/umlet</url>
		<connection>scm:git:git://github.com/umlet/umlet.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/umlet/umlet.git</developerConnection>
		<tag>HEAD</tag>
	</scm>

	<properties>
		<tycho.version>1.7.0</tycho.version> <!-- versions after 1.7.0 require Java11 for the build (not for execution of the plugin). so only update if necessary -->

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>1.6</maven.compiler.source>
		<maven.compiler.target>1.6</maven.compiler.target>
		<animal.sniffer.java.api>java16</animal.sniffer.java.api>
	</properties>

	<modules>
		<module>umlet-elements</module>
		<module>umlet-res</module>
		<module>umlet-swing</module>
		<module>umlet-standalone</module>
		<module>umlet-eclipse-plugin-deps</module>
		<module>umlet-eclipse-plugin</module>
		<module>umlet-eclipse-feature</module>
		<module>umlet-eclipse-p2</module>
		<module>umlet-gwt</module>
		<module>umlet-web</module>
		<module>umlet-vscode</module>
	</modules>

	<dependencies>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>5.2.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.2</version>
			<scope>test</scope>
		</dependency>
		<!-- better assertions than junit and hamcrest; update to v2.3.0 if Umlet switches to Java7 -->
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.24.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>31.1-jre</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>2.0.6</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-reload4j</artifactId>
				<version>2.0.6</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>**/BuildInfo.properties</include>
					<include>**/about.html</include>
					<include>**/startuphelp.html</include>
				</includes>
				<filtering>true</filtering>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>
		<plugins>
			<!-- use buildnumber-maven-plugin to create several versions of timestamp variables -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<version>1.3</version>
				<executions>
					<execution>
						<id>build.date</id>
						<phase>initialize</phase>
						<goals>
							<goal>create-timestamp</goal>
						</goals>
						<configuration>
							<timestampFormat>yyyy-MM-dd</timestampFormat>
							<timestampPropertyName>build.date</timestampPropertyName>
						</configuration>
					</execution>
					<execution>
						<id>build.time</id>
						<phase>initialize</phase>
						<goals>
							<goal>create-timestamp</goal>
						</goals>
						<configuration>
							<timestampFormat>yyyy-MM-dd HH:mm:ss</timestampFormat>
							<timestampPropertyName>build.time</timestampPropertyName>
						</configuration>
					</execution>
					<execution>
						<id>build.time.urlsafe</id>
						<phase>initialize</phase>
						<goals>
							<goal>create-timestamp</goal>
						</goals>
						<configuration>
							<timestampFormat>yyyy-MM-dd_HH-mm-ss</timestampFormat>
							<timestampPropertyName>build.time.urlsafe</timestampPropertyName>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- generate sources (e.g. needed by GWT for shared code) -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.17</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>2.17</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.8</version>
				</plugin>
				<!--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.codehaus.mojo</groupId>
										<artifactId>buildnumber-maven-plugin</artifactId>
										<versionRange>[1.3,)</versionRange>
										<goals>
											<goal>create-timestamp</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-dependency-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>unpack</goal>
											<goal>copy-dependencies</goal>
											<goal>build-classpath</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-antrun-plugin</artifactId>
										<versionRange>[1.3,)</versionRange>
										<goals>
											<goal>run</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.helger.maven</groupId>
										<artifactId>ph-javacc-maven-plugin</artifactId>
										<versionRange>[2.8.0,)</versionRange>
										<goals>
											<goal>javacc</goal>
											<goal>jjdoc</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.reficio</groupId>
										<artifactId>p2-maven-plugin</artifactId>
										<versionRange>[1.1.1,)</versionRange>
										<goals>
											<goal>site</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>checks</id>
			<build>
				<plugins>
					<!-- use SpotBugs to detect potential errors -->
					<plugin>
						<groupId>com.github.spotbugs</groupId>
						<artifactId>spotbugs-maven-plugin</artifactId>
						<version>3.1.8</version>
						<executions>
							<!-- Ensures that FindBugs inspects source code when project is compiled. -->
							<execution>
								<id>analyze-compile</id>
								<phase>compile</phase>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<excludeFilterFile>${basedir}/src/main/findbugs/findbugs-exclude.xml</excludeFilterFile>
						</configuration>
					</plugin>
					<!-- use animal sniffer plugin to verify that only Java APIs up to a specific version are used -->
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>animal-sniffer-maven-plugin</artifactId>
						<version>1.16</version>
						<executions>
							<execution>
								<id>check-java-api</id>
								<phase>test</phase>
								<goals>
									<goal>check</goal>
								</goals>
								<configuration>
									<signature>
										<groupId>org.codehaus.mojo.signature</groupId>
										<artifactId>${animal.sniffer.java.api}</artifactId>
										<version>1.1</version>
									</signature>
<!-- 									<excludeDependencies> -->
<!-- 										<excludeDependency>org.eclipse.jdt:ecj:*</excludeDependency> -->
<!-- 									</excludeDependencies> -->
								</configuration>
							</execution>
						</executions>
					</plugin>
					<!-- use https://github.com/google/error-prone compiler -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.0</version>
						<configuration>
							<compilerArgs>
								<arg>-XDcompilePolicy=simple</arg>
								<arg>-Xplugin:ErrorProne</arg>
							</compilerArgs>
							<annotationProcessorPaths>
								<path>
									<groupId>com.google.errorprone</groupId>
									<artifactId>error_prone_core</artifactId>
									<version>2.4.0</version>
								</path>
							</annotationProcessorPaths>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.1</version>
						<configuration>
							<excludePackageNames>com.baselet.element.facet.customdrawings.gen:com.baselet.element.facet.specific.sequence_aio.gen</excludePackageNames>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>jdk8</id>
			<activation>
				<jdk>1.8</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.0</version>
						<configuration>
							<compilerId>javac-with-errorprone</compilerId>
							<forceJavacCompilerUse>true</forceJavacCompilerUse>
						</configuration>
						<dependencies>
							<dependency>
								<groupId>org.codehaus.plexus</groupId>
								<artifactId>plexus-compiler-javac-errorprone</artifactId>
								<version>2.8.5</version>
							</dependency>
							<!-- override plexus-compiler-javac-errorprone's dependency on Error Prone with the latest version -->
							<dependency>
								<groupId>com.google.errorprone</groupId>
								<artifactId>error_prone_core</artifactId>
								<version>2.3.2</version>
							</dependency>
						</dependencies>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>