maven natives-

Issue #51 new
Former user created an issue

Originally reported on Google Code with ID 51

hello

maven has very useful plugin which allow you to automatically download and expand natives
to the build folder.

having it in a project by default allows you forget about natives at all and use only
java.

http://code.google.com/p/mavennatives/

this plugin works only if you have classifier starts with natives- prefix

another thing is to add profiles to the main pom. if you do so. natives will automaticaly
been attached to the main sql4java natives.

    <profiles>
      <profile>
        <id>win-32</id>
        <activation>
          <os>
            <family>Windows</family>
            <arch>x86</arch>
          </os>
        </activation>
        <dependencies>
          <dependency>
            <groupId>com.almworks.sqlite4java</groupId>
            <artifactId>sqlite4java-win32-x86</artifactId>
            <version>0.282</version>
            <type>dll</type>
          </dependency>
        </dependencies>
      </profile>
      <profile>
        <id>linux-64</id>
        <activation>
          <os>
            <family>Linux</family>
            <arch>amd64</arch>
          </os>
        </activation>
        <dependencies>
          <dependency>
            <groupId>com.almworks.sqlite4java</groupId>
            <artifactId>libsqlite4java-linux-amd64</artifactId>
            <version>0.282</version>
            <type>so</type>
          </dependency>
        </dependencies>
      </profile>
      <profile>
        <id>linux-32</id>
        <activation>
          <os>
            <family>Linux</family>
            <arch>i386</arch>
          </os>
        </activation>
        <dependencies>
          <dependency>
            <groupId>com.almworks.sqlite4java</groupId>
            <artifactId>libsqlite4java-linux-i386</artifactId>
            <version>0.282</version>
            <type>so</type>
          </dependency>
        </dependencies>
      </profile>
      <profile>
        <id>mac-64</id>
        <activation>
          <os>
            <name>mac os x</name>
            <arch>x86_64</arch>
          </os>
        </activation>
        <dependencies>
          <dependency>
            <groupId>com.almworks.sqlite4java</groupId>
            <artifactId>libsqlite4java-osx</artifactId>
            <version>0.282</version>
            <type>jnilib</type>
          </dependency>
        </dependencies>
      </profile>
    </profiles>

Reported by kuznetsov.alexey on 2012-12-29 15:50:42

Comments (3)

  1. Former user Account Deleted
    i've made a project which release the idea
    
    https://github.com/axet/sqlite4java
    
    i woud appreciate if you merge my changes to the mainline
    

    Reported by kuznetsov.alexey on 2012-12-30 14:15:12

  2. Igor Sereda
    Alexey, thanks for the pointers and contribution. I will review it when I work on the
    next version of sqlite4java.
    

    Reported by sereda on 2013-01-03 16:21:19 - Status changed: Accepted - Labels added: Type-Enhancement - Labels removed: Type-Defect

  3. Kimmo Koskinen

    The Leiningen build tool for Clojure uses a convention where native libraries in jar dependencies are automatically extracted and put into java.library.path when a jar contains native/<os>/<arch> structure. It would be neat to have a dependency that follows this structure as it makes using sqlite4java with Leiningen less painful.

  4. Log in to comment