<commit_before><?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>

    <groupId>ro.satrapu</groupId>
    <artifactId>iqkm.bv.2016</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>deploying-jee-to-heroku</name>

    <prerequisites>
        <maven>3.2.5</maven>
    </prerequisites>

    <description>
        See https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/blob/master/README.md.
    </description>

    <inceptionYear>2016</inceptionYear>

    <ciManagement>
        <system>drone.io</system>
        <url>https://drone.io/github.com/satrapu/iquest-keyboards-and-mice-brasov-2016</url>
    </ciManagement>

    <scm>
        <connection>scm:git:git@github.com:satrapu/iquest-keyboards-and-mice-brasov-2016.git</connection>
        <url>https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/commits</url>
        <developerConnection>scm:git:git@github.com:satrapu/iquest-keyboards-and-mice-brasov-2016.git
        </developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <url>https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016</url>

    <developers>
        <developer>
            <id>satrapu</id>
            <name><NAME></name>
            <email><EMAIL></email>
            <timezone>2</timezone>
            <url>https://www.linkedin.com/in/bmarian</url>
            <roles>
                <role>Main Commiter</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <version.maven>3.2.5</version.maven>
        <version.maven-compiler-plugin>3.5.1</version.maven-compiler-plugin>
        <version.maven-war-plugin>2.6</version.maven-war-plugin>
        <version.maven-enforcer-plugin>1.4.1</version.maven-enforcer-plugin>
        <version.wildfly.swarm>2016.9</version.wildfly.swarm>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <environment>none</environment>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wildfly.swarm</groupId>
                <artifactId>bom-all</artifactId>
                <version>${version.wildfly.swarm}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.wildfly.swarm</groupId>
            <artifactId>cdi</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.swarm</groupId>
            <artifactId>ejb</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.swarm</groupId>
            <artifactId>undertow</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.name}</finalName>
        <defaultGoal>clean package</defaultGoal>

        <filters>
            <filter>src/main/filters/${environment}.properties</filter>
        </filters>

        <resources>
            <!--
                Replace tokens with actual values coming from the filters, like the datasource name found
                inside persistence.xml file.
            -->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.maven-compiler-plugin}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${version.maven-war-plugin}</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${version.maven-enforcer-plugin}</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <!--
                                        Unable to generate -swarm.jar file using "package" goal unless
                                        Maven version is greater than or equal to 3.2.5
                                        (see https://issues.jboss.org/browse/SWARM-301).
                                    -->
                                    <version>${version.maven}</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!--
              This Maven profile is used when running the application on Heroku.
            -->
            <id>heroku</id>
            <properties>
                <environment>heroku</environment>
            </properties>

            <dependencies>
                <!--
                    Include "postgresql" WildFly Swarm fraction since it provides access to the PostgreSQL JDBC driver
                    to be used when communicating with a Heroku managed PostgreSQL database.
                -->
                <dependency>
                    <groupId>org.wildfly.swarm</groupId>
                    <artifactId>postgresql</artifactId>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.wildfly.swarm</groupId>
                        <artifactId>wildfly-swarm-plugin</artifactId>
                        <version>${version.wildfly.swarm}</version>

                        <configuration>
                            <!--
                              Ensure the custom WildFly Swarm container is started (i.e. the one containing a
                              datasource pointing to a Heroku managed database).
                            -->
                            <mainClass>ro.satrapu.iqkm.demo.persons.HerokuRunner</mainClass>
                        </configuration><commit_msg>Removed unused "prerequisites" node. Removed the H2 dependency causing the ExampleDS datasource to be deployed twice.<commit_after><?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>

    <groupId>ro.satrapu</groupId>
    <artifactId>iqkm.bv.2016</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>deploying-jee-to-heroku</name>

    <description>
        See https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/blob/master/README.md.
    </description>

    <inceptionYear>2016</inceptionYear>

    <ciManagement>
        <system>drone.io</system>
        <url>https://drone.io/github.com/satrapu/iquest-keyboards-and-mice-brasov-2016</url>
    </ciManagement>

    <scm>
        <connection>scm:git:git@github.com:satrapu/iquest-keyboards-and-mice-brasov-2016.git</connection>
        <url>https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/commits</url>
        <developerConnection>scm:git:<EMAIL>:satrapu/iquest-keyboards-and-mice-brasov-2016.git
        </developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <url>https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016</url>

    <developers>
        <developer>
            <id>satrapu</id>
            <name><NAME></name>
            <email><EMAIL></email>
            <timezone>2</timezone>
            <url>https://www.linkedin.com/in/bmarian</url>
            <roles>
                <role>Main Commiter</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <version.maven>3.2.5</version.maven>
        <version.maven-compiler-plugin>3.5.1</version.maven-compiler-plugin>
        <version.maven-war-plugin>2.6</version.maven-war-plugin>
        <version.maven-enforcer-plugin>1.4.1</version.maven-enforcer-plugin>
        <version.wildfly.swarm>2016.9</version.wildfly.swarm>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <environment>none</environment>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wildfly.swarm</groupId>
                <artifactId>bom-all</artifactId>
                <version>${version.wildfly.swarm}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.wildfly.swarm</groupId>
            <artifactId>cdi</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.swarm</groupId>
            <artifactId>ejb</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.swarm</groupId>
            <artifactId>undertow</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.name}</finalName>
        <defaultGoal>clean package</defaultGoal>

        <filters>
            <filter>src/main/filters/${environment}.properties</filter>
        </filters>

        <resources>
            <!--
                Replace tokens with actual values coming from the filters, like the datasource name found
                inside persistence.xml file.
            -->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.maven-compiler-plugin}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${version.maven-war-plugin}</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${version.maven-enforcer-plugin}</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <!--
                                        Unable to generate -swarm.jar file using "package" goal unless
                                        Maven version is greater than or equal to 3.2.5
                                        (see https://issues.jboss.org/browse/SWARM-301).
                                    -->
                                    <version>${version.maven}</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!--
                This Maven profile is used when running the application on Heroku.
            -->
            <id>heroku</id>
            <properties>
                <environment>heroku</environment>
            </properties>

            <dependencies>
                <dependency>
                    <groupId>org.wildfly.swarm</groupId>
                    <artifactId>jpa</artifactId>
                    <exclusions>
                        <!--
                            Exclude H2 fraction as the application will use PostgreSQL.
                        -->
                        <exclusion>
                            <groupId>org.wildfly.swarm</groupId>
                            <artifactId>h2</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>

                <!--
                    Include "postgresql" WildFly Swarm fraction since it provides access to the PostgreSQL JDBC driver
                    to be used when communicating with a Heroku managed PostgreSQL database.
                -->
                <dependency>
                    <groupId>org.wildfly.swarm</groupId>
                    <artifactId>postgresql</artifactId>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.wildfly.swarm</groupId>
                        <artifactId>wildfly-swarm-plugin</artifactId>
                        <version>${version.wildfly.swarm}</version>

                        <configuration>
                            <!--
                              Ensure the custom WildFly Swarm container is started (i.e. the one containing a
                              datasource pointing to a Heroku managed database).
                            -->
                            <mainClass>ro.satrapu.iqkm.demo.persons.HerokuRunner</mainClass>
                        </configuration>
{'fraction_non_alphanumeric': 0.12161487582678147, 'fraction_numerical': 0.011855734431548734, 'mean_word_length': 1.4368253002888856, 'pattern_counts': {'":': 0, '<': 499, '<?xml version=': 2, '>': 499, 'https://': 14, 'lorem ipsum': 0, 'www.': 6, 'xml': 8}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4271054', 'n_tokens_mistral': 4716, 'n_tokens_neox': 4146, 'n_words': 564}