<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.nextbreakpoint</groupId>
        <artifactId>com.nextbreakpoint.convertedlibraries</artifactId>
        <version>1.0.0</version>
    </parent>
    <artifactId>com.nextbreakpoint.convertedlibraries.antlr4-runtime</artifactId>
    <packaging>jar</packaging>
    <properties>
        <antlr4.version>4.13.1</antlr4.version>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-classes</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <item>
                                    <groupId>org.antlr</groupId>
                                    <artifactId>antlr4-runtime</artifactId>
                                    <version>${antlr4.version}</version>
                                </item>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
                            <excludes>**/*.MF</excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-javadoc</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <item>
                                    <groupId>org.antlr</groupId>
                                    <artifactId>antlr4-runtime</artifactId>
                                    <version>${antlr4.version}</version>
                                    <classifier>javadoc</classifier>
                                </item>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/javadoc</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-sources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <item>
                                    <groupId>org.antlr</groupId>
                                    <artifactId>antlr4-runtime</artifactId>
                                    <version>${antlr4.version}</version>
                                    <classifier>sources</classifier>
                                </item>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/sources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>archive-javadoc</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>javadoc</classifier>
                            <classesDirectory>${project.build.directory}/javadoc</classesDirectory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>archive-sources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <classesDirectory>${project.build.directory}/sources</classesDirectory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.moditect</groupId>
                <artifactId>moditect-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-module-info</id>
                        <phase>package</phase>
                        <goals>
                            <goal>add-module-info</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>false</failOnWarning>
                            <overwriteExistingFiles>true</overwriteExistingFiles>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <modules>
                                <module>
                                    <artifact>
                                        <groupId>com.nextbreakpoint</groupId>
                                        <artifactId>com.nextbreakpoint.convertedlibraries.antlr4-runtime</artifactId>
                                        <version>${project.version}</version>
                                    </artifact>
                                    <moduleInfoSource>
                                        module com.nextbreakpoint.convertedlibraries.antlr4.runtime {
                                            exports org.antlr.v4.runtime;
                                            exports org.antlr.v4.runtime.atn;
                                            exports org.antlr.v4.runtime.dfa;
                                            exports org.antlr.v4.runtime.misc;
                                            exports org.antlr.v4.runtime.tree;
                                            exports org.antlr.v4.runtime.tree.pattern;
                                            exports org.antlr.v4.runtime.tree.xpath;
                                        }
                                    </moduleInfoSource>
                                </module>
                            </modules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
