jangoslackgit / sqlite4java

Automatically exported from code.google.com/p/sqlite4java
0 stars 0 forks source link

maven natives- #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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>

Original issue reported on code.google.com by kuznetsov.alexey on 29 Dec 2012 at 3:50

GoogleCodeExporter commented 9 years ago
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

Original comment by kuznetsov.alexey on 30 Dec 2012 at 2:15

GoogleCodeExporter commented 9 years ago
Alexey, thanks for the pointers and contribution. I will review it when I work 
on the next version of sqlite4java.

Original comment by ser...@gmail.com on 3 Jan 2013 at 4:21