<?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>
	<artifactId>appng-manager</artifactId>
	<packaging>jar</packaging>
	<name>appNG Manager</name>
	<version>1.12.4</version>
	<description><![CDATA[Global appNG administration]]></description>
	<url>https://appng.org</url>

	<properties>
		<projectId>MGR</projectId>
		<displayName>Manager</displayName>
		<longDescription><![CDATA[The Manager is the global administration frontend for appNG. This contains dialogs for administrating users, groups, roles and permissions as well as administration of sites, application, properties and repositories.]]></longDescription>
		<appNGVersion>${project.parent.version}</appNGVersion>
		<asciidocPhase>deploy</asciidocPhase>
	</properties>

	<parent>
		<groupId>org.appng</groupId>
		<artifactId>appng-application-parent</artifactId>
		<version>1.15.0</version>
	</parent>

	<scm>
		<connection>scm:git:ssh://git@github.com:appNG/appng-manager.git</connection>
		<developerConnection>scm:git:ssh://git@github.com:appNG/appng-manager.git</developerConnection>
		<url>https://github.com/appNG/appng-manager</url>
	</scm>

	<licenses>
		<license>
			<name>Apache 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>

	<issueManagement>
		<system>JIRA</system>
		<url>https://appng.org/jira/projects/MGR/</url>
	</issueManagement>
	<developers>
		<developer>
			<id>mherlitzius</id>
			<name>Matthias Herlitzius</name>
			<email>matthias.herlitzius at appng.org</email>
			<organization>aiticon GmbH</organization>
			<organizationUrl>http://www.aiticon.com</organizationUrl>
		</developer>
		<developer>
			<id>madness-inc</id>
			<name>Matthias Müller</name>
			<email>matthias.mueller at appng.org</email>
			<organization>aiticon GmbH</organization>
			<organizationUrl>http://www.aiticon.com</organizationUrl>
		</developer>
		<developer>
			<id>stuemke</id>
			<name>Claus Stümke</name>
			<email>claus.stuemke at appng.org</email>
			<organization>aiticon GmbH</organization>
			<organizationUrl>http://www.aiticon.com</organizationUrl>
		</developer>
	</developers>


	<profiles>
		<!-- a profile for local development -->
		<!-- builds the application directly into the right folder of the appNG installation -->
		<!-- note that the application must once be installed in file-based mode to make this work -->
		<profile>
			<id>local</id>
			<properties>
				<outFolder>${env.CATALINA_HOME}/webapps/ROOT/applications/</outFolder>
				<site>manager</site>
			</properties>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<configuration>
							<descriptorRefs>
								<descriptorRef>assembly-local</descriptorRef>
							</descriptorRefs>
							<finalName>${project.artifactId}</finalName>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.8</version>
						<executions>
							<execution>
								<goals>
									<goal>run</goal>
								</goals>
								<phase>package</phase>
								<configuration>
									<target>
										<touch file="${env.CATALINA_HOME}/webapps/ROOT/repository/${site}/.reload" />
									</target>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>maven-central</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>sonatype</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
			<distributionManagement>
				<repository>
					<id>sonatype</id>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>generate-docs</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<phase>package</phase>
					</execution>
				</executions>
				<configuration>
					<additionalparam>-Xdoclint:all,-Xdoclint:-html</additionalparam>
					<sourcepath>src/main/java:target/generated-sources/constants</sourcepath>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
						<phase>verify</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.2.1</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>java</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<classpathScope>compile</classpathScope>
					<executable>java</executable>
					<mainClass>org.appng.tools.file.PropertyConstantCreator</mainClass>
					<arguments>
						<argument>application-home/dictionary/manager-messages.properties</argument>
						<argument>org.appng.application.manager.MessageConstants</argument>
						<argument>target/generated-sources/constants</argument>
					</arguments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>target/generated-sources/constants</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.asciidoctor</groupId>
				<artifactId>asciidoctor-maven-plugin</artifactId>
				<version>1.5.5</version>
				<dependencies>
					<dependency>
						<groupId>org.asciidoctor</groupId>
						<artifactId>asciidoctorj-pdf</artifactId>
						<version>1.5.0-alpha.15</version>
					</dependency>
				</dependencies>
				<configuration>
					<attributes>
						<icons>font</icons>
						<pagenums />
						<toc />
						<toclevels>3</toclevels>
						<idprefix />
						<idseparator>-</idseparator>
						<numbered>true</numbered>
						<project-version>${project.version}</project-version>
						<project-name>${project.name}</project-name>
					</attributes>
				</configuration>
				<executions>
					<execution>
						<id>html</id>
						<phase>${asciidocPhase}</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<backend>html5</backend>
							<sectids>true</sectids>
							<sourceHighlighter>coderay</sourceHighlighter>
							<outputDirectory>${project.build.directory}/generated-docs/html</outputDirectory>
							<sourceDocumentName>appng-manager-userguide.adoc</sourceDocumentName>
							<attributes>
								<linkcss>true</linkcss>
								<icons>font</icons>
								<sectanchors>true</sectanchors>
								<stylesheet>appng.css</stylesheet>
							</attributes>
						</configuration>
					</execution>
					<execution>
						<id>pdf</id>
						<phase>${asciidocPhase}</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<backend>pdf</backend>
							<sourceHighlighter>coderay</sourceHighlighter>
							<sourceDocumentName>appng-manager-userguide.adoc</sourceDocumentName>
							<outputDirectory>${project.build.directory}/generated-docs/pdf</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
		</dependency>
		<dependency>
			<groupId>org.appng</groupId>
			<artifactId>appng-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.appng</groupId>
			<artifactId>appng-testsupport</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.appng</groupId>
				<artifactId>appng-application-bom</artifactId>
				<type>pom</type>
				<scope>import</scope>
				<version>${appNGVersion}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

</project>
