Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?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>
    <parent>
        <groupId>org.iq80.leveldb</groupId>
        <artifactId>leveldb-project</artifactId>
        <version>0.5</version>
    </parent>

    <groupId>org.iq80.leveldb</groupId>
    <artifactId>leveldb</artifactId>
    <version>0.5</version>
    <packaging>jar</packaging>

    <name>${project.artifactId}</name>
    <description>Port of LevelDB to Java</description>

    <repositories>
        <repository>
            <id>fusesource.nexus.snapshot</id>
            <name>FuseSource Community Snapshot Repository</name>
            <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
        </repository>
    </repositories>

    <dependencies>

        <dependency>
            <groupId>org.iq80.leveldb</groupId>
            <artifactId>leveldb-api</artifactId>
            <version>0.5</version>
        </dependency>

        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
            <version>1.0.3</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.iq80.snappy</groupId>
            <artifactId>snappy</artifactId>
            <version>0.2</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>12.0</version>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>1.6.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.0.1</version>
            <scope>test</scope>
        </dependency>

        <!-- to verify file format compatibility with the native leveldb impl -->
        <dependency>
            <groupId>org.fusesource.leveldbjni</groupId>
            <artifactId>leveldbjni-all</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
    <build>
        <plugins>
            <!-- Generate a test jar for the test cases in this module -->
            <plugin>
              <artifactId>maven-jar-plugin</artifactId>
              <executions>
                <execution>
                  <goals>
                    <goal>test-jar</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <shadedArtifactAttached>true</shadedArtifactAttached>
                    <shadedClassifierName>uber</shadedClassifierName>
                    <relocations>
                        <relocation>
                            <pattern>com.google.common</pattern>
                            <shadedPattern>org.iq80.leveldb.shaded.guava</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
            </plugin>
            <plugin>
              <groupId>com.github.wvengen</groupId>
              <artifactId>proguard-maven-plugin</artifactId>
              <version>2.0.5</version>
              <executions>
                <execution>
                  <phase>package</phase>
                  <goals>
                    <goal>proguard</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <proguardVersion>4.8</proguardVersion>
                <injar>${project.build.finalName}.jar</injar>
                <outjar>${project.build.finalName}-slim.jar</outjar>          
                <attach>true</attach>
                <attachArtifactClassifier>min</attachArtifactClassifier>
                <libs>
                  <lib>${rt.jar.path}</lib>
                  <lib>${jsse.jar.path}</lib>
                </libs>
                <assembly>
                  <inclusions>
                    <inclusion>
                      <groupId>org.iq80.leveldb</groupId>
                      <artifactId>leveldb-api</artifactId>
                    </inclusion>
                    <inclusion>
                      <groupId>org.iq80.snappy</groupId>
                      <artifactId>snappy</artifactId>
                    </inclusion> 
                    <inclusion>
                      <groupId>com.google.guava</groupId>
                      <artifactId>guava</artifactId>
                    </inclusion> 
                  </inclusions>
                </assembly>
                 
                <obfuscate>false</obfuscate>
                <options>
                  <option>-keep class org.iq80.leveldb.*{*;}</option>
                  <option>-keep class org.iq80.leveldb.impl.*{*;}</option>
                  <option>-keep class org.iq80.leveldb.util.*{*;}</option>

                  <option>-keep class com.google.common.collect.ImmutableList{*;}</option>
                  <option>-keep class com.google.common.base.Preconditions{*;}</option>

                  <option>-keep class org.iq80.snappy.*{*;}</option>
                  <!-- <option>-keep class org.xerial.snappy.Snappy{*;}</option> -->
                  <option>-dontwarn com.google.common.collect.MinMaxPriorityQueue</option>
                  <option>-dontwarn org.xerial.snappy.SnappyLoader</option>
                  <option>-dontwarn org.xerial.snappy.SnappyBundleActivator</option>
                  <option>-dontwarn org.iq80.snappy.HadoopSnappyCodec**</option>
                  <option>-dontoptimize</option>
                </options>
              </configuration>
              <dependencies>
                <dependency>
                  <groupId>net.sf.proguard</groupId>
                  <artifactId>proguard-base</artifactId>
                  <version>4.8</version>
                  <scope>runtime</scope>
                </dependency>
              </dependencies>        
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <excludes>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    
    <profiles>
      <profile>
        <id>lib/rt.jar</id>
        <activation><file><exists>${java.home}/lib/rt.jar</exists></file></activation>
        <properties>
          <rt.jar.path>${java.home}/lib/rt.jar</rt.jar.path>
          <jsse.jar.path>${java.home}/lib/jsse.jar</jsse.jar.path>
        </properties>
      </profile>
      <profile>
        <id>Classes/classes.jar</id>
        <activation><file><exists>${java.home}/../Classes/classes.jar</exists></file></activation>
        <properties>
          <rt.jar.path>${java.home}/../Classes/classes.jar</rt.jar.path>
          <jsse.jar.path>${java.home}/../Classes/jsse.jar</jsse.jar.path>
        </properties>
      </profile>
      <profile>
        <id>jre/lib/rt.jar</id>
        <activation><file><exists>${java.home}/jre/lib/rt.jar</exists></file></activation>
        <properties>
          <rt.jar.path>${java.home}/jre/lib/rt.jar</rt.jar.path>
          <jsse.jar.path>${java.home}/jre/lib/jsse.jar</jsse.jar.path>
        </properties>
      </profile>
    </profiles>
      
</project>
New to GrepCode? Check out our FAQ X