<commit_before><?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you 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>org.apache.sling</groupId>
        <artifactId>sling</artifactId>
        <version>5-incubator</version>
        <relativePath>../../parent/pom.xml</relativePath>
    </parent>

    <artifactId>org.apache.sling.launchpad.testing</artifactId>
    <packaging>war</packaging>
    <version>6-incubator-SNAPSHOT</version>

    <name>Apache Sling Launchpad Testing</name>
    <description>
        Sling Launchpad Testing module, contains integration tests that
        were previously in the launchpad webapp module.
    </description>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/testing</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/testing</developerConnection>
        <url>http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing</url>
    </scm>

    <properties>
        <!--
            Jetty default port (override with -D)
        -->
        <http.port>8888</http.port>
        
        <!-- path suffix for HTTP access to Sling -->
        <http.base.path />

        <!-- path suffix for WebDAV access to the repository -->
        <webdav.workspace.path />

        <!-- hostname for integration tests -->
        <test.host>localhost</test.host>

        <!--
            Disable Jetty webapp rescan (override with -D) 
        -->
        <jetty.scan.interval.seconds>0</jetty.scan.interval.seconds>

        <!-- 
            Sling home directory when starting with jetty:run
        -->
        <jetty.sling.home>target/sling</jetty.sling.home>

        <!-- 
            Defines which tests are for the "integration-testing" phase
        -->
        <integration.test.code.path>
            **/launchpad/webapp/integrationtest
        </integration.test.code.path>

        <!-- 
            Set this to true to stop mvn once the integration test Jetty instance is
            started. Useful to manually test the integration testing webapp.
        -->
        <integration.test.wait>false</integration.test.wait>
        
        <resources.bundles.path>${project.build.directory}/launchpad-bundles/resources/bundles</resources.bundles.path>
    </properties>

    <build>
        <plugins>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${basedir}</directory>
                            <includes>
                                <include>derby.log</include>
                                <include>cachedir</include>
                                <include>sling</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
                         <id>delete-sling-folder</id>
                         <phase>package</phase>
                         <goals>
                             <goal>run</goal>
                         </goals>
                         <configuration>
                             <tasks>
                                 <echo>SLING-845 - delete parent sling folder before integration tests</echo>
                                 <delete dir="../../sling" />
                             </tasks>
                        </configuration>
                     </execution>
                 </executions>
             </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <configuration>
                    <contextPath>/</contextPath>
                    <scanIntervalSeconds>
                        ${jetty.scan.interval.seconds}
                    </scanIntervalSeconds>

                    <systemProperties>
                        <systemProperty>
                            <name>sling.home</name>
                            <value>${jetty.sling.home}</value>
                        </systemProperty>
                        
                    </systemProperties>

                    <connectors>
                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                            <port>${http.port}</port>
                            <maxIdleTime>60000</maxIdleTime>
                        </connector>
                    </connectors>

                    <!-- 
                        Use target/... as the webapp source, as we unpack stuff there from the
                        Sling launcher modules
                    -->
                    <webAppSourceDirectory>
                        target/${artifactId}-${pom.version}
                    </webAppSourceDirectory>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- Unpack the sling-app launcher for inclusion in the web app -->
                        <id>unpack-dependencies</id>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>
                                org.apache.sling.launchpad.bundles
                            </includeArtifactIds>
                            <includes>
                                resources/**
                            </includes>
                            <excludeTransitive>true</excludeTransitive>
                            <outputDirectory>
                                ${project.build.directory}/launchpad-bundles
                            </outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>
                                true
                            </overWriteSnapshots>
                        </configuration>
                    </execution>
                    <!-- Launcher Jar -->                    
                    <execution>
                        <id>copy-launcher-jar</id>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.sling</groupId>
                                    <artifactId>org.apache.sling.launchpad.base</artifactId>
                                    <version>2.0.4-incubator</version>
                                </artifactItem>
                            </artifactItems>
                            <stripVersion>true</stripVersion>
                            <excludeTransitive>true</excludeTransitive>
                            <outputDirectory>
                                ${project.build.directory}/launchpad-bundles/resources
                            </outputDirectory>
                        </configuration>
                    </execution>

                    <execution>
                        <!-- 
                        	Copy additional bundles that must be initially installed to
                            WEB-INF/resources/bundles/N where N = desired
                            start level 
                        -->
                        <id>copy-bundles-dependencies</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${resources.bundles.path}/0
                            </outputDirectory>
                            <excludeTransitive>true</excludeTransitive>
                            <includeArtifactIds>
                                org.apache.sling.launchpad.test-services
                            </includeArtifactIds>
                            <includeScope>
                                provided
                            </includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- 
              Include sling-app launcher classes and resources, but no Sling 
              bundles (we want to specify our own versions) 
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <!-- the configuration resources -->
                        <resource>
                            <directory>
                                ${project.build.directory}/launchpad-bundles
                            </directory>
                            <targetPath>WEB-INF</targetPath>
                        </resource>
                        <!-- Legal stuff -->
                        <resource>
                            <directory>${basedir}</directory>
                            <targetPath>META-INF</targetPath>
                            <includes>
                                <include>LICENSE*</include>
                                <include>NOTICE*</include>
                                <include>DISCLAIMER</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <!-- 
                            WARNING: make sure these URLs are consistent with the
                            cargo-maven2-plugin settings: AFAIK Maven does not
                            expand variables in the <value> element.
                            And WARNING: these properties are duplicated somewhere in this
                            POM with slightly different values...there must be a better way. 
                        -->
                        <property>
                            <name>launchpad.http.server.url</name>
                            <value>
                                http://${test.host}:${http.port}/${http.base.path}
                            </value>
                        </property>
                        <property>
                            <name>launchpad.webdav.server.url</name>
                            <value>
                                http://${test.host}:${http.port}/${webdav.workspace.path}
                            </value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                  <!-- No javadocs -->
                    <excludePackageNames>
                        org.apache.sling
                    </excludePackageNames>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <!--
                Run the cargo-based integration tests.
            -->
            <id>cargoIntegrationTesting</id>
            <activation>
                <property>
                    <name>!maven.test.skip</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>surefire-integration-test</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <excludes>
                                        <exclude>none</exclude>
                                    </excludes>
                                    <includes>
                                        <include>
                                            ${integration.test.code.path}/**/*Test.java
                                        </include>
                                    </includes>
                                    <systemProperties>
                                        <!-- 
                                            WARNING: make sure these URLs are consistent with the
                                            cargo-maven2-plugin settings: AFAIK Maven does not
                                            expand variables in the <value> element.
                                            And WARNING: these properties are duplicated somewhere in this
                                            POM with slightly different values...there must be a better way. 
                                        -->
                                        <property>
                                            <name>
                                                launchpad.http.server.url
                                            </name>
                                            <value>
                                                http://${test.host}:${http.port}/${project.build.finalName}
                                            </value>
                                        </property>
                                        <property>
                                            <name>
                                                launchpad.webdav.server.url
                                            </name>
                                            <value>
                                                http://${test.host}:${http.port}/${project.build.finalName}/${webdav.workspace.path}
                                            </value>
                                        </property>
                                        
                                    </systemProperties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.cargo</groupId>
                        <artifactId>cargo-maven2-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start-container</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop-container</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <wait>${integration.test.wait}</wait>
                            <container>
                                <containerId>jetty6x</containerId>
                                <type>embedded</type>
                                <systemProperties>
                                    <sling.home>
                                        ${basedir}/target/it/sling
                                    </sling.home>
                                </systemProperties>
                            </container>
                            <configuration>
                                <home>${project.build.directory}/cargo</home>
                                <properties>
                                    <cargo.servlet.port>
                                        ${http.port}
                                    </cargo.servlet.port>
                                    <!-- 
                                        <cargo.jvmargs>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=30333,server=y,suspend=y</cargo.jvmargs>
                                    -->
                                </properties>
                            </configuration>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!--
                By default, do not run the integration tests in the test phase, as they have
                no Sling instance to talk to.
                See README.txt for how to run the integration tests against a running instance
                of Sling.
            -->
            <id>disableIntegrationTestsInTestPhase</id>
            <activation>
                <property>
                    <name>!maven.test.skip</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>
                                    ${integration.test.code.path}/**/*.java
                                </exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>        
    </profiles>

    <dependencies>
    
        <!--  The basic Sling WebApp -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.launchpad.base</artifactId>
            <version>2.0.5-incubator-SNAPSHOT</version>
            <classifier>webapp</classifier>
            <type>war</type>
            <scope>runtime</scope>
        </dependency>
        
        <!-- The basic Sling Bundles -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.launchpad.bundles</artifactId>
            <version>6-incubator-SNAPSHOT</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <!-- JCR Install - needs to be in a profile -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>biz.aQute</groupId>
            <artifactId>bnd</artifactId>
            <version>0.0.169</version>
            <scope>test</scope>
        </dependency>

        <!-- Dependencies for the Test Build and Run -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.testing</artifactId>
            <version>2.0.4-incubator</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.servlets.post</artifactId>
            <version>2.0.2-incubator</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.launchpad.test-services</artifactId>
            <version>2.0.6-incubator</version>
            <scope>provided</scope><commit_msg>SLING-975 Use fixed commons/testing bundle<commit_after><?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you 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>org.apache.sling</groupId>
        <artifactId>sling</artifactId>
        <version>5-incubator</version>
        <relativePath>../../parent/pom.xml</relativePath>
    </parent>

    <artifactId>org.apache.sling.launchpad.testing</artifactId>
    <packaging>war</packaging>
    <version>6-incubator-SNAPSHOT</version>

    <name>Apache Sling Launchpad Testing</name>
    <description>
        Sling Launchpad Testing module, contains integration tests that
        were previously in the launchpad webapp module.
    </description>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/testing</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/testing</developerConnection>
        <url>http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing</url>
    </scm>

    <properties>
        <!--
            Jetty default port (override with -D)
        -->
        <http.port>8888</http.port>
        
        <!-- path suffix for HTTP access to Sling -->
        <http.base.path />

        <!-- path suffix for WebDAV access to the repository -->
        <webdav.workspace.path />

        <!-- hostname for integration tests -->
        <test.host>localhost</test.host>

        <!--
            Disable Jetty webapp rescan (override with -D) 
        -->
        <jetty.scan.interval.seconds>0</jetty.scan.interval.seconds>

        <!-- 
            Sling home directory when starting with jetty:run
        -->
        <jetty.sling.home>target/sling</jetty.sling.home>

        <!-- 
            Defines which tests are for the "integration-testing" phase
        -->
        <integration.test.code.path>
            **/launchpad/webapp/integrationtest
        </integration.test.code.path>

        <!-- 
            Set this to true to stop mvn once the integration test Jetty instance is
            started. Useful to manually test the integration testing webapp.
        -->
        <integration.test.wait>false</integration.test.wait>
        
        <resources.bundles.path>${project.build.directory}/launchpad-bundles/resources/bundles</resources.bundles.path>
    </properties>

    <build>
        <plugins>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${basedir}</directory>
                            <includes>
                                <include>derby.log</include>
                                <include>cachedir</include>
                                <include>sling</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
                         <id>delete-sling-folder</id>
                         <phase>package</phase>
                         <goals>
                             <goal>run</goal>
                         </goals>
                         <configuration>
                             <tasks>
                                 <echo>SLING-845 - delete parent sling folder before integration tests</echo>
                                 <delete dir="../../sling" />
                             </tasks>
                        </configuration>
                     </execution>
                 </executions>
             </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <configuration>
                    <contextPath>/</contextPath>
                    <scanIntervalSeconds>
                        ${jetty.scan.interval.seconds}
                    </scanIntervalSeconds>

                    <systemProperties>
                        <systemProperty>
                            <name>sling.home</name>
                            <value>${jetty.sling.home}</value>
                        </systemProperty>
                        
                    </systemProperties>

                    <connectors>
                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                            <port>${http.port}</port>
                            <maxIdleTime>60000</maxIdleTime>
                        </connector>
                    </connectors>

                    <!-- 
                        Use target/... as the webapp source, as we unpack stuff there from the
                        Sling launcher modules
                    -->
                    <webAppSourceDirectory>
                        target/${artifactId}-${pom.version}
                    </webAppSourceDirectory>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- Unpack the sling-app launcher for inclusion in the web app -->
                        <id>unpack-dependencies</id>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>
                                org.apache.sling.launchpad.bundles
                            </includeArtifactIds>
                            <includes>
                                resources/**
                            </includes>
                            <excludeTransitive>true</excludeTransitive>
                            <outputDirectory>
                                ${project.build.directory}/launchpad-bundles
                            </outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>
                                true
                            </overWriteSnapshots>
                        </configuration>
                    </execution>
                    <!-- Launcher Jar -->                    
                    <execution>
                        <id>copy-launcher-jar</id>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.sling</groupId>
                                    <artifactId>org.apache.sling.launchpad.base</artifactId>
                                    <version>2.0.4-incubator</version>
                                </artifactItem>
                            </artifactItems>
                            <stripVersion>true</stripVersion>
                            <excludeTransitive>true</excludeTransitive>
                            <outputDirectory>
                                ${project.build.directory}/launchpad-bundles/resources
                            </outputDirectory>
                        </configuration>
                    </execution>

                    <execution>
                        <!-- 
                        	Copy additional bundles that must be initially installed to
                            WEB-INF/resources/bundles/N where N = desired
                            start level 
                        -->
                        <id>copy-bundles-dependencies</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${resources.bundles.path}/0
                            </outputDirectory>
                            <excludeTransitive>true</excludeTransitive>
                            <includeArtifactIds>
                                org.apache.sling.launchpad.test-services
                            </includeArtifactIds>
                            <includeScope>
                                provided
                            </includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- 
              Include sling-app launcher classes and resources, but no Sling 
              bundles (we want to specify our own versions) 
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <!-- the configuration resources -->
                        <resource>
                            <directory>
                                ${project.build.directory}/launchpad-bundles
                            </directory>
                            <targetPath>WEB-INF</targetPath>
                        </resource>
                        <!-- Legal stuff -->
                        <resource>
                            <directory>${basedir}</directory>
                            <targetPath>META-INF</targetPath>
                            <includes>
                                <include>LICENSE*</include>
                                <include>NOTICE*</include>
                                <include>DISCLAIMER</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <!-- 
                            WARNING: make sure these URLs are consistent with the
                            cargo-maven2-plugin settings: AFAIK Maven does not
                            expand variables in the <value> element.
                            And WARNING: these properties are duplicated somewhere in this
                            POM with slightly different values...there must be a better way. 
                        -->
                        <property>
                            <name>launchpad.http.server.url</name>
                            <value>
                                http://${test.host}:${http.port}/${http.base.path}
                            </value>
                        </property>
                        <property>
                            <name>launchpad.webdav.server.url</name>
                            <value>
                                http://${test.host}:${http.port}/${webdav.workspace.path}
                            </value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                  <!-- No javadocs -->
                    <excludePackageNames>
                        org.apache.sling
                    </excludePackageNames>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <!--
                Run the cargo-based integration tests.
            -->
            <id>cargoIntegrationTesting</id>
            <activation>
                <property>
                    <name>!maven.test.skip</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>surefire-integration-test</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <excludes>
                                        <exclude>none</exclude>
                                    </excludes>
                                    <includes>
                                        <include>
                                            ${integration.test.code.path}/**/*Test.java
                                        </include>
                                    </includes>
                                    <systemProperties>
                                        <!-- 
                                            WARNING: make sure these URLs are consistent with the
                                            cargo-maven2-plugin settings: AFAIK Maven does not
                                            expand variables in the <value> element.
                                            And WARNING: these properties are duplicated somewhere in this
                                            POM with slightly different values...there must be a better way. 
                                        -->
                                        <property>
                                            <name>
                                                launchpad.http.server.url
                                            </name>
                                            <value>
                                                http://${test.host}:${http.port}/${project.build.finalName}
                                            </value>
                                        </property>
                                        <property>
                                            <name>
                                                launchpad.webdav.server.url
                                            </name>
                                            <value>
                                                http://${test.host}:${http.port}/${project.build.finalName}/${webdav.workspace.path}
                                            </value>
                                        </property>
                                        
                                    </systemProperties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.cargo</groupId>
                        <artifactId>cargo-maven2-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start-container</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop-container</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <wait>${integration.test.wait}</wait>
                            <container>
                                <containerId>jetty6x</containerId>
                                <type>embedded</type>
                                <systemProperties>
                                    <sling.home>
                                        ${basedir}/target/it/sling
                                    </sling.home>
                                </systemProperties>
                            </container>
                            <configuration>
                                <home>${project.build.directory}/cargo</home>
                                <properties>
                                    <cargo.servlet.port>
                                        ${http.port}
                                    </cargo.servlet.port>
                                    <!-- 
                                        <cargo.jvmargs>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=30333,server=y,suspend=y</cargo.jvmargs>
                                    -->
                                </properties>
                            </configuration>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!--
                By default, do not run the integration tests in the test phase, as they have
                no Sling instance to talk to.
                See README.txt for how to run the integration tests against a running instance
                of Sling.
            -->
            <id>disableIntegrationTestsInTestPhase</id>
            <activation>
                <property>
                    <name>!maven.test.skip</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>
                                    ${integration.test.code.path}/**/*.java
                                </exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>        
    </profiles>

    <dependencies>
    
        <!--  The basic Sling WebApp -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.launchpad.base</artifactId>
            <version>2.0.5-incubator-SNAPSHOT</version>
            <classifier>webapp</classifier>
            <type>war</type>
            <scope>runtime</scope>
        </dependency>
        
        <!-- The basic Sling Bundles -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.launchpad.bundles</artifactId>
            <version>6-incubator-SNAPSHOT</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <!-- JCR Install - needs to be in a profile -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>biz.aQute</groupId>
            <artifactId>bnd</artifactId>
            <version>0.0.169</version>
            <scope>test</scope>
        </dependency>

        <!-- Dependencies for the Test Build and Run -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.testing</artifactId>
            <version>2.0.5-incubator-SNAPSHOT</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.servlets.post</artifactId>
            <version>2.0.2-incubator</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.launchpad.test-services</artifactId>
            <version>2.0.6-incubator</version>
            <scope>provided</scope>
{'fraction_non_alphanumeric': 0.09281024746338552, 'fraction_numerical': 0.003558147008860934, 'mean_word_length': 0.8996598639455783, 'pattern_counts': {'":': 0, '<': 1021, '<?xml version=': 2, '>': 1021, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 140, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2818410', 'n_tokens_mistral': 10023, 'n_tokens_neox': 8902, 'n_words': 1623}