<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>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<groupId>org.webjars</groupId>
	<artifactId>fancybox</artifactId>
	<version>2.1.5</version>
	<name>fancyBox</name>
	<description>Fancy jQuery Lightbox Alternative</description>
	<url>http://webjars.org</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<upstream.version>2.1.5</upstream.version>
		<upstream.url>https://github.com/fancyapps/fancyBox/archive</upstream.url>
		<destDir>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${upstream.version}</destDir>
	</properties>

	<licenses>
		<license>
			<name>Creative Commons Attribution-NonCommercial 3.0</name>
			<url>http://creativecommons.org/licenses/by-nc/3.0/</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<dependencies>
		<dependency>
			<groupId>org.webjars</groupId>
			<artifactId>jquery</artifactId>
			<version>1.10.1</version>
		</dependency>
	</dependencies>

	<scm>
		<url>https://github.com/webjars/fancybox</url>
		<connection>scm:git:https://github.com/webjars/fancybox.git</connection>
		<developerConnection>scm:git:https://github.com/webjars/fancybox.git</developerConnection>
		<tag>fancybox-2.1.5</tag>
	</scm>

	<developers>
		<developer>
			<id>fancyapps</id>
			<name>Jānis Skarnelis</name>
		</developer>
	</developers>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>wagon-maven-plugin</artifactId>
				<version>1.0-beta-4</version>
				<executions>
					<execution>
						<phase>process-resources</phase>
						<goals>
							<goal>download-single</goal>
						</goals>
						<configuration>
							<url>${upstream.url}</url>
							<fromFile>v${upstream.version}.zip</fromFile>
							<toFile>${project.build.directory}/${project.artifactId}.zip</toFile>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<phase>process-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<echo message="unzip archive" />
								<unzip src="${project.build.directory}/${project.artifactId}.zip" dest="${project.build.directory}" />
								<echo message="moving resources" />
								<move todir="${destDir}">
									<fileset dir="${project.build.directory}/fancyBox-${upstream.version}/source" />
								</move>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.4.1</version>
			</plugin>
		</plugins>
	</build>

</project>
