<?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.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>

	<prerequisites>
		<maven>3.0.4</maven>
	</prerequisites>

	<groupId>org.wicketstuff.wiquery</groupId>
	<artifactId>wiquery-parent</artifactId>
	<packaging>pom</packaging>
	<version>7.0</version>
	<name>WiQuery Parent</name>

	<url>https://github.com/wicketstuff/wiquery</url>
	<scm>
		<url>git://github.com/wicketstuff/wiquery.git</url>
		<connection>scm:git:git://github.com/wicketstuff/wiquery.git</connection>
		<developerConnection>scm:git:git@github.com:wicketstuff/wiquery.git</developerConnection>
	  <tag>wiquery-7.0</tag>
  </scm>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.target>1.7</maven.compiler.target>
		<maven.compiler.source>1.7</maven.compiler.source>

		<wicket.version>7.0.0</wicket.version>
		<jackson.version>2.3.0</jackson.version>
		<slf4j.version>[1.7,1.7.5]</slf4j.version>
		<junit.version>4.12</junit.version>
		<servlet-api.version>3.0.1</servlet-api.version>
		<jetty.version>9.3.5.v20151012</jetty.version>

		<maven-bundle-plugin.version>3.0.0</maven-bundle-plugin.version>
		<maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
		<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
		<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
		<maven-eclipse-plugin.version>2.9</maven-eclipse-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
		<maven-jar-plugin.version>2.6</maven-jar-plugin.version>
		<maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-resources-plugin.version>2.7</maven-resources-plugin.version>
		<maven-site-plugin.version>3.4</maven-site-plugin.version>
		<maven-source-plugin.version>2.4</maven-source-plugin.version>
		<maven-surefire-plugin.version>2.19</maven-surefire-plugin.version>
		<maven-war-plugin.version>2.6</maven-war-plugin.version>
	</properties>

	<modules>
		<module>wiquery-core</module>
		<module>wiquery-jquery-ui</module>
		<module>wiquery-demo</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<!-- WiQuery dependencies -->
			<dependency>
				<groupId>org.wicketstuff.wiquery</groupId>
				<artifactId>wiquery-core</artifactId>
				<version>${project.version}</version>
			</dependency>
			<!-- add wiquery-core also as test project so wiquery-jquery-ui can use 
				the abstract testcase class -->
			<dependency>
				<groupId>org.wicketstuff.wiquery</groupId>
				<artifactId>wiquery-core</artifactId>
				<version>${project.version}</version>
				<classifier>tests</classifier>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.wicketstuff.wiquery</groupId>
				<artifactId>wiquery-jquery-ui</artifactId>
				<version>${project.version}</version>
			</dependency>
			<!-- WICKET DEPENDENCIES -->
			<dependency>
				<groupId>org.apache.wicket</groupId>
				<artifactId>wicket-core</artifactId>
				<version>${wicket.version}</version>
			</dependency>

			<!-- External dependencies -->
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>${servlet-api.version}</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson.version}</version>
			</dependency>

			<!-- Test dependencies -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<testSourceDirectory>src/test/java</testSourceDirectory>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
				<includes>
					<include>**/*</include>
				</includes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
				<includes>
					<include>**/*</include>
				</includes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/test/java</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
				<includes>
					<include>**/*</include>
				</includes>
			</testResource>
			<testResource>
				<directory>src/test/resources</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
				<includes>
					<include>**/*</include>
				</includes>
			</testResource>
		</testResources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>${maven-bundle-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${maven-clean-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${maven-deploy-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-eclipse-plugin</artifactId>
					<version>${maven-eclipse-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven-install-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <localCheckout>true</localCheckout>
            <pushChanges>false</pushChanges>
            <tagNameFormat>wiquery-@{project.version}</tagNameFormat>
          </configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>${maven-site-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-toolchains-plugin</artifactId>
					<version>1.1</version>
					<executions>
						<execution>
							<goals>
								<goal>toolchain</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<toolchains>
							<jdk>
								<version>${maven.compiler.source}</version>
							</jdk>
						</toolchains>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>${maven-war-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</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.apache.felix
										</groupId>
										<artifactId>
											maven-bundle-plugin
										</artifactId>
										<versionRange>
											[2.4.0,)
										</versionRange>
										<goals>
											<goal>manifest</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<wtpmanifest>true</wtpmanifest>
					<wtpapplicationxml>true</wtpapplicationxml>
					<wtpversion>1.5</wtpversion>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>true</downloadJavadocs>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<finalName>${project.artifactId}-${project.version}-r${buildNumber}-d${timestamp}</finalName>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<supportedProjectTypes>
						<supportedProjectType>jar</supportedProjectType>
					</supportedProjectTypes>
					<instructions>
						<Import-Package>
							!org.wicketstuff.wiquery*,
							!com.yahoo.platform.yui.compressor*,
							!org.mozilla.javascript*,
							com.fasterxml.jackson*;version="${jackson.version}",
							org.apache.wicket*;version="${wicket.version}",
							org.slf4j*;version="${slf4j.version}",
							*
						</Import-Package>
						<Export-Package>
							org.wicketstuff.wiquery*,
							com.yahoo.platform.yui.compressor*
						</Export-Package>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
