<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>hu.icellmobilsoft.dookug</groupId>
		<artifactId>dookug-common</artifactId>
		<version>0.5.0</version>
	</parent>

	<artifactId>dookug-common-model</artifactId>

	<properties>
		<hibernate.jpamodelgen.version>5.3.24.Final</hibernate.jpamodelgen.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>jakarta.platform</groupId>
			<artifactId>jakarta.jakartaee-api</artifactId>
		</dependency>

		<dependency>
			<groupId>hu.icellmobilsoft.coffee</groupId>
			<artifactId>coffee-model-base</artifactId>
		</dependency>

		<!-- ez nelkul nem fordul be a ProjectEntityListener (org.apache.deltaspike.data.impl.property.Property vegett) -->
		<dependency>
			<groupId>org.apache.deltaspike.modules</groupId>
			<artifactId>deltaspike-data-module-impl</artifactId>
			<scope>compile</scope>
		</dependency>

		<!--FOR GENERATING JPA METAMODELs -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-jpamodelgen</artifactId>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>javax.xml.bind</groupId>
					<artifactId>jaxb-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>javax.activation</groupId>
					<artifactId>javax.activation-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<!-- hibernate-jpamodelgen -> javax.xml.bind:jaxb-api és javax.activation:javax.activation-api helyett -->
			<groupId>jakarta.xml.bind</groupId>
			<artifactId>jakarta.xml.bind-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.activation</groupId>
			<artifactId>jakarta.activation-api</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<executions>
					<execution>
						<id>process</id>
						<goals>
							<goal>compile</goal>
						</goals>
						<phase>generate-sources</phase>
						<configuration>
							<compilerArgs>
								<arg>-AfullyAnnotationConfigured=true</arg>
							</compilerArgs>
							<compilerArguments>
								<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
							</compilerArguments>
						</configuration>
					</execution>
				</executions>
				<!-- https://hibernate.atlassian.net/browse/HHH-12991 -->
				<configuration>
					<annotationProcessorPaths>
						<annotationProcessorPath>
							<groupId>org.hibernate</groupId>
							<artifactId>hibernate-jpamodelgen</artifactId>
							<version>${hibernate.jpamodelgen.version}</version>
						</annotationProcessorPath>
						<path>
							<groupId>javax.xml.bind</groupId>
							<artifactId>jaxb-api</artifactId>
							<version>2.3.1</version>
						</path>
						<path>
							<groupId>javax.annotation</groupId>
							<artifactId>javax.annotation-api</artifactId>
							<version>1.3.1</version>
						</path>
					</annotationProcessorPaths>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>target/generated-sources/annotations</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
