text:
<?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>org.motechproject</groupId>
    <artifactId>motech</artifactId>
    <version>0.18.1-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>MOTECH</name>

    <description>
        MOTECH is a software system from Grameen Foundation that harnesses the ubiquity
        of mobile phones to deliver and receive information from patient and caregivers.
    </description>

    <properties>
        <db.server>localhost</db.server>
        <db.port>5984</db.port>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring.version>3.1.0.RELEASE</spring.version>
        <spring.security.version>3.1.0.RELEASE</spring.security.version>
        <spring.integration.version>2.1.0.RELEASE</spring.integration.version>
        <external.dependency.release.tag>r010</external.dependency.release.tag>
        <activemq.version>5.4.2-${external.dependency.release.tag}</activemq.version>
        <modules.root.dir>${basedir}</modules.root.dir>
        <jdk.version>1.7</jdk.version>

        <scm.connection>scm:git:https://code.google.com/p/motech</scm.connection>
        <scm.developerConnection>scm:git:https://code.google.com/p/motech</scm.developerConnection>
        <scm.url>https://code.google.com/p/motech</scm.url>
    </properties>

    <dependencies>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.context</artifactId>
        </dependency>
        <!-- OSGi -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.gemini</groupId>
            <artifactId>org.eclipse.gemini.blueprint.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.gemini</groupId>
            <artifactId>org.eclipse.gemini.blueprint.extender</artifactId>
        </dependency>
        <!-- SLF4J -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>com.springsource.slf4j.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>com.springsource.slf4j.log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
        </dependency>
        <!-- Log4J -->
        <dependency>
            <groupId>org.apache.log4j</groupId>
            <artifactId>com.springsource.org.apache.log4j</artifactId>
        </dependency>
        <!-- Others -->
        <dependency>
            <groupId>com.googlecode.lambdaj</groupId>
            <artifactId>org.motechproject.com.googlecode.lambdaj</artifactId>
        </dependency>
        <!-- Test -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit</groupId>
            <artifactId>org.motechproject.org.junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>com.springsource.org.mockito</artifactId>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
        </dependency>
        <!-- OSGi IT -->
        <dependency>
            <groupId>org.motechproject</groupId>
            <artifactId>org.motechproject.osgi.it</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.http.jetty</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- Javax -->
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>com.springsource.javax.validation</artifactId>
                <version>1.0.0.GA</version>
            </dependency>
            <dependency>
                <groupId>javax.transaction</groupId>
                <artifactId>com.springsource.javax.transaction</artifactId>
                <version>1.1.0</version>
            </dependency>
            <dependency>
                <groupId>javax.jms</groupId>
                <artifactId>com.springsource.javax.jms</artifactId>
                <version>1.1.0</version>
            </dependency>
            <dependency>
                <groupId>javax.ejb</groupId>
                <artifactId>com.springsource.javax.ejb</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.rpc</groupId>
                <artifactId>com.springsource.javax.xml.rpc</artifactId>
                <version>1.1.0</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>com.springsource.javax.servlet</artifactId>
                <version>2.5.0</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.soap</groupId>
                <artifactId>com.springsource.javax.xml.soap</artifactId>
                <version>1.3.0</version>
            </dependency>
            <dependency>
                <groupId>javax.activation</groupId>
                <artifactId>com.springsource.javax.activation</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>com.springsource.javax.annotation</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>com.springsource.javax.mail</artifactId>
                <version>1.4.5</version>
            </dependency>
            <!-- Spring -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.core</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.beans</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.context</artifactId>
                <version>${spring.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>com.springsource.org.apache.commons.logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.context.support</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.expression</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.aop</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.aspects</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.asm</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.web</artifactId>
                <version>${spring.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>com.springsource.org.apache.commons.logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.web.servlet</artifactId>
                <version>${spring.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>com.springsource.org.apache.commons.logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.orm</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.jdbc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.jms</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.transaction</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>org.springframework.security.core</artifactId>
                <version>${spring.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.aop</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.beans</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.context</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.transaction</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.expression</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.jdbc</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.web</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>org.springframework.security.config</artifactId>
                <version>${spring.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.aop</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.beans</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.context</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.transaction</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.expression</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.jdbc</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.web</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework.security</groupId>
                        <artifactId>org.springframework.security.web</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>org.springframework.security.web</artifactId>
                <version>${spring.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.beans</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.context</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.transaction</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.expression</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.jdbc</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.web</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.oxm</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.integration</groupId>
                <artifactId>spring-integration-core</artifactId>
                <version>2.1.0.RELEASE</version>
                <exclusions>
                    <exclusion>
                        <artifactId>spring-aop</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-tx</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-context</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.integration</groupId>
                <artifactId>spring-integration-jms</artifactId>
                <version>${spring.integration.version}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>spring-tx</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-jms</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework.integration</groupId>
                        <artifactId>spring-integration-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- OSGi -->
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>4.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.compendium</artifactId>
                <version>4.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.gemini</groupId>
                <artifactId>org.eclipse.gemini.blueprint.core</artifactId>
                <version>1.0.2.RELEASE</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.eclipse.osgi</groupId>
                        <artifactId>org.eclipse.osgi</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.gemini</groupId>
                <artifactId>org.eclipse.gemini.blueprint.extender</artifactId>
                <version>1.0.2.RELEASE</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.aop</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.beans</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.context</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.context.support</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.osgi</groupId>
                        <artifactId>org.eclipse.osgi</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.osgi</groupId>
                        <artifactId>org.eclipse.osgi.services</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.http.bridge</artifactId>
                <version>2.2.0</version>
                <scope>provided</scope>
            </dependency>
            <!-- Apache Commons -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.lang</artifactId>
                <version>2.6.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.io</artifactId>
                <version>1.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.fileupload</artifactId>
                <version>1.2.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.dbcp</artifactId>
                <version>1.2.2.osgi</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.pool</artifactId>
                <version>1.3.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.beanutils</artifactId>
                <version>1.8.3</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.collections</artifactId>
                <version>3.2.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.codec</artifactId>
                <version>1.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.validator</artifactId>
                <version>1.3.1</version>
                <exclusions>
                    <exclusion>
                        <artifactId>com.springsource.org.apache.commons.digester</artifactId>
                        <groupId>org.apache.commons</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>com.springsource.org.apache.commons.beanutils</artifactId>
                        <groupId>org.apache.commons</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.vfs</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.digester</artifactId>
                <version>1.8.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.logging</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>com.springsource.org.apache.commons.httpclient</artifactId>
                <version>3.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>com.springsource.org.apache.commons.codec</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>org.motechproject.org.hibernate.validator</artifactId>
                <version>4.1.0.Final-${external.dependency.release.tag}</version>
            </dependency>
            <!-- SLF4J -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>com.springsource.slf4j.api</artifactId>
                <version>1.6.1</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>com.springsource.slf4j.log4j</artifactId>
                <version>1.6.1</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
                <version>1.6.1</version>
            </dependency>
            <!-- Log4J -->
            <dependency>
                <groupId>org.apache.log4j</groupId>
                <artifactId>com.springsource.org.apache.log4j</artifactId>
                <version>1.2.16</version>
            </dependency>
            <!-- Asterisk -->
            <dependency>
                <groupId>org.asteriskjava</groupId>
                <artifactId>asterisk-java</artifactId>
                <version>1.0.0.M3</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- ActiveMQ -->
            <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>org.motechproject.org.apache.activemq</artifactId>
                <version>${activemq.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.activemq</groupId>
                        <artifactId>activemq-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.annotation</groupId>
                        <artifactId>com.springsource.javax.annotation</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>kahadb</artifactId>
                <version>5.4.2</version>
                <exclusions>
                    <exclusion>
                        <artifactId>commons-logging</artifactId>
                        <groupId>commons-logging</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- Fragment -->
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>motech-c3p0-fragment-bundle</artifactId>
                <version>0.16-${external.dependency.release.tag}</version>
            </dependency>
            <!-- Others -->
            <dependency>
                <groupId>org.sonatype.aether</groupId>
                <artifactId>aether-api</artifactId>
                <version>1.13.1</version>
            </dependency>
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>com.springsource.org.aspectj.runtime</artifactId>
                <version>1.6.8.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>com.springsource.antlr</artifactId>
                <version>2.7.6</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.ehcache</groupId>
                <artifactId>com.springsource.net.sf.ehcache</artifactId>
                <version>1.6.2</version>
            </dependency>
            <dependency>
                <groupId>com.googlecode.lambdaj</groupId>
                <artifactId>org.motechproject.com.googlecode.lambdaj</artifactId>
                <version>2.3.3-${external.dependency.release.tag}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>lambdaj</artifactId>
                        <groupId>com.googlecode.lambdaj</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.quartz-scheduler</groupId>
                <artifactId>org.motechproject.org.quartz-scheduler</artifactId>
                <version>2.1.5-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.0</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>org.motechproject.org.codehaus.jackson</artifactId>
                <version>1.9.7-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>com.springsource.org.hamcrest</artifactId>
                <version>1.1.0</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>com.springsource.org.hamcrest.core</artifactId>
                <version>1.1.0</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>1.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.7</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.sonatype.aether</groupId>
                <artifactId>org.motechproject.aether-api</artifactId>
                <version>1.13.1-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>org.motechproject.com.thoughtworks.xstream</artifactId>
                <version>1.4.2-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>com.google.collect</groupId>
                <artifactId>com.springsource.com.google.common.collect</artifactId>
                <version>0.8.0.20080820</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>org.motechproject.com.google.code.gson</artifactId>
                <version>1.7.1-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>com.springsource.org.apache.velocity</artifactId>
                <version>1.6.2</version>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>com.springsource.org.json</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>org.motechproject.org.json</artifactId>
                <version>20080701-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>org.motechproject.mforms</groupId>
                <artifactId>xforms-server</artifactId>
                <version>0.7.0-beta-1</version>
            </dependency>
            <dependency>
                <groupId>com.jcraft.jzlib</groupId>
                <artifactId>com.springsource.com.jcraft.jzlib</artifactId>
                <version>1.0.7</version>
            </dependency>
            <dependency>
                <groupId>org.jdom</groupId>
                <artifactId>com.springsource.org.jdom</artifactId>
                <version>1.1.0</version>
            </dependency>
            <dependency>
                <groupId>org.aopalliance</groupId>
                <artifactId>com.springsource.org.aopalliance</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.ektorp</groupId>
                <artifactId>org.motechproject.org.ektorp</artifactId>
                <version>1.3.0-${external.dependency.release.tag}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.ektorp</groupId>
                        <artifactId>org.ektorp</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.ektorp</groupId>
                        <artifactId>org.ektorp.spring</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.github.ldriscoll</groupId>
                <artifactId>org.motechproject.ektorplucene</artifactId>
                <version>0.1.5-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>org.drools</groupId>
                <artifactId>drools-api</artifactId>
                <version>5.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.mvel</groupId>
                <artifactId>org.motechproject.org.mvel</artifactId>
                <version>2.0beta1-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>org.smslib</groupId>
                <artifactId>org.motechproject.org.smslib</artifactId>
                <version>3.5.1-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>com.googlecode.jsmpp</groupId>
                <artifactId>org.motechproject.com.googlecode.jsmpp</artifactId>
                <version>2.1.0-${external.dependency.release.tag}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>com.springsource.javax.management.j2ee</artifactId>
                <version>1.0.1</version>
            </dependency>
            <dependency>
                <groupId>org.objectweb.howl</groupId>
                <artifactId>com.springsource.org.objectweb.howl</artifactId>
                <version>1.0.2</version>
            </dependency>
            <dependency>
                <groupId>org.objectweb.asm</groupId>
                <artifactId>com.springsource.org.objectweb.asm</artifactId>
                <version>2.2.3</version>
            </dependency>
            <dependency>
                <groupId>com.mysql.jdbc</groupId>
                <artifactId>com.springsource.com.mysql.jdbc</artifactId>
                <version>5.1.6</version>
            </dependency>
            <dependency>
                <groupId>org.simpleframework</groupId>
                <artifactId>org.motechproject.org.simpleframework.xml</artifactId>
                <version>1.6.2</version>
            </dependency>
            <dependency>
                <groupId>ca.uhn.hapi</groupId>
                <artifactId>org.motechproject.com.ca.uhn.hapi</artifactId>
                <version>0.5.0</version>
            </dependency>
            <dependency>
                <groupId>org.openmrs.liquibase</groupId>
                <artifactId>org.motechproject.org.openmrs.liquibase</artifactId>
                <version>1.9.4</version>
            </dependency>
            <dependency>
                <groupId>org.azeckoski</groupId>
                <artifactId>org.motechproject.org.azeckoski.reflectutils</artifactId>
                <version>0.9.14</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.cglib</groupId>
                <artifactId>com.springsource.net.sf.cglib</artifactId>
                <version>2.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>com.springsource.org.hibernate</artifactId>
                <version>3.3.2.GA</version>
                <exclusions>
                    <exclusion>
                        <artifactId>com.springsource.slf4j.api</artifactId>
                        <groupId>org.slf4j</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.openmrs.module</groupId>
                <artifactId>idgen-core</artifactId>
                <version>1.5.1</version>
                <scope>provided</scope>
            </dependency>
            <!-- OpenMRS -->
            <dependency>
                <groupId>org.openmrs.api</groupId>
                <artifactId>openmrs-api</artifactId>
                <version>1.8.4</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-io</groupId>
                        <artifactId>commons-io</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.azeckoski</groupId>
                        <artifactId>reflectutils</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-beans</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-aop</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-orm</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-tx</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-jdbc</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.antlr</groupId>
                        <artifactId>antlr-runtime</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>ca.uhn.hapi</groupId>
                        <artifactId>hapi-structures-v25</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.openmrs.simpleframework</groupId>
                        <artifactId>simple-xml</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>stax</groupId>
                        <artifactId>stax</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.openmrs.hibernate</groupId>
                        <artifactId>hibernate</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.thoughtworks.xstream</groupId>
                        <artifactId>xstream</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.openmrs.liquibase</groupId>
                        <artifactId>liquibase-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <artifactId>cglib-nodep</artifactId>
                        <groupId>cglib</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>slf4j-api</artifactId>
                        <groupId>org.slf4j</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>slf4j-log4j12</artifactId>
                        <groupId>org.slf4j</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-oxm</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>jcl-over-slf4j</artifactId>
                        <groupId>org.slf4j</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.openmrs.web</groupId>
                <artifactId>openmrs-web</artifactId>
                <version>1.8.2</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>spring-web</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-webmvc</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-core</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-context</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-oxm</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.openmrs.test</groupId>
                <artifactId>openmrs-test</artifactId>
                <version>1.8.2</version>
                <type>pom</type>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>slf4j-api</artifactId>
                        <groupId>org.slf4j</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>commons-logging</artifactId>
                        <groupId>commons-logging</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-oxm</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>spring-test</artifactId>
                        <groupId>org.springframework</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.http.proxy</artifactId>
                <version>2.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.framework</artifactId>
                <version>3.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.eventadmin</artifactId>
                <version>1.3.2</version>
            </dependency>
            <!-- Test -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.test</artifactId>
                <version>${spring.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>org.motechproject.org.junit</artifactId>
                <version>4.9-${external.dependency.release.tag}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>com.springsource.org.mockito</artifactId>
                <version>1.8.4</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>1.4.9</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito</artifactId>
                <version>1.4.9</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit-addons</groupId>
                <artifactId>junit-addons</artifactId>
                <version>1.4</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>junit</artifactId>
                        <groupId>junit</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test-mvc</artifactId>
                <version>1.0.0.M1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>com.springsource.org.mortbay.jetty.server</artifactId>
                <version>6.1.9</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.custommonkey.xmlunit</groupId>
                <artifactId>com.springsource.org.custommonkey.xmlunit</artifactId>
                <version>1.2.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-core</artifactId>
                <version>1.9.4-mod</version>
                <scope>test</scope>
            </dependency>
            <!-- OSGi IT -->
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.http.jetty</artifactId>
                <version>2.0.4</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.motechproject</groupId>
                <artifactId>org.motechproject.osgi.it</artifactId>
                <version>1.0.2.RELEASE-r009</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>jcl-over-slf4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>org.springframework.security.openid</artifactId>
                <version>${spring.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <!-- Non-OSGI modules -->
        <module>platform/commons-api</module>
        <module>platform/commons-date</module>
        <module>platform/commons-couchdb</module>
        <module>platform/event</module>
        <module>platform/osgi-web-util</module>
        <module>platform/server-api</module>
        <module>platform/server-config</module>
        <module>platform/server-startup</module>
        <module>platform/server</module>
        <module>platform/web-security/web-security</module>
        <module>platform/web-security/web-security-bundle</module>
        <module>modules/admin/admin</module>
        <module>modules/appointments/api</module>
        <module>modules/decisiontree/core</module>
        <module>modules/decisiontree/server</module>
        <module>modules/event-aggregation/event-aggregation</module>
        <module>modules/event-logging/event-logging</module>
        <module>modules/ivr/api</module>
        <module>modules/ivr/asterisk</module>
        <module>modules/ivr/kookoo</module>
        <module>modules/ivr/verboice</module>
        <module>modules/ivr/voxeo</module>
        <module>modules/scheduler/scheduler</module>
        <module>modules/sms/api</module>
        <module>modules/sms/http</module>
        <module>modules/sms/smpp</module>
        <module>modules/testing-utils/testing-utils</module>

        <module>utils/http-agent/http-agent</module>

        <!-- OSGI modules -->
        <module>platform/server-bundle</module>
        <module>modules/admin/admin-bundle</module>
        <module>modules/appointments/api-bundle</module>
        <module>modules/decisiontree/server-bundle</module>
        <module>modules/event-aggregation/event-aggregation-bundle</module>
        <module>modules/event-logging/event-logging-bundle</module>
        <module>modules/ivr/api-bundle</module>
        <module>modules/ivr/asterisk-bundle</module>
        <module>modules/ivr/kookoo-bundle</module>
        <module>modules/ivr/verboice-bundle</module>
        <module>modules/ivr/voxeo-bundle</module>
        <module>modules/ivr/motech-calllog</module>
        <module>modules/scheduler/scheduler-bundle</module>
        <module>modules/sms/api-bundle</module>
        <module>modules/sms/http-bundle</module>
        <module>modules/sms/smpp-bundle</module>
        <module>utils/http-agent/http-agent-bundle</module>
        <module>utils/archetypes/maven-archetype-motech-module</module>
        <module>modules/medicmobile/trunk</module>
        <!-- Packaging modules -->
        <module>packaging/deb</module>
        <module>packaging/rpm</module>

    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <preparationGoals>clean install</preparationGoals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
                <executions>
                    <execution>
                        <id>default-testCompile</id>
                        <phase>test-compile</phase>
                        <configuration>
                            <testExcludes>
                                <exclude>**/ft/*.java</exclude>
                            </testExcludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>2.12.4</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <excludes>
                        <exclude>**/**/*ForTest.java</exclude>
                        <exclude>**/**/*BundleIT.java</exclude>
                        <exclude>**/ft/*.java</exclude>
                    </excludes>
                    <argLine>-XX:-UseSplitVerifier</argLine>
                    <!-- bug in powermock on java7 -->
                    <forkMode>once</forkMode>
                    <!-- bug in surefire; won't pass argline for never -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <wtpversion>2.0</wtpversion>
                    <downloadSources>true</downloadSources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.9.0</version>
                <configuration>
                    <header>header.txt</header>
                    <strictCheck>true</strictCheck>
                    <excludes>
                        <exclude>**/jquery-autocomplete/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>2.7.1</version>
                <configuration>
                    <rulesets>
                        <ruleset>${modules.root.dir}/pmd.xml</ruleset>
                    </rulesets>
                    <includeTests>false</includeTests>
                    <targetJdk>${jdk.version}</targetJdk>
                    <skip>${maven.test.skip}</skip>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Uncomment with findbugs dependency -->
            <!--<plugin>-->
            <!--<groupId>org.codehaus.mojo</groupId>-->
            <!--<artifactId>findbugs-maven-plugin</artifactId>-->
            <!--<version>2.3.2</version>-->
            <!--<configuration>-->
            <!--<failOnError>true</failOnError>-->
            <!--<effort>Max</effort>-->
            <!--<threshold>Low</threshold>-->
            <!--<excludeFilterFile>${modules.root.dir}/findbugs-exclude.xml</excludeFilterFile>-->
            <!--<includeFilterFile>${modules.root.dir}/findbugs-include.xml</includeFilterFile>-->
            <!--<skip>${maven.test.skip}</skip>-->
            <!--<includeTests>false</includeTests>-->
            <!--</configuration>-->
            <!--<executions>-->
            <!--<execution>-->
            <!--<phase>verify</phase>-->
            <!--<goals>-->
            <!--<goal>check</goal>-->
            <!--</goals>-->
            <!--</execution>-->
            <!--</executions>-->
            <!--</plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <configLocation>${modules.root.dir}/checkstyle.xml</configLocation>
                    <includeTestSourceDirectory>false</includeTestSourceDirectory>
                    <enableFilesSummary>true</enableFilesSummary>
                    <failsOnError>true</failsOnError>
                    <consoleOutput>true</consoleOutput>
                    <skip>${maven.test.skip}</skip>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.5.1</version>
                <executions>
                    <execution>
                        <id>list-dependencies</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>resolve</goal>
                        </goals>
                        <configuration>
                            <outputFile>target/dependencies.list</outputFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>IT</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.9</version>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.surefire</groupId>
                                <artifactId>surefire-junit47</artifactId>
                                <version>2.12.4</version>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                                <configuration>
                                    <encoding>UTF-8</encoding>
                                    <excludes>
                                        <exclude>**/**/*BundleIT.java</exclude>
                                    </excludes>
                                    <summaryFile>target/failsafe-reports/failsafe-summary-it.xml</summaryFile>
                                </configuration>
                            </execution>
                            <execution>
                                <id>integration-test-osgi</id>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                                <configuration>
                                    <encoding>UTF-8</encoding>
                                    <includes>
                                        <include>**/**/*BundleIT.java</include>
                                    </includes>
                                    <summaryFile>target/failsafe-reports/failsafe-summary-it-osgi.xml</summaryFile>
                                </configuration>
                            </execution>
                            <execution>
                                <id>verify</id>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                                <configuration>
                                    <summaryFiles>
                                        <summaryFile>target/failsafe-reports/failsafe-summary-it.xml</summaryFile>
                                        <summaryFile>target/failsafe-reports/failsafe-summary-it-osgi.xml</summaryFile>
                                    </summaryFiles>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>FT</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.5.1</version>
                        <executions>
                            <execution>
                                <id>default-testCompile</id>
                                <phase>test-compile</phase>
                                <configuration>
                                    <fork>true</fork>
                                    <compilerArgument>
                                        -Xbootclasspath/p:${modules.root.dir}/tools/jvmfaketime/jvmfaketime.jar
                                    </compilerArgument>
                                    <testExcludes>
                                        <exclude>NONE</exclude>
                                    </testExcludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.12</version>
                        <configuration>
                            <excludes>
                                <exclude>NONE</exclude>
                            </excludes>
                            <includes>
                                <include>**/ft/*.java</include>
                            </includes>
                            <argLine>-XX:-UseSplitVerifier</argLine>
                            <!-- bug in powermock on java7 -->
                            <forkMode>always</forkMode>
                            <!-- bug in surefire; won't pass argline for never -->
                            <argLine>-Xbootclasspath/p:${modules.root.dir}/tools/jvmfaketime/jvmfaketime.jar</argLine>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.9</version>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>RPM</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>rpm-maven-plugin</artifactId>
                        <version>2.0</version>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>attached-rpm</goal>
                                </goals>
                            </execution>
                        </executions>

                        <configuration>
                            <copyright>2012, Grameen Foundation</copyright>
                            <distribution>Motech distribution</distribution>
                            <group>Applications/Internet</group>
                            <prefix>/usr/share</prefix>

                            <defineStatements>
                                <defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
                            </defineStatements>

                            <requires>
                                <require>motech-base >= ${project.version}</require>
                                <require>mysql-server</require>
                                <require>couchdb</require>
                                <require>curl</require>
                            </requires>

                            <mappings>
                                <mapping>
                                    <directory>/usr/share/doc/motech</directory>
                                    <documentation>true</documentation>
                                    <username>root</username>
                                    <groupname>root</groupname>
                                    <sources>
                                        <source>
                                            <location>LICENSE.txt</location>
                                        </source>
                                        <source>
                                            <location>README</location>
                                        </source>
                                    </sources>
                                </mapping>
                            </mappings>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>motech-repo</id>
            <name>MOTECH Maven Repository</name>
            <url>http://nexus.motechproject.org/content/repositories/public</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>motech-repo</id>
            <name>MOTECH Maven Repository</name>
            <url>http://nexus.motechproject.org/content/repositories/public</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <repository>
            <id>motech.nexus</id>
            <name>MOTECH Releases Repository</name>
            <url>http://nexus.motechproject.org/content/repositories/releases</url>
            <uniqueVersion>false</uniqueVersion>
        </repository>
        <snapshotRepository>
            <id>motech.nexus</id>
            <name>MOTECH Snapshots Repository</name>
            <url>http://nexus.motechproject.org/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>2.7</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <xrefLocation>${project.reporting.outputDirectory}/../xref-test</xrefLocation>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <xrefLocation>${project.reporting.outputDirectory}/../xref</xrefLocation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.3.1</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>dependencies</report>
                            <report>mailing-list</report>
                            <report>cim</report>
                            <report>issue-tracking</report>
                            <report>license</report>
                            <report>scm</report>
                            <report>summary</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>2.4</version>
            </plugin>
        </plugins>
    </reporting>

    <!-- License -->
    <licenses>
        <license>
            <name>MOTECH PLATFORM OPENSOURCE LICENSE AGREEMENT</name>
            <url>license.txt</url>
        </license>
    </licenses>

    <organization>
        <name>Grameen Foundation</name>
        <url>http://grameenfoundation.org/</url>
    </organization>

    <ciManagement>
        <system>hudson</system>
        <url>http://ci.motechproject.org/</url>
    </ciManagement>

    <mailingLists>
        <mailingList>
            <name>MOTECH Dev</name>
            <subscribe>motech-dev+subscribe@googlegroups.com</subscribe>
            <unsubscribe>motech-dev+unsubscribe@googlegroups.com</unsubscribe>
            <post>motech-dev@googlegroups.com</post>
            <archive>http://groups.google.com/group/motech-dev</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>${scm.connection}</connection>
        <developerConnection>${scm.developerConnection}</developerConnection>
        <url>${scm.url}</url>
        <tag>0.18.X</tag>
    </scm>
</project>


text:
import json
import os

import pytest
from woodwork.column_schema import ColumnSchema

from featuretools import describe_feature
from featuretools.feature_base import (
    AggregationFeature,
    DirectFeature,
    GroupByTransformFeature,
    IdentityFeature,
    TransformFeature
)
from featuretools.primitives import (
    Absolute,
    AggregationPrimitive,
    CumMean,
    EqualScalar,
    Mean,
    Mode,
    NMostCommon,
    NumUnique,
    PercentTrue,
    Sum,
    TransformPrimitive
)

def test_identity_description(es):
    feature = IdentityFeature(es['log'].ww['session_id'])
    description = 'The "session_id".'

    assert describe_feature(feature) == description

def test_direct_description(es):
    feature = DirectFeature(IdentityFeature(es['customers'].ww['loves_ice_cream']), 'sessions')
    description = 'The "loves_ice_cream" for the instance of "customers" associated ' \
                  'with this instance of "sessions".'
    assert describe_feature(feature) == description

    deep_direct = DirectFeature(feature, 'log')
    deep_description = 'The "loves_ice_cream" for the instance of "customers" ' \
                       'associated with the instance of "sessions" associated with ' \
                       'this instance of "log".'
    assert describe_feature(deep_direct) == deep_description

    agg = AggregationFeature(IdentityFeature(es['log'].ww['purchased']), 'sessions', PercentTrue)
    complicated_direct = DirectFeature(agg, 'log')
    agg_on_direct = AggregationFeature(complicated_direct, 'products', Mean)

    complicated_description = 'The average of the percentage of true values in ' \
        'the "purchased" of all instances of "log" for each "id" in "sessions" for ' \
        'the instance of "sessions" associated with this instance of "log" of all ' \
        'instances of "log" for each "id" in "products".'
    assert describe_feature(agg_on_direct) == complicated_description

def test_transform_description(es):
    feature = TransformFeature(IdentityFeature(es['log'].ww['value']), Absolute)
    description = 'The absolute value of the "value".'
    assert describe_feature(feature) == description

def test_groupby_transform_description(es):
    feature = GroupByTransformFeature(IdentityFeature(es['log'].ww['value']), CumMean, IdentityFeature(es['log'].ww['session_id']))
    description = 'The cumulative mean of the "value" for each "session_id".'

    assert describe_feature(feature) == description

def test_aggregation_description(es):
    feature = AggregationFeature(IdentityFeature(es['log'].ww['value']), 'sessions', Mean)
    description = 'The average of the "value" of all instances of "log" for each "id" in "sessions".'
    assert describe_feature(feature) == description

    stacked_agg = AggregationFeature(feature, 'customers', Sum)
    stacked_description = 'The sum of t{} of all instances of "sessions" for each "id" ' \
                          'in "customers".'.format(description[1:-1])
    assert describe_feature(stacked_agg) == stacked_description

def test_aggregation_description_where(es):
    where_feature = TransformFeature(IdentityFeature(es['log'].ww['countrycode']), EqualScalar('US'))
    feature = AggregationFeature(IdentityFeature(es['log'].ww['value']), 'sessions',
                                 Mean, where=where_feature)
    description = 'The average of the "value" of all instances of "log" where the ' \
                  '"countrycode" is US for each "id" in "sessions".'

    assert describe_feature(feature) == description

def test_aggregation_description_use_previous(es):
    feature = AggregationFeature(IdentityFeature(es['log'].ww['value']), 'sessions',
                                 Mean, use_previous='5d')
    description = 'The average of the "value" of the previous 5 days of "log" for each "id" in "sessions".'

    assert describe_feature(feature) == description

def test_multioutput_description(es):
    n_most_common = NMostCommon(2)
    n_most_common_feature = AggregationFeature(IdentityFeature(es['log'].ww['zipcode']), 'sessions', n_most_common)
    first_most_common_slice = n_most_common_feature[0]
    second_most_common_slice = n_most_common_feature[1]

    n_most_common_base = 'The 2 most common values of the "zipcode" of all instances of "log" for each "id" in "sessions".'
    n_most_common_first = 'The most common value of the "zipcode" of all instances of "log" ' \
                          'for each "id" in "sessions".'
    n_most_common_second = 'The 2nd most common value of the "zipcode" of all instances of ' \
                           '"log" for each "id" in "sessions".'

    assert describe_feature(n_most_common_feature) == n_most_common_base
    assert describe_feature(first_most_common_slice) == n_most_common_first
    assert describe_feature(second_most_common_slice) == n_most_common_second

    class CustomMultiOutput(TransformPrimitive):
        name = "custom_multioutput"
        input_types = [ColumnSchema(semantic_tags={'category'})]
        return_type = ColumnSchema(semantic_tags={'category'})

        number_output_features = 4

    custom_feat = TransformFeature(IdentityFeature(es['log'].ww['zipcode']), CustomMultiOutput)

    generic_base = 'The result of applying CUSTOM_MULTIOUTPUT to the "zipcode".'
    generic_first = 'The 1st output from applying CUSTOM_MULTIOUTPUT to the "zipcode".'
    generic_second = 'The 2nd output from applying CUSTOM_MULTIOUTPUT to the "zipcode".'

    assert describe_feature(custom_feat) == generic_base
    assert describe_feature(custom_feat[0]) == generic_first
    assert describe_feature(custom_feat[1]) == generic_second

    CustomMultiOutput.description_template = ['the multioutput of {}',
                                              'the {nth_slice} multioutput part of {}']
    template_base = 'The multioutput of the "zipcode".'
    template_first_slice = 'The 1st multioutput part of the "zipcode".'
    template_second_slice = 'The 2nd multioutput part of the "zipcode".'
    template_third_slice = 'The 3rd multioutput part of the "zipcode".'
    template_fourth_slice = 'The 4th multioutput part of the "zipcode".'
    assert describe_feature(custom_feat) == template_base
    assert describe_feature(custom_feat[0]) == template_first_slice
    assert describe_feature(custom_feat[1]) == template_second_slice
    assert describe_feature(custom_feat[2]) == template_third_slice
    assert describe_feature(custom_feat[3]) == template_fourth_slice

    CustomMultiOutput.description_template = ['the multioutput of {}',
                                              'the primary multioutput part of {}',
                                              'the secondary multioutput part of {}']
    custom_base = 'The multioutput of the "zipcode".'
    custom_first_slice = 'The primary multioutput part of the "zipcode".'
    custom_second_slice = 'The secondary multioutput part of the "zipcode".'
    bad_slice_error = 'Slice out of range of template'
    assert describe_feature(custom_feat) == custom_base
    assert describe_feature(custom_feat[0]) == custom_first_slice
    assert describe_feature(custom_feat[1]) == custom_second_slice
    with pytest.raises(IndexError, match=bad_slice_error):
        describe_feature(custom_feat[2])

def test_generic_description(es):
    class NoName(TransformPrimitive):
        input_types = [ColumnSchema(semantic_tags={'category'})]
        output_type = ColumnSchema(semantic_tags={'category'})

        def generate_name(self, base_feature_names):
            return u"%s(%s%s)" % (
                'NO_NAME',
                u", ".join(base_feature_names),
                self.get_args_string(),
            )

    class CustomAgg(AggregationPrimitive):
        name = 'custom_aggregation'
        input_types = [ColumnSchema(semantic_tags={'category'})]
        output_type = ColumnSchema(semantic_tags={'category'})

    class CustomTrans(TransformPrimitive):
        name = 'custom_transform'
        input_types = [ColumnSchema(semantic_tags={'category'})]
        output_type = ColumnSchema(semantic_tags={'category'})

    no_name = TransformFeature(IdentityFeature(es['log'].ww['zipcode']), NoName)
    no_name_description = 'The result of applying NoName to the "zipcode".'
    assert describe_feature(no_name) == no_name_description

    custom_agg = AggregationFeature(IdentityFeature(es['log'].ww['zipcode']), 'customers', CustomAgg)
    custom_agg_description = 'The result of applying CUSTOM_AGGREGATION to the "zipcode" of all instances of "log" for each "id" in "customers".'
    assert describe_feature(custom_agg) == custom_agg_description

    custom_trans = TransformFeature(IdentityFeature(es['log'].ww['zipcode']), CustomTrans)
    custom_trans_description = 'The result of applying CUSTOM_TRANSFORM to the "zipcode".'
    assert describe_feature(custom_trans) == custom_trans_description

def test_column_description(es):
    column_description = 'the name of the device used for each session'
    es['sessions'].ww.columns['device_name'].description = column_description
    identity_feat = IdentityFeature(es['sessions'].ww['device_name'])
    assert describe_feature(identity_feat) == column_description[0].upper() + column_description[1:] + '.'

def test_metadata(es, tmpdir):
    identity_feature_descriptions = {'sessions: device_name': 'the name of the device used for each session',
                                     'customers: id': "the customer's id"}
    agg_feat = AggregationFeature(IdentityFeature(es['sessions'].ww['device_name']), 'customers', NumUnique)
    agg_description = 'The number of unique elements in the name of the device used for each '\
                      'session of all instances of "sessions" for each customer\'s id.'
    assert describe_feature(agg_feat, feature_descriptions=identity_feature_descriptions) == agg_description

    transform_feat = GroupByTransformFeature(IdentityFeature(es['log'].ww['value']), CumMean, IdentityFeature(es['log'].ww['session_id']))
    transform_description = 'The running average of the "value" for each "session_id".'
    primitive_templates = {"cum_mean": "the running average of {}"}
    assert describe_feature(transform_feat, primitive_templates=primitive_templates) == transform_description

    custom_agg = AggregationFeature(IdentityFeature(es['log'].ww['zipcode']), 'sessions', Mode)
    auto_description = 'The most frequently occurring value of the "zipcode" of all instances of "log" for each "id" in "sessions".'
    custom_agg_description = "the most frequently used zipcode"
    custom_feature_description = custom_agg_description[0].upper() + custom_agg_description[1:] + '.'
    feature_description_dict = {'sessions: MODE(log.zipcode)': custom_agg_description}
    assert describe_feature(custom_agg) == auto_description
    assert describe_feature(custom_agg, feature_descriptions=feature_description_dict) == custom_feature_description

    metadata = {
        'feature_descriptions': {**identity_feature_descriptions, **feature_description_dict},
        'primitive_templates': primitive_templates
    }
    metadata_path = os.path.join(tmpdir, 'description_metadata.json')
    with open(metadata_path, 'w') as f:
        json.dump(metadata, f)
    assert describe_feature(agg_feat, metadata_file=metadata_path) == agg_description
    assert describe_feature(transform_feat, metadata_file=metadata_path) == transform_description
    assert describe_feature(custom_agg, metadata_file=metadata_path) == custom_feature_description

redpajama_set_name: RedPajamaGithub


text:
static_assert(sizeof(Daemons::Daemon) ==
    sizeof(Daemons::Daemon::type) +
    sizeof(Daemons::Daemon::func),
    "Daemons::Daemon size has changed");
template<>
void Disk::save<Daemons::Daemon>(tag_type tag, Daemons::Daemon const& element, std::ofstream& data) {
  save_tag(tag, data);

  data.write(reinterpret_cast<char const*>(&element.type), sizeof(element.type));
  data.write(reinterpret_cast<char const*>(&element.func), sizeof(element.func));
}
template<>
bool Disk::load<Daemons::Daemon>(tag_type tag, Daemons::Daemon& element, std::ifstream& data) {
  if (!load_tag(tag, data)) { return false; }

  data.read(reinterpret_cast<char*>(&element.type), sizeof(element.type));
  data.read(reinterpret_cast<char*>(&element.func), sizeof(element.func));
  return true;
}

//Daemons::Fuse
static_assert(sizeof(Daemons::Fuse) ==
    sizeof(Daemons::Fuse::type) +
    sizeof(Daemons::Fuse::func) +
    sizeof(Daemons::Fuse::func),
    "Daemons::Func size has changed");
template<>
void Disk::save<Daemons::Fuse>(tag_type tag, Daemons::Fuse const& element, std::ofstream& data) {
  save_tag(tag, data);

  data.write(reinterpret_cast<char const*>(&element.type), sizeof(element.type));
  data.write(reinterpret_cast<char const*>(&element.func), sizeof(element.func));
  data.write(reinterpret_cast<char const*>(&element.time), sizeof(element.time));
}
template<>
bool Disk::load<Daemons::Fuse>(tag_type tag, Daemons::Fuse& element, std::ifstream& data) {
  if (!load_tag(tag, data)) { return false; }

  data.read(reinterpret_cast<char*>(&element.type), sizeof(element.type));
  data.read(reinterpret_cast<char*>(&element.func), sizeof(element.func));
  data.read(reinterpret_cast<char*>(&element.time), sizeof(element.time));
  return true;
}

// Coordinate
static_assert(sizeof(Coordinate) ==
    sizeof(Coordinate::x) +
    sizeof(Coordinate::y),
    "Coordinate size has changed");
template <>
void Disk::save<Coordinate>(tag_type tag, Coordinate const& element, std::ofstream& data) {
  save_tag(tag, data);
  data.write(reinterpret_cast<char const*>(&element.x), sizeof(element.x));
  data.write(reinterpret_cast<char const*>(&element.y), sizeof(element.y));
}
template <>
bool Disk::load<Coordinate>(tag_type tag, Coordinate& element, std::ifstream& data) {
  if (!load_tag(tag, data)) { return false; }
  data.read(reinterpret_cast<char*>(&element.x), sizeof(element.x));
  data.read(reinterpret_cast<char*>(&element.y), sizeof(element.y));
  return true;
}

// damage
static_assert(sizeof(damage) ==
    sizeof(damage::sides) +
    sizeof(damage::dices),
    "damage size has changed");
template <>
void Disk::save<damage>(tag_type tag, damage const& element, std::ofstream& data) {
  save_tag(tag, data);
  data.write(reinterpret_cast<char const*>(&element.sides), sizeof(element.sides));
  data.write(reinterpret_cast<char const*>(&element.dices), sizeof(element.dices));
}
template <>
bool Disk::load<damage>(tag_type tag, damage& element, std::ifstream& data) {
  if (!load_tag(tag, data)) { return false; }
  data.read(reinterpret_cast<char*>(&element.sides), sizeof(element.sides));
  data.read(reinterpret_cast<char*>(&element.dices), sizeof(element.dices));
  return true;
}


text:
"""Provides utility functions used by sofine.
"""

import sys
import os
import imp
import sofine.lib.utils.conf as conf
import sofine.plugins.http_plugin_proxy as http_plugin_proxy

def _load_plugin_module(module_name):
    module = None
    module_file = None
    try:
        module_file, module_path, desc = imp.find_module(module_name)
        module = imp.load_source(module_name, module_path, module_file)
    except:
        pass
    finally:
        if module_file:
            module_file.close()

    return module

def _load_plugin_http(plugin_name, plugin_group):
    ret = http_plugin_proxy.HttpPluginProxy()
    ret.set_plugin_url(plugin_name, plugin_group)
    return ret

def load_plugin_module(plugin_name, plugin_group=None):
    """
* `module_name` - `string`. The name of the plugin to load
* `plugin_group` - `string`. The name of the plugin directory of the plugin to load

Loads a plugin from either the sofine default plugin directory or the plugin directory
configured by the user in the `plugin_path` key of the `sofine.conf` file in the
sofine project root. Loading first looks in the `plugin_path` and then in the sofine
default plugin directory.

A plugin named `plugin_name` found in the plugin directory `plugin_group` is loaded.

Returns an instance of the plugin module, not the plugin itself. This allows clients
to declare module scope variables in plugins and use this method (wrapped in
`runner`) to get an instance of the module to access the variables.
"""
    # conf only loads the base path, without plugin_group subdirectory
    # So always dynamically load the full plugin plath into sys.path
    #  if the call included a plugin_group, otherwise the call to load
    #  the plugin will fail
    base_plugin_path = conf.PLUGIN_BASE_PATH
    if plugin_group:
        base_plugin_path += ('/' + plugin_group)
    sys.path.insert(0, base_plugin_path)
    if conf.CUSTOM_PLUGIN_BASE_PATH:
        custom_plugin_base_path = conf.CUSTOM_PLUGIN_BASE_PATH
        if plugin_group:
            custom_plugin_base_path += ('/' + plugin_group)
        sys.path.insert(0, custom_plugin_base_path)

    ret = _load_plugin_module(plugin_name)

    # Didn't find plugin as a Python module so try to find HTTP plugin
    if not ret:
        ret = _load_plugin_http(plugin_name, plugin_group)

    return ret

def load_plugin(plugin_name, plugin_group):
    """
* `plugin_name` - `string`. The name of the plugin to load
* `plugin_group` - `string`. The name of the plugin directory of the plugin to load

Loads a plugin from either the sofine default plugin directory or the plugin directory
configured by the user in the `plugin_path` key of the `sofine.conf` file in the
sofine project root. Loading first looks in the `plugin_path` and then in the sofine
default plugin directory.

A plugin named `plugin_name` found in the plugin directory `plugin_group` is loaded.
Note that here "loaded" means a reference to a new instance of an object of the plugin
class type is returned.
"""
    # Each module is responsible for setting a variable named 'plugin' at
    #  module scope, set to the name of the module's plugin class.
    #  Also, plugins must only have a no-arg constructor.  Thus
    #  this call constructs and returns an instance of the plugin at this
    #  module_name and plugin_group.
    return load_plugin_module(plugin_name, plugin_group).plugin()

def has_stdin():
    return not sys.stdin.isatty()

def namespacer(plugin_group, plugin, name):
    """
* `plugin_group` - `string`. The name of the plugin directory
* `plugin` - `string`. The name of the plugin
* `name` - `string`. An attribute key name

A helper to enforce DRY. Used in the two places that namespace attribute keys which are
appended to the attributes associated with the keys in the data set built by a sofine call.
"""
    return plugin_group + '::' + plugin + '::' + name

def get_attr_keys(data):
    """Slice all the attribute lists, which are lists of single key/value dicts mapped to the keys
in a sofine data set, to return the key from each dict in each list.
* `data` - `dict of string -> list of dict`. The data type of the attributes associated with a key in a
returned data set."""
    out = []
    attrs_rows = data.values()
    for attrs_row in attrs_rows:
        for attr in attrs_row:
            out.append(attr.keys()[0])
    return out

def get_attr_values(data):
    """Slice all the attribute lists, which are lists of single key/value dicts mapped to the keys
in a sofine data set, to return the value from each dict in each list.
* `data` - `dict of string -> list of dict`. The data type of the attributes associated with a key in a
returned data set."""
    out = []
    attrs_rows = data.values()
    for attrs_row in attrs_rows:
        for attr in attrs_row:
            out.append(attr.values()[0])
    return out


text:
describe EGPRates::UBE do
  subject(:bank) { described_class.new }

  it 'Live Testing', :live do
    expect(bank.exchange_rates).to include(:buy, :sell)
    expect(bank.exchange_rates[:buy].size).to eq 6
    expect(bank.exchange_rates[:sell].size).to eq 6
  end

  describe '.new' do
    it 'initialize instance variables' do
      expect(bank.sym).to eq :UBE
      expect(bank.instance_variable_get(:@uri)).to be_a URI
    end
  end

  describe '#exchange_rates' do
    it 'calls #parse with #raw_exchange_rates' do
      expect(bank).to receive(:raw_exchange_rates)
      expect(bank).to receive(:parse)
      bank.exchange_rates
    end
  end

  describe '#raw_exchange_rates' do
    it 'raises ResponseError unless Net::HTTPSuccess', :no_vcr do
      stub_request(:get, /.*theubeg.*/).to_return(body: '', status: 500)
      expect { bank.send(:raw_exchange_rates) }.to raise_error\
        EGPRates::ResponseError, '500'
    end

    it 'raises ResponseError if HTML structure changed', :no_vcr do
      stub_request(:get, /.*theubeg.*/).to_return(body: '', status: 200)
      expect { bank.send(:raw_exchange_rates) }.to raise_error\
        EGPRates::ResponseError, 'Unknown HTML'
    end

    it 'returns <#Enumerator::Lazy> of 6 rows', vcr: { cassette_name: :UBE } do
      lazy_enumerator = bank.send(:raw_exchange_rates)
      expect(lazy_enumerator).to be_a Enumerator::Lazy
      expect(lazy_enumerator.size).to eq 6
    end
  end

  describe '#parse', vcr: { cassette_name: :UBE } do
    let(:raw_data) { bank.send(:raw_exchange_rates) }

    it 'returns sell: hash of selling prices' do
      expect(bank.send(:parse, raw_data)[:sell]).to match(
        AED: 4.8734,
        EUR: 19.1333,
        GBP: 22.7992,
        KWD: 58.7174,
        SAR: 4.7731,
        USD: 17.9
      )
    end

    it 'returns buy: hash of buying prices' do
      expect(bank.send(:parse, raw_data)[:buy]).to match(
        AED: 4.8191,
        EUR: 18.808,
        GBP: 22.2507,
        KWD: 58.0804,
        SAR: 4.695,
        USD: 17.7
      )
    end
  end
end


text:
/*
 *
 * ====================================================================
 * 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.
 *  ====================================================================
 */

/*
 * Changes to the original project are Copyright 2019, Oath Inc..
 */

package dev.amp.validator;

import org.testng.Assert;
import org.testng.annotations.Test;

import java.util.List;

/**
 * Tests for {@link TagSpecDispatch}
 *
 * @author sphatak01
 */
public class TagSpecDispatchTest {

    @Test
    public void testRegisterDispatchKeyAndTagSpec() {
        final TagSpecDispatch tagSpecDispatch = new TagSpecDispatch();

        final String dispatchKey1 = "dk1";

        final int tagSpecId1 = 10;
        final int tagSpecId2 = 9;
        tagSpecDispatch.registerDispatchKey(dispatchKey1, tagSpecId1);
        tagSpecDispatch.registerDispatchKey(dispatchKey1, tagSpecId2);

        tagSpecDispatch.registerTagSpec(tagSpecId1);
        tagSpecDispatch.registerTagSpec(tagSpecId2);

        Assert.assertFalse(tagSpecDispatch.empty());
        Assert.assertTrue(tagSpecDispatch.hasDispatchKeys());
        Assert.assertTrue(tagSpecDispatch.hasTagSpecs());
        Assert.assertEquals(tagSpecDispatch.allTagSpecs().size(), 2);
        Assert.assertEquals(tagSpecDispatch.allTagSpecs().get(0), new Integer(10));
        Assert.assertEquals(tagSpecDispatch.allTagSpecs().get(1), new Integer(9));
    }

    @Test
    public void testMatchingDispatchKeyEmpty() {
        final TagSpecDispatch tagSpecDispatch = new TagSpecDispatch();

        Assert.assertTrue(tagSpecDispatch.matchingDispatchKey("attr1", "value1", "manPar1").isEmpty());
    }

    @Test
    public void testMatchingNameValueDispatchKey() {
        final String attrName = "content";
        final String attrValue = "val1";

        final TagSpecDispatch tagSpecDispatch = new TagSpecDispatch();
        tagSpecDispatch.registerDispatchKey(attrName + "\0" + attrValue, 10);
        tagSpecDispatch.registerDispatchKey(attrName + "\0" + attrValue + "\0" + "true", 11);

        final List<Integer> matchingKeys = tagSpecDispatch.matchingDispatchKey("content", "val1", "HEAD");

        Assert.assertEquals(matchingKeys.size(), 2);
        Assert.assertEquals(matchingKeys.get(0).intValue(), 11);
        Assert.assertEquals(matchingKeys.get(1).intValue(), 10);

    }

    @Test
    public void testMatchingNameDispatchKey() {
        final String attrName = "content";

        final TagSpecDispatch tagSpecDispatch = new TagSpecDispatch();
        tagSpecDispatch.registerDispatchKey(attrName, 10);

        final List<Integer> matchingKeys = tagSpecDispatch.matchingDispatchKey("content", "val1", "HEAD");

        Assert.assertEquals(matchingKeys.size(), 1);
        Assert.assertEquals(matchingKeys.get(0).intValue(), 10);

    }

    @Test
    public void testMatchingDispatchKeySameNameAndValue() {
        final String attrName = "foo";

        final TagSpecDispatch tagSpecDispatch = new TagSpecDispatch();
        tagSpecDispatch.registerDispatchKey(attrName, 10);

        final List<Integer> matchingKeys = tagSpecDispatch.matchingDispatchKey("foo", "foo", "HEAD");

        Assert.assertEquals(matchingKeys.size(), 2);
        Assert.assertEquals(matchingKeys.get(0).intValue(), 10);
        Assert.assertEquals(matchingKeys.get(1).intValue(), 10);
    }
}


text:
import {SubtitleSettingSelectBox} from './subtitlesettingselectbox';
import {UIInstanceManager} from '../../uimanager';

/**
 * A select box providing a selection of different font colors.
 */
export class FontColorSelectBox extends SubtitleSettingSelectBox {

  configure(player: bitmovin.PlayerAPI, uimanager: UIInstanceManager): void {
    super.configure(player, uimanager);

    this.addItem(null, 'default');
    this.addItem('white', 'white');
    this.addItem('black', 'black');
    this.addItem('red', 'red');
    this.addItem('green', 'green');
    this.addItem('blue', 'blue');
    this.addItem('cyan', 'cyan');
    this.addItem('yellow', 'yellow');
    this.addItem('magenta', 'magenta');

    let setColorAndOpacity = () => {
      if (this.settingsManager.fontColor.isSet() && this.settingsManager.fontOpacity.isSet()) {
        this.toggleOverlayClass(
          'fontcolor-' + this.settingsManager.fontColor.value + this.settingsManager.fontOpacity.value);
      } else {
        this.toggleOverlayClass(null);
      }
    };

    this.onItemSelected.subscribe((sender, key: string) => {
      this.settingsManager.fontColor.value = key;
    });

    this.settingsManager.fontColor.onChanged.subscribe((sender, property) => {
      // Color and opacity go together, so we need to...
      if (!this.settingsManager.fontColor.isSet()) {
        // ... clear the opacity when the color is not set
        this.settingsManager.fontOpacity.clear();
      } else if (!this.settingsManager.fontOpacity.isSet()) {
        // ... set an opacity when the color is set
        this.settingsManager.fontOpacity.value = '100';
      }
      this.selectItem(property.value);
      setColorAndOpacity();
    });

    this.settingsManager.fontOpacity.onChanged.subscribe(() => {
      setColorAndOpacity();
    });

    // Load initial value
    if (this.settingsManager.fontColor.isSet()) {
      this.selectItem(this.settingsManager.fontColor.value);
    }
  }
}


text:
'use strict';

app.controller('indexController', function($scope, firebaseAPI, $firebaseObject) {
    var forms = new Firebase(firebaseAPI.baseUrl + "/forms");

    $scope.forms = $firebaseObject(forms);

})