<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2016 Google Inc. All Rights Reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.google.cloud.runtimes.tests</groupId>
    <artifactId>tests-parent</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>test-war-smoke</artifactId>
  <packaging>war</packaging>
  <name>Jetty-Runtime :: Tests :: Smoke Tests (Servlet 3.1)</name>
  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.cloud.runtimes.tests</groupId>
      <artifactId>gcloud-testing-core</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>com.spotify</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>build</id>
            <phase>package</phase>
            <goals>
              <goal>build</goal>
            </goals>
            <configuration>
              <imageName>${project.artifactId}</imageName>
              <imageTags>
                <imageTag>${project.version}</imageTag>
              </imageTags>
              <dockerDirectory>${project.build.directory}/docker</dockerDirectory>
              <resources>
                <resource>
                  <targetPath>/</targetPath>
                  <directory>${project.build.directory}</directory>
                  <include>${project.build.finalName}.war</include>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>test.local</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>local-integration-test</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <skipTests>false</skipTests>
                  <systemPropertyVariables>
                    <test.mode>local</test.mode>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start</goal>
                </goals>
              </execution>
              <execution>
                <id>stop</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>test.remote</id>
      <properties>
        <gcloud-projectId-file>${project.build.directory}/gcloud-projectid.properties
        </gcloud-projectId-file>
        <!--
           ~ remote tests require image in gcr.io
           ~ if local tests are enabled with remote, this image is used locally as well
           -->
        <jetty.test.image>gcr.io/${app.deploy.project}/jetty:${docker.tag.long}</jetty.test.image>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>find-app-deploy-project</id>
                <phase>validate</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <echo file="${gcloud-projectId-file}" append="false">
                      app.deploy.project=
                    </echo>
                    <exec executable="gcloud" logError="true" append="true"
                          output="${gcloud-projectId-file}">
                      <arg value="--quiet"/>
                      <arg value="config"/>
                      <arg value="list"/>
                      <arg value="--format=value(core.project)"/>
                    </exec>
                  </target>
                </configuration>
              </execution>
              <execution>
                <id>copy-deploy-artifact</id>
                <phase>package</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <copy file="${project.build.directory}/${project.build.finalName}.war"
                          todir="${project.build.directory}/appengine-staging/"/>
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>properties-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>read-gcloud-properties</id>
                <phase>initialize</phase>
                <goals>
                  <goal>read-project-properties</goal>
                </goals>
                <configuration>
                  <files>
                    <file>${gcloud-projectId-file}</file>
                  </files>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>remote-integration-test</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <skipTests>false</skipTests>
                  <systemPropertyVariables>
                    <test.mode>remote</test.mode>
                    <app.deploy.project>${app.deploy.project}</app.deploy.project>
                    <app.deploy.version>${maven.build.timestamp}</app.deploy.version>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <!-- deploy the service -->
              <execution>
                <id>deploy-remote-service</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <workingDirectory>${project.build.directory}/appengine-staging</workingDirectory>
                  <executable>gcloud</executable>
                  <arguments>
                    <argument>--quiet</argument>
                    <argument>app</argument>
                    <argument>deploy</argument>
                    <argument>app.yaml</argument>
                    <argument>--version</argument>
                    <argument>${maven.build.timestamp}</argument>
                  </arguments>
                </configuration>
              </execution>
              <!-- stop the service from 'deploy-remote-service' -->
              <execution>
                <id>stop-remote-service</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>gcloud</executable>
                  <arguments>
                    <argument>--quiet</argument>
                    <argument>app</argument>
                    <argument>versions</argument>
                    <argument>stop</argument>
                    <argument>${maven.build.timestamp}</argument>
                  </arguments>
                </configuration>
              </execution>
              <!-- remove the service from 'deploy-remote-service' -->
              <execution>
                <id>delete-remote-service</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>gcloud</executable>
                  <arguments>
                    <argument>--quiet</argument>
                    <argument>app</argument>
                    <argument>versions</argument>
                    <argument>delete</argument>
                    <argument>${maven.build.timestamp}</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>test.remote.deploy</id>
      <build>
        <plugins>
          <!-- create tag for local docker image to push for remote use in test -->
          <plugin>
            <groupId>com.spotify</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>tag-image</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>tag</goal>
                </goals>
                <configuration>
                  <image>jetty:${docker.tag.long}</image>
                  <newName>${jetty.test.image}</newName>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <!-- push a remote docker image to use with 'deploy-integration-test' -->
              <execution>
                <id>deploy-remote-docker</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>gcloud</executable>
                  <arguments>
                    <argument>docker</argument>
                    <argument>-q</argument>
                    <argument>--</argument>
                    <argument>push</argument>
                    <argument>${jetty.test.image}</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>test.remote.clean</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <!-- remove the remote image from 'deploy-remote-docker' -->
              <execution>
                <id>cleanup-remote-image</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>bash</executable>
                  <arguments>
                    <argument>-c</argument>
                    <argument>gcloud beta container images delete `docker inspect --format='{{index .RepoDigests 0}}' ${jetty.test.image}` -q</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
<commit_msg>Force tag overwrite when building the test-war-smoke image (#127)<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2016 Google Inc. All Rights Reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.google.cloud.runtimes.tests</groupId>
    <artifactId>tests-parent</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>test-war-smoke</artifactId>
  <packaging>war</packaging>
  <name>Jetty-Runtime :: Tests :: Smoke Tests (Servlet 3.1)</name>
  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.cloud.runtimes.tests</groupId>
      <artifactId>gcloud-testing-core</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>com.spotify</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>build</id>
            <phase>package</phase>
            <goals>
              <goal>build</goal>
            </goals>
            <configuration>
              <imageName>${project.artifactId}</imageName>
              <imageTags>
                <imageTag>${project.version}</imageTag>
              </imageTags>
              <dockerDirectory>${project.build.directory}/docker</dockerDirectory>
              <resources>
                <resource>
                  <targetPath>/</targetPath>
                  <directory>${project.build.directory}</directory>
                  <include>${project.build.finalName}.war</include>
                </resource>
              </resources>
              <forceTags>true</forceTags>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>test.local</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>local-integration-test</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <skipTests>false</skipTests>
                  <systemPropertyVariables>
                    <test.mode>local</test.mode>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start</goal>
                </goals>
              </execution>
              <execution>
                <id>stop</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>test.remote</id>
      <properties>
        <gcloud-projectId-file>${project.build.directory}/gcloud-projectid.properties
        </gcloud-projectId-file>
        <!--
           ~ remote tests require image in gcr.io
           ~ if local tests are enabled with remote, this image is used locally as well
           -->
        <jetty.test.image>gcr.io/${app.deploy.project}/jetty:${docker.tag.long}</jetty.test.image>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>find-app-deploy-project</id>
                <phase>validate</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <echo file="${gcloud-projectId-file}" append="false">
                      app.deploy.project=
                    </echo>
                    <exec executable="gcloud" logError="true" append="true"
                          output="${gcloud-projectId-file}">
                      <arg value="--quiet"/>
                      <arg value="config"/>
                      <arg value="list"/>
                      <arg value="--format=value(core.project)"/>
                    </exec>
                  </target>
                </configuration>
              </execution>
              <execution>
                <id>copy-deploy-artifact</id>
                <phase>package</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <copy file="${project.build.directory}/${project.build.finalName}.war"
                          todir="${project.build.directory}/appengine-staging/"/>
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>properties-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>read-gcloud-properties</id>
                <phase>initialize</phase>
                <goals>
                  <goal>read-project-properties</goal>
                </goals>
                <configuration>
                  <files>
                    <file>${gcloud-projectId-file}</file>
                  </files>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>remote-integration-test</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <skipTests>false</skipTests>
                  <systemPropertyVariables>
                    <test.mode>remote</test.mode>
                    <app.deploy.project>${app.deploy.project}</app.deploy.project>
                    <app.deploy.version>${maven.build.timestamp}</app.deploy.version>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <!-- deploy the service -->
              <execution>
                <id>deploy-remote-service</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <workingDirectory>${project.build.directory}/appengine-staging</workingDirectory>
                  <executable>gcloud</executable>
                  <arguments>
                    <argument>--quiet</argument>
                    <argument>app</argument>
                    <argument>deploy</argument>
                    <argument>app.yaml</argument>
                    <argument>--version</argument>
                    <argument>${maven.build.timestamp}</argument>
                  </arguments>
                </configuration>
              </execution>
              <!-- stop the service from 'deploy-remote-service' -->
              <execution>
                <id>stop-remote-service</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>gcloud</executable>
                  <arguments>
                    <argument>--quiet</argument>
                    <argument>app</argument>
                    <argument>versions</argument>
                    <argument>stop</argument>
                    <argument>${maven.build.timestamp}</argument>
                  </arguments>
                </configuration>
              </execution>
              <!-- remove the service from 'deploy-remote-service' -->
              <execution>
                <id>delete-remote-service</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>gcloud</executable>
                  <arguments>
                    <argument>--quiet</argument>
                    <argument>app</argument>
                    <argument>versions</argument>
                    <argument>delete</argument>
                    <argument>${maven.build.timestamp}</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>test.remote.deploy</id>
      <build>
        <plugins>
          <!-- create tag for local docker image to push for remote use in test -->
          <plugin>
            <groupId>com.spotify</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>tag-image</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>tag</goal>
                </goals>
                <configuration>
                  <image>jetty:${docker.tag.long}</image>
                  <newName>${jetty.test.image}</newName>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <!-- push a remote docker image to use with 'deploy-integration-test' -->
              <execution>
                <id>deploy-remote-docker</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>gcloud</executable>
                  <arguments>
                    <argument>docker</argument>
                    <argument>-q</argument>
                    <argument>--</argument>
                    <argument>push</argument>
                    <argument>${jetty.test.image}</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>test.remote.clean</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <!-- remove the remote image from 'deploy-remote-docker' -->
              <execution>
                <id>cleanup-remote-image</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>bash</executable>
                  <arguments>
                    <argument>-c</argument>
                    <argument>gcloud beta container images delete `docker inspect --format='{{index .RepoDigests 0}}' ${jetty.test.image}` -q</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

{'fraction_non_alphanumeric': 0.123601687144691, 'fraction_numerical': 0.0028974876214927564, 'mean_word_length': 1.2411638993917475, 'pattern_counts': {'":': 0, '<': 941, '<?xml version=': 2, '>': 941, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3685650', 'n_tokens_mistral': 7357, 'n_tokens_neox': 6508, 'n_words': 1033}