<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>w3c-schema-parent</artifactId>
	<packaging>pom</packaging>
	<name>W3C Schema Parent</name>
	<parent>
		<groupId>org.w3c-schemas</groupId>
		<artifactId>w3c-schemas-project</artifactId>
		<version>3.0.0</version>
	</parent>
	<dependencies>
		<dependency>
			<groupId>org.jvnet.jaxb2_commons</groupId>
			<artifactId>jaxb2-basics-runtime</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
		</dependency>
		<dependency>
			<groupId>org.w3c-schemas</groupId>
			<artifactId>w3c-schemas</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<defaultGoal>install</defaultGoal>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.jvnet.jaxb2.maven2</groupId>
					<artifactId>maven-jaxb2-plugin</artifactId>
					<executions>
						<execution>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<!--schemaDirectory>${project.build.directory}/unpacked-resources</schemaDirectory>
						<bindingDirectory>src/main/resources</bindingDirectory-->
						<!--catalog>src/main/resources/catalog.cat</catalog-->
						<useDependenciesAsEpisodes>true</useDependenciesAsEpisodes>
						<strict>false</strict>
						<extension>true</extension>
						<schemaIncludes/>
						<bindings>
							<binding>
								<dependencyResource>
									<groupId>${project.groupId}</groupId>
									<artifactId>w3c-schemas</artifactId>
									<resource>w3c/globalBindings.xjb</resource>
									<version>${project.version}</version>
								</dependencyResource>
							</binding>
						</bindings>
						<catalogs>
							<catalog>
								<dependencyResource>
									<groupId>${project.groupId}</groupId>
									<artifactId>w3c-schemas</artifactId>
									<resource>w3c/catalog.cat</resource>
									<version>${project.version}</version>
								</dependencyResource>
							</catalog>
						</catalogs>
						<args>
							<arg>-XfixJAXB1058</arg>
							<arg>-XtoString</arg>
							<arg>-Xequals</arg>
							<arg>-XhashCode</arg>
							<arg>-Xcopyable</arg>
							<arg>-Xmergeable</arg>
							<arg>-Xsetters</arg>
							<arg>-Xwildcard</arg>
							<arg>-Xinject-code</arg>
							<arg>-Xinheritance</arg>
							<arg>-Xfluent-api</arg>
							<arg>-Xsimplify</arg>
							<!--arg>-Xvisitor</arg-->
							<arg>-Xjsonix</arg>
							<arg>-Xjsonix-compact</arg>
							<arg>-Xjsonix-generateJsonSchema</arg>
						</args>
						<plugins>
							<plugin>
								<groupId>org.jvnet.jaxb2_commons</groupId>
								<artifactId>jaxb2-basics</artifactId>
							</plugin>
							<plugin>
								<groupId>org.jvnet.jaxb2_commons</groupId>
								<artifactId>jaxb2-fluent-api</artifactId>
							</plugin>
							<!--plugin>
								<groupId>com.massfords</groupId>
								<artifactId>jaxb-visitor</artifactId>
							</plugin-->
							<dependency>
								<groupId>org.hisrc.jsonix</groupId>
								<artifactId>jsonix-schema-compiler</artifactId>
							</dependency>
						</plugins>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<executions>
						<execution>
							<phase>generate-sources</phase>
							<configuration>
								<target>
									<replace dir="target/generated-sources" value="jakarta.xml.bind">
										<include name="**/*.java"/>
										<replacetoken>javax.xml.bind</replacetoken>
									</replace>
								</target>
							</configuration>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>
						<execution>
							<id>package-scripts</id>
							<phase>package</phase>
							<configuration>
								<target>
									<zip basedir="${project.build.directory}/generated-sources/xjc" destfile="${project.build.directory}/${project.artifactId}-${project.version}-scripts.zip">
										<patternset>
											<include name="**/*.js"/>
										</patternset>
									</zip>
								</target>
							</configuration>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>
						<execution>
							<id>package-jsonschemas</id>
							<phase>package</phase>
							<configuration>
								<target>
									<zip basedir="${project.build.directory}/generated-sources/xjc" destfile="${project.build.directory}/${project.artifactId}-${project.version}-jsonschemas.zip">
										<patternset>
											<include name="**/*.jsonschema"/>
										</patternset>
									</zip>
								</target>
							</configuration>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-scripts</id>
							<phase>package</phase>
							<goals>
								<goal>attach-artifact</goal>
							</goals>
							<configuration>
								<artifacts>
									<artifact>
										<file>${project.build.directory}/${project.artifactId}-${project.version}-scripts.zip</file>
										<type>zip</type>
										<classifier>scripts</classifier>
									</artifact>
									<artifact>
										<file>${project.build.directory}/${project.artifactId}-${project.version}-jsonschemas.zip</file>
										<type>zip</type>
										<classifier>jsonschemas</classifier>
									</artifact>
								</artifacts>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<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>
		</pluginManagement>
	</build>
</project>
