1 <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/maven-v4_0_0.xsd">
2 <modelVersion>4.0.0</modelVersion>
4 <groupId>org.yaz4j</groupId>
5 <artifactId>yaz4j-lib</artifactId>
6 <version>1.6-SNAPSHOT</version>
8 <groupId>org.yaz4j</groupId>
9 <artifactId>libyaz4j</artifactId>
11 <packaging>${packaging}</packaging>
14 <finalName>${project.artifactId}</finalName>
15 <testSourceDirectory>../src/test</testSourceDirectory>
19 <artifactId>maven-antrun-plugin</artifactId>
20 <version>1.8</version>
23 <id>write-yaz-config</id>
24 <phase>initialize</phase>
30 <exec executable="${yaz.config}" outputproperty="yaz.cflags">
31 <arg value="--cflags" />
33 <echo message="YAZ CFLAGS: ${yaz.cflags}" />
34 <exec executable="${yaz.config}" outputproperty="yaz.libs">
35 <arg value="--libs" />
37 <echo message="YAZ LIBS: ${yaz.libs}" />
38 <!-- this does not work on debian/ubuntu
39 <propertyfile file="${basedir}/target/yaz-config.properties" comment="YAZ COMPILER/LINKER FLAGS">
40 <entry key="yaz.cflags" value="${yaz.cflags}" />
41 <entry key="yaz.libs" value="${yaz.libs}" />
44 <echo file="${basedir}/target/yaz-config.properties" message="yaz.cflags=${yaz.cflags}${line.separator}yaz.libs=${yaz.libs}" />
51 <groupId>org.codehaus.mojo</groupId>
52 <artifactId>properties-maven-plugin</artifactId>
53 <version>1.0-alpha-1</version>
56 <id>read-yaz-config</id>
57 <phase>initialize</phase>
59 <goal>read-project-properties</goal>
63 <file>${basedir}/target/yaz-config.properties</file>
70 <groupId>org.codehaus.mojo</groupId>
71 <artifactId>native-maven-plugin</artifactId>
72 <version>1.0-alpha-8</version>
73 <extensions>true</extensions>
75 <javahOS>${javahOS}</javahOS>
76 <jdkIncludePath>${jdkIncludePath}</jdkIncludePath>
77 <compilerProvider>generic</compilerProvider>
78 <compilerExecutable>g++</compilerExecutable>
79 <compilerStartOptions>
80 <compilerStartOption>-fPIC -Wno-deprecated-declarations</compilerStartOption>
81 </compilerStartOptions>
83 <compilerEndOption>${yaz.cflags}</compilerEndOption>
88 <include>**/*.cpp</include>
90 <directory>../src/main/native</directory>
94 <include>**/*.cpp</include>
96 <directory>../target/generated-sources/native</directory>
99 <linkerExecutable>g++</linkerExecutable>
101 <linkerStartOption>-shared</linkerStartOption>
102 </linkerStartOptions>
104 <linkerEndOption>${yaz.libs}</linkerEndOption>
109 <!-- this is to compile and execute tests, that are arch-dependent
110 because they need to load so/dll -->
112 <groupId>org.apache.maven.plugins</groupId>
113 <artifactId>maven-compiler-plugin</artifactId>
114 <version>3.3</version>
116 <encoding>UTF-8</encoding>
119 <showDeprecation>true</showDeprecation>
120 <showWarnings>true</showWarnings>
125 <groupId>org.codehaus.mojo</groupId>
126 <artifactId>build-helper-maven-plugin</artifactId>
127 <version>1.9.1</version>
130 <id>include-generated-test-sources</id>
131 <phase>generate-test-sources</phase>
132 <goals><goal>add-test-source</goal></goals>
135 <source>../src/main/java</source>
136 <source>../target/generated-sources/java</source>
144 <artifactId>maven-surefire-plugin</artifactId>
145 <version>2.18.1</version>
147 <forkMode>once</forkMode>
148 <workingDirectory>target</workingDirectory>
149 <argLine>-Djava.library.path=${project.build.directory}</argLine>