<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.luxdb</groupId>
  <artifactId>lux</artifactId>
  <version>1.0.1</version>
  <packaging>jar</packaging>
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <name>Lux library</name>
  <description>Lux XML search engine</description>
  <url>http://luxdb.org/</url>
  <licenses>
    <license>
      <name>Mozilla Public License Version 2.0</name>
      <url>http://www.mozilla.org/MPL/2.0/</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>git@github.com:msokolov/lux.git</url>
    <connection>scm:git@github.com:msokolov/lux.git</connection>
    <developerConnection>scm:git:https://github.com/msokolov/lux</developerConnection>
  </scm>
  <developers>
    <developer>
      <id>msokolov</id>
      <name>Michael Sokolov</name>
      <email>sokolov@falutin.net</email>
    </developer>
  </developers>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>
  <dependencies>
    <dependency>
        <groupId>net.sf.saxon</groupId>
        <artifactId>Saxon-HE</artifactId>
        <version>9.5.1-3</version>
        <exclusions>
        	<exclusion>
        		<artifactId>xom</artifactId>
        		<groupId>xom</groupId>
        	</exclusion>
        	<exclusion>
        		<artifactId>jdom</artifactId>
        		<groupId>org.jdom</groupId>
        	</exclusion>
        	<exclusion>
        		<artifactId>dom4j</artifactId>
        		<groupId>dom4j</groupId>
        	</exclusion>
        </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.6.2</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.16</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>woodstox-core-asl</artifactId>
      <version>4.1.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-test-framework</artifactId>
      <version>4.6.0</version>
      <scope>test</scope>
    </dependency>
  	<dependency>
  		<groupId>org.apache.solr</groupId>
  		<artifactId>solr-core</artifactId>
  		<version>4.6.0</version>
  		<exclusions>
  			<exclusion>
  				<artifactId>wstx-asl</artifactId>
  				<groupId>org.codehaus.woodstox</groupId>
  			</exclusion>
  			<exclusion>
  				<artifactId>slf4j-jdk14</artifactId>
  				<groupId>org.slf4j</groupId>
  			</exclusion>
  			<exclusion>
  				<artifactId>velocity-tools</artifactId>
  				<groupId>org.apache.velocity</groupId>
  			</exclusion>
  			<exclusion>
  				<artifactId>hadoop-annotations</artifactId>
  				<groupId>org.apache.hadoop</groupId>
  			</exclusion>
  		</exclusions>
  	</dependency>
  	<dependency>
	  <groupId>javax.servlet</groupId>
	  <artifactId>servlet-api</artifactId>
	  <version>2.5</version>
	  <scope>provided</scope>
  	</dependency>
  	<dependency>
  		<groupId>junit</groupId>
  		<artifactId>junit</artifactId>
  		<version>4.10</version>
  		<scope>test</scope>
  	</dependency>
  	<dependency>
  		<groupId>httpunit</groupId>
  		<artifactId>httpunit</artifactId>
  		<version>1.6.1</version>
  		<scope>test</scope>
  		<exclusions>
  		  <exclusion>
  		    <artifactId>xercesImpl</artifactId>
  		    <groupId>xerces</groupId>
  		  </exclusion>
  		</exclusions>
  	</dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.9.1</version>
    </dependency>
    <dependency>
      <groupId>nu.validator.htmlparser</groupId>
      <artifactId>htmlparser</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.1</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <excludes>
            <exclude>**/log4j.properties</exclude>
          </excludes>
        </configuration>
      </plugin>
     <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>cobertura-maven-plugin</artifactId>
      <version>2.5.1</version>
      <configuration>
        <check>
            <lineRate>90</lineRate>
        </check>
        <instrumentation>
            <excludes>
              <exclude>lux/xqts/**/*.class</exclude>
              <exclude>lux/xml/EventToStaxBridge*.class</exclude>
              <exclude>lux/solr/TermOrdValComparator*.class</exclude>
              <exclude>lux/compiler/EXPathSupport.class</exclude>
            </excludes>
          </instrumentation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <argLine>-Xms2048m -Xmx2048m</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.14.1</version>
        <configuration>
          <failIfNoTests>true</failIfNoTests>
        </configuration>
        <executions>
          <execution>
            <id>failsafe-integration-tests</id>
            <phase>integration-test</phase>
            <goals>
              <goal>integration-test</goal>
            </goals>
          </execution>
          <execution>
            <id>failsafe-verify</id>
            <phase>verify</phase>
            <goals>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.1.8.v20121106</version>
        <configuration>
          <!--  <scanIntervalSeconds>10</scanIntervalSeconds> -->
          <stopPort>8000</stopPort>
          <stopKey>STOP</stopKey>
          <!--
              <contextPath>/</contextPath>
          <webDefaultXml>src/test/resources/webdefault.xml</webDefaultXml>
          <webXml>src/test/webapp/WEB-INF/web.xml</webXml>
          <jettyConfig>src/test/resources/jetty.xml</jettyConfig>
          <webAppSourceDirectory>src/test/webapp</webAppSourceDirectory>
          <systemProperties>
            <systemProperty>
              <name>org.expath.pkg.saxon.repo</name>
              <value>${basedir}/xrepo</value>
            </systemProperty>
          </systemProperties>
          -->
        </configuration>
        <executions>
          <execution>
            <id>start-jetty</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>start</goal>
            </goals>
            <configuration>
              <scanIntervalSeconds>0</scanIntervalSeconds>
              <daemon>true</daemon>
            </configuration>
          </execution>
          <execution>
            <id>stop-jetty</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>stop</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
            <type>jar</type>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <descriptors>
            <descriptor>assembly-bin.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <artifactItems>
            <artifactItem>
              <groupId>org.codehaus.woodstox</groupId>
              <artifactId>woodstox-core-asl</artifactId>
              <version>4.1.1</version>
            </artifactItem>
            <artifactItem>
              <groupId>org.apache.lucene</groupId>
              <artifactId>lucene-queryparser</artifactId>
              <version>4.2.1</version>
            </artifactItem>
            <artifactItem>
              <groupId>net.sf.saxon</groupId>
              <artifactId>Saxon-HE</artifactId>
              <version>9.4.0.7</version>
            </artifactItem>
            <artifactItem>
              <groupId>xerces</groupId>
              <artifactId>xercesImpl</artifactId>
              <version>2.9.1</version>
            </artifactItem>
          </artifactItems>
          <excludeTransitive>true</excludeTransitive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <id>maven-deploy</id>

      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin> 
            <groupId>org.apache.maven.plugins</groupId> 
            <artifactId>maven-release-plugin</artifactId> 
            <version>2.4.1</version> 
            <configuration> 
              <mavenExecutorId>forked-path</mavenExecutorId> 
            </configuration> 
          </plugin> 
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
