<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.dbpedia</groupId>
        <artifactId>extraction</artifactId>
        <version>3.8</version>
    </parent>

    <groupId>org.dbpedia.extraction</groupId>
    <artifactId>scripts</artifactId>
    <name>DBpedia Scripts</name>

    <build>
        <plugins>
            <plugin>

                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>

                <configuration>
                    <launchers>
                        <launcher>
                            <id>CreateFreebaseLinks</id>
                            <mainClass>org.dbpedia.extraction.scripts.CreateFreebaseLinks</mainClass>
                            <jvmArgs>
                                <jvmArg>-server</jvmArg>
                                <jvmArg>-Xms512m</jvmArg>
                                <jvmArg>-Xmx4096m</jvmArg><!-- we load all DBpedia titles, so we need some space. Didn't test how much is actually necessary, 4G is probably too much. -->
                                <jvmArg>-XX:+HeapDumpOnOutOfMemoryError</jvmArg>
                                <jvmArg>-XX:+UseConcMarkSweepGC</jvmArg>
                            </jvmArgs>
                        </launcher>
                        <launcher>
                            <id>ProcessInterLanguageLinks</id>
                            <mainClass>org.dbpedia.extraction.scripts.ProcessInterLanguageLinks</mainClass>
                            <jvmArgs>
                                <jvmArg>-server</jvmArg>
                                <jvmArg>-Xms5120m</jvmArg>
                                <jvmArg>-Xmx7680m</jvmArg><!-- all languages (10000+ articles) need 6.5G (6656M) with .ttl and IRIs, 7.5G (7680M) with .nt and URIs (more and longer unique titles). -->
                                <jvmArg>-XX:+HeapDumpOnOutOfMemoryError</jvmArg>
                                <jvmArg>-XX:+UseConcMarkSweepGC</jvmArg>
                                <!-- <jvmArg>-XX:+PrintGC</jvmArg> -->
                                <!-- <jvmArg>-XX:+PrintGCTimeStamps</jvmArg> -->
                            </jvmArgs>
                        </launcher>
                        <launcher>
                            <id>CanonicalizeUris</id>
                            <mainClass>org.dbpedia.extraction.scripts.CanonicalizeUris</mainClass>
                            <jvmArgs><jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg></jvmArgs>
                        </launcher>
                        <launcher>
                            <id>ResolveTransitiveLinks</id>
                            <mainClass>org.dbpedia.extraction.scripts.ResolveTransitiveLinks</mainClass>
                            <jvmArgs><jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg></jvmArgs>
                        </launcher>
                        <launcher>
                            <id>MapObjectUris</id>
                            <mainClass>org.dbpedia.extraction.scripts.MapObjectUris</mainClass>
                            <jvmArgs>
                                <jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg>
                                <jvmArg>-Xmx4096m</jvmArg><!-- we load all English redirects, so we need some space. Didn't test how much is actually necessary, 4G is probably too much. -->
                            </jvmArgs>
                        </launcher>
                        <launcher>
                            <id>DecodeHtmlText</id>
                            <mainClass>org.dbpedia.extraction.scripts.DecodeHtmlText</mainClass>
                            <jvmArgs><jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg></jvmArgs>
                        </launcher>
                        <launcher>
                            <id>DecodeHtmlEntities</id>
                            <mainClass>org.dbpedia.extraction.scripts.DecodeHtmlEntities</mainClass>
                            <jvmArgs><jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg></jvmArgs>
                        </launcher>
                        <launcher>
                            <id>RecodeUris</id>
                            <mainClass>org.dbpedia.extraction.scripts.RecodeUris</mainClass>
                            <jvmArgs><jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg></jvmArgs>
                        </launcher>
                        <launcher>
                            <id>FixNTriplesEncoding</id>
                            <mainClass>org.dbpedia.extraction.scripts.FixNTriplesEncoding</mainClass>
                            <jvmArgs><jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg></jvmArgs>
                        </launcher>
                        <launcher>
                            <id>CountTypes</id>
                            <mainClass>org.dbpedia.extraction.scripts.CountTypes</mainClass>
                            <jvmArgs><jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg></jvmArgs>
                        </launcher>
                        <launcher>
                            <id>CreateDownloadPage</id>
                            <mainClass>org.dbpedia.extraction.scripts.CreateDownloadPage</mainClass>
                            <jvmArgs><jvmArg>-server</jvmArg><jvmArg>-XX:+UseConcMarkSweepGC</jvmArg></jvmArgs>
                        </launcher>
                    </launchers>
                </configuration>

            </plugin>
        </plugins>
    </build>

    <dependencies>

        <dependency>
            <groupId>org.dbpedia.extraction</groupId>
            <artifactId>core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
        </dependency>

    </dependencies>

</project>
