<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>
	<groupId>org.jvnet.ogc</groupId>
	<artifactId>ogc-schemas</artifactId>
	<packaging>jar</packaging>
	<name>OGC Schemas</name>
	<parent>
		<groupId>org.jvnet.ogc</groupId>
		<artifactId>ogc-schemas-project</artifactId>
		<version>2.0.0</version>
	</parent>
	<properties>
		<schemas.zip>SCHEMAS_OPENGIS_NET.zip</schemas.zip>
	</properties>
	<build>
		<defaultGoal>install</defaultGoal>
		<plugins>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>download-schemas</id>
						<phase>generate-sources</phase>
						<configuration>
							<tasks>
								<get src="http://schemas.opengis.net/${schemas.zip}" dest="src/main/etc/${schemas.zip}" usetimestamp="true"/>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
					<execution>
						<id>unpack</id>
						<phase>generate-sources</phase>
						<configuration>
							<tasks>
								<unzip src="${basedir}/src/main/etc/${schemas.zip}" dest="src/main/resources/ogc">
									<patternset>
										<exclude name="**/*.zip"/>
									</patternset>
								</unzip>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-patch-plugin</artifactId>
				<version>1.1.1</version>
				<configuration>
					<skipApplication>false</skipApplication>
				</configuration>
				<executions>
					<execution>
						<id>patch-sources</id>
						<phase>process-sources</phase>
						<goals>
							<goal>apply</goal>
						</goals>
						<configuration>
							<patchDirectory>src/main/patches/</patchDirectory>
							<targetDirectory>src/main/resources</targetDirectory>
							<!--patches>
								<patch>ogc.patch</patch>
							</patches-->
							<patchTrackingFile>${project.build.directory}/patch-log.txt</patchTrackingFile>
							<naturalOrderProcessing>true</naturalOrderProcessing>
							<ignoreWhitespace>true</ignoreWhitespace>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>