<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.tomasteubner.j2ee</groupId>
	<artifactId>j2ee-libs-build</artifactId>
	<version>1.20</version>
	<packaging>pom</packaging>
	<name>vaadin-common-parent</name>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.5.10.RELEASE</version>
	</parent>

	<properties>
		<vaadin.plugin.version>8.3.1</vaadin.plugin.version>
	</properties>
	
	<prerequisites>
		<maven>3.0</maven>
	</prerequisites>

	<build>
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh-external</artifactId>
				<version>2.2</version>
			</extension>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-scm</artifactId>
				<version>2.2</version>
			</extension>
			<extension>
				<groupId>org.apache.maven.scm</groupId>
				<artifactId>maven-scm-manager-plexus</artifactId>
				<version>1.6</version>
			</extension>
			<extension>
				<groupId>org.apache.maven.scm</groupId>
				<artifactId>maven-scm-provider-gitexe</artifactId>
				<version>1.6</version>
			</extension>
		</extensions>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.vaadin</groupId>
					<artifactId>vaadin-maven-plugin</artifactId>
					<version>${vaadin.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<source>${maven.compiler.source}</source>
						<target>${maven.compiler.target}</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<configuration>
						<additionalDependencies>
							<additionalDependency>
								<groupId>javax.interceptor</groupId>
								<artifactId>javax.interceptor-api</artifactId>
								<version>1.2</version>
							</additionalDependency>
						</additionalDependencies>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>3.0.0</version>
					<configuration>
						<failOnMissingWebXml>false</failOnMissingWebXml>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-maven-plugin</artifactId>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<repositories>
		<repository>
			<id>vaadin-addons</id>
			<url>http://maven.vaadin.com/vaadin-addons</url>
		</repository>
		<repository>
			<id>milton-bintray-repo</id>
			<url>http://dl.bintray.com/milton/Milton/</url>
		</repository>
		<repository>
			<id>spring-snapshots</id>
			<name>Spring Snapshots</name>
			<url>https://repo.spring.io/snapshot</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>spring-milestones</id>
			<name>Spring Milestones</name>
			<url>https://repo.spring.io/milestone</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>j2ee-libs-dependencies</module>
				<module>j2ee-libs-parent</module>
				<module>java-util</module>
				<module>web-util</module>
				<module>spring-util</module>
				<module>spring-client</module>
				<module>milton-util</module>
				<module>job-scheduler-api</module>
				<module>job-scheduler-dto</module>
				<module>job-scheduler-quartz</module>
				<module>job-scheduler-queue</module>
				<module>converter-spring-boot-starter</module>
				<module>converter-service-online</module>
				<module>test-jodconverter</module>
				<module>web-widgetset</module>
			</modules>
		</profile>
		
		<profile>
			<id>prepare</id>
			<properties>
				<skipTests>true</skipTests>
			</properties>
			<modules>
				<module>j2ee-libs-dependencies</module>
				<module>j2ee-libs-parent</module>
			</modules>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<dependencies>
							<dependency>
								<groupId>ant-contrib</groupId>
								<artifactId>ant-contrib</artifactId>
								<version>1.0b3</version>
								<exclusions>
									<exclusion>
										<groupId>ant</groupId>
										<artifactId>ant</artifactId>
									</exclusion>
								</exclusions>
							</dependency>
							<dependency>
								<groupId>org.apache.ant</groupId>
								<artifactId>ant-nodeps</artifactId>
								<version>1.8.1</version>
							</dependency>
							<dependency>
								<groupId>org.tigris.antelope</groupId>
								<artifactId>antelopetasks</artifactId>
								<version>3.2.10</version>
							</dependency>
						</dependencies>
						<executions>
							<execution>
								<id>fixup-dependencies-pom</id>
								<phase>verify</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<inherited>false</inherited>
								<configuration>
									<target>
										<property name="sourceFile" value="j2ee-libs-dependencies/pom.xml" />
										<xslt in="${sourceFile}" out="${sourceFile}.new" force="true">
											<style>
												<string><![CDATA[
<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://maven.apache.org/POM/4.0.0"
	exclude-result-prefixes="m">
	<xsl:template match="node()|@*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*" />
		</xsl:copy>
	</xsl:template>
	<xsl:template
		match="/m:project/m:properties/m:j2ee-libs.version/text()">
		<xsl:value-of select="/m:project/m:version/text()"/>
	</xsl:template>
</xsl:stylesheet>
												]]>
												</string>
											</style>
										</xslt>
										<move file="${sourceFile}" tofile="${sourceFile}.old" />
										<move file="${sourceFile}.new" tofile="${sourceFile}" />
										<delete file="${sourceFile}.old" />
									</target>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		
		<profile>
			<!-- Vaadin pre-release repositories -->
			<id>vaadin-prerelease</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>

			<repositories>
				<repository>
					<id>milton-bintray-repo</id>
					<url>http://dl.bintray.com/milton/Milton/</url>
				</repository>
				<repository>
					<id>vaadin-prereleases</id>
					<url>http://maven.vaadin.com/vaadin-prereleases</url>
				</repository>
				<repository>
					<id>vaadin-snapshots</id>
					<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>vaadin-prereleases</id>
					<url>http://maven.vaadin.com/vaadin-prereleases</url>
				</pluginRepository>
				<pluginRepository>
					<id>vaadin-snapshots</id>
					<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
	<distributionManagement>
		<!-- use the following if you're not using a snapshot version. -->
		<repository>
			<id>tomas-ssh</id>
			<name>Repository Name</name>
			<url>scpexe://ssh.tomasteubner.com/usr/export/var/maven/repository</url>
		</repository>
		<!-- use the following if you ARE using a snapshot version. -->
		<snapshotRepository>
			<id>snapshot-repo</id>
			<url>file://${settings.localRepository}</url>
		</snapshotRepository>
		<site>
			<id>tomas-ssh</id>
			<name>Maven Site</name>
			<url>scpexe://ssh.tomasteubner.com/usr/export/var/maven/site/${project.artifactId}/${project.version}</url>
		</site>
	</distributionManagement>

	<scm>
		<connection>scm:git:ssh://git@ssh.tomasteubner.com/java/j2ee/j2ee-libs.git</connection>
		<url>https://www.tomasteubner.com/git/?p=java/j2ee/j2ee-libs.git;a=tree</url>
	</scm>
	<modules>
		<module>vaadin-util</module>
	</modules>
</project>
