<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>com.legsem.legstar</groupId>
		<artifactId>legstar-parent</artifactId>
		<version>3.0.1</version>
	</parent>

	<artifactId>legstar-parser</artifactId>

	<name>legstar-parser</name>
	<description>Parses a COBOL copybooks into an abstract syntax tree</description>

	<properties>
		<congocc.version>2.1.0</congocc.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.congocc</groupId>
			<artifactId>org.congocc.parser.generator</artifactId>
			<version>${congocc.version}</version>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.congocc</groupId>
				<artifactId>org.congocc.maven.plugin</artifactId>
				<version>${congocc.version}</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>ccc-generate</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<sourceDirectory>${project.basedir}/src/main/grammar</sourceDirectory>
					<jdk>17</jdk>
					<quiet>false</quiet>
					<outputDirectory>
						${project.build.directory}/generated-sources</outputDirectory>
				</configuration>
			</plugin>

			<!-- Add generated java classes common folder as source folder -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>
									${project.build.directory}/generated-sources</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<excludePackageNames>*.ccparser:*.ccparser.*</excludePackageNames>
				</configuration>
			</plugin>

		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<excludePackageNames>*.ccparser:*.ccparser.*</excludePackageNames>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

</project>
