Use dylib on osx
[yaz4j-moved-to-github.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index f087ae5..97a9d39 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -2,10 +2,60 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.yaz4j</groupId>
   <artifactId>yaz4j</artifactId>
-  <name>yaz4j</name>
-  <version>1.0-SNAPSHOT</version>
+  <version>1.2-SNAPSHOT</version>
   <packaging>pom</packaging>
 
+  <!-- Project Information -->
+  <name>yaz4j</name>
+  <url>http://www.indexdata.com/yaz4j/</url>
+  <inceptionYear>2008</inceptionYear>
+  <licenses>
+    <license>
+      <name>BSD</name>
+      <url>http://www.opensource.org/licenses/bsd-license.php</url>
+    </license>
+  </licenses>
+  <description>Java wrapper for the ZOOM API of YAZ</description>
+
+  <developers>
+    <developer>
+      <name>Rob Styles</name>
+      <id>rob</id>
+      <email>Rob.Styles@talis.com</email>
+      <organization>Talis</organization>
+      <organizationUrl>http://www.talis.com/</organizationUrl>
+      <roles />
+      <timezone />
+    </developer>
+    <developer>
+      <name>Adam Dickmeiss</name>
+      <id>adam</id>
+      <email>adam@indexdata.dk</email>
+      <organization>Index Data</organization>
+      <organizationUrl>http://www.indexdata.com/</organizationUrl>
+      <roles />
+      <timezone />
+    </developer>
+    <developer>
+      <name>Jakub Skoczen</name>
+      <id>jakub</id>
+      <email>jakub@indexdata.dk</email>
+      <organization>Index Data</organization>
+      <organizationUrl>http://www.indexdata.com/</organizationUrl>
+      <roles />
+      <timezone />
+    </developer>
+    <developer>
+      <name>Juan Cayetano</name>
+      <id>cayetano</id>
+      <email>juancayetano.delgado@gmail.com</email>
+      <organization />
+      <organizationUrl />
+      <roles />
+      <timezone />
+    </developer>
+  </developers>
+
   <modules>
     <module>any</module>
   </modules>
             <inherited>false</inherited>
             <configuration>
               <tasks>
-                <exec executable="yaz-config" outputproperty="yaz.prefix">
-                  <arg value="--prefix" />              
-                </exec>
-                <echo message="Using yaz prefix: ${yaz.prefix}"/>
+                <echo message="Using include: ${yaz.include}"/>
                 <mkdir dir="target/generated-sources/java/org/yaz4j/jni"/>
                 <mkdir dir="target/generated-sources/native" />
                 <exec executable="swig">
                   <arg value="-Isrc/main/native" />
-                  <arg value="-I${yaz.prefix}/include"/>
+                  <arg value="${yaz.include}"/>
                   <arg value="-outdir"/>
                   <arg value="${basedir}/target/generated-sources/java/org/yaz4j/jni"/>
                   <arg value="-package"/>
           </execution>
         </executions>
       </plugin>
-   </plugins>
+    </plugins>
   </build>
 
+  <!-- Reporting -->
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <enableRSS>false</enableRSS>
+          <include>**/*.java</include>
+          <sourceDirectory>src/main/java</sourceDirectory>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>
+          maven-project-info-reports-plugin
+        </artifactId>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>dependencies</report>
+              <report>project-team</report>
+              <report>mailing-list</report>
+              <report>issue-tracking</report>
+              <report>summary</report>
+              <report>scm</report>
+              <report>index</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <chartset>UTF-8</chartset>
+          <excludePackageNames>org.yaz4j.jni</excludePackageNames>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+  <!-- ////////////// -->
+
+  <!-- Environment Information -->
+  <mailingLists>
+    <mailingList>
+      <name>Yazlist</name>
+      <subscribe />
+      <unsubscribe />
+      <post>yazlist@lists.indexdata.dk</post>
+      <archive>http://lists.indexdata.dk/pipermail/yazlist/</archive>
+    </mailingList>
+  </mailingLists>
+
+  <scm>
+    <connection>scm:git:git://git.indexdata.com/yaz4j</connection>
+    <url>http://git.indexdata.com/?p=yaz4j.git</url>
+  </scm>
+
+  <issueManagement>
+    <system>Bugzilla</system>
+    <url>http://bugzilla.indexdata.dk</url>
+  </issueManagement>
+
   <profiles>
     <profile>
       <id>win32</id>
       <activation>
-        <property>
-          <name>platform</name>
-          <value>win32</value>
-        </property>
+        <os>
+          <family>windows</family>
+        </os>
       </activation>
+      <properties>
+        <platform>win32</platform>
+        <yaz.path>C:\Program Files\YAZ\</yaz.path>
+        <!-- needed by swig -->
+        <yaz.include>-I${yaz.path}\include</yaz.include>
+      </properties>
       <modules>
         <module>win32</module>
       </modules>
     </profile>
 
     <profile>
-      <id>linux</id>
+      <id>unix</id>
+      <activation>
+        <os>
+          <family>unix</family>
+        </os>
+      </activation>
+      <properties>
+        <platform>linux</platform>
+        <packaging>so</packaging>
+        <!-- yaz-config executable -->
+        <yaz.config>yaz-config</yaz.config>
+        <javahOS>linux</javahOS>
+        <jdkIncludePath>${java.home}/../include</jdkIncludePath>
+      </properties>
+      <modules>
+        <module>unix</module>
+      </modules>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>write-swig-include</id>
+                <phase>initialize</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <exec executable="${yaz.config}" 
+                      outputproperty="yaz.include">
+                      <arg value="--include" />
+                    </exec>
+                    <echo message="YAZ INCLUDE=${yaz.include}"/>
+                    <mkdir dir="${basedir}/target"/>
+                    <echo file="${basedir}/target/swig.properties"
+                      message="yaz.include=${yaz.include}"/>
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin> 
+            <groupId>org.codehaus.mojo</groupId> 
+            <artifactId>properties-maven-plugin</artifactId> 
+            <version>1.0-alpha-1</version> 
+            <executions> 
+              <execution> 
+                <id>read-swig-config</id> 
+                <phase>initialize</phase> 
+                <goals> 
+                  <goal>read-project-properties</goal> 
+                </goals> 
+                <configuration> 
+                  <files> 
+                    <file>${basedir}/target/swig.properties</file> 
+                  </files> 
+                </configuration> 
+              </execution> 
+            </executions> 
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <profile>
+      <!-- osx is both 'unix' and 'mac' -->
+      <id>osx</id>
       <activation>
-        <property>
-          <name>platform</name>
-          <value>linux</value>
-        </property>
+        <os>
+          <family>mac</family>
+        </os>
       </activation>
+      <properties>
+        <platform>osx</platform>
+        <packaging>dylib</packaging>
+        <javahOS>mac</javahOS>
+        <jdkIncludePath>${java.home}/../Headers</jdkIncludePath>
+      </properties>
       <modules>
-        <module>linux</module>
+        <module>unix</module>
       </modules>
     </profile>
- </profiles>
+  </profiles>
 </project>