2 <modelVersion>4.0.0</modelVersion>
4 <groupId>org.yaz4j</groupId>
5 <artifactId>yaz4j</artifactId>
6 <version>1.1-SNAPSHOT</version>
8 <groupId>org.yaz4j</groupId>
9 <artifactId>libyaz4j</artifactId>
11 <packaging>so</packaging>
14 <finalName>${artifactId}</finalName>
15 <testSourceDirectory>../src/test</testSourceDirectory>
19 <artifactId>maven-antrun-plugin</artifactId>
22 <id>write-yaz-config</id>
23 <phase>initialize</phase>
29 <exec executable="yaz-config" outputproperty="yaz.cflags">
30 <arg value="--cflags" />
32 <echo message="YAZ CFLAGS: ${yaz.cflags}"/>
33 <exec executable="yaz-config" outputproperty="yaz.libs">
34 <arg value="--libs" />
36 <echo message="YAZ LIBS: ${yaz.libs}"/>
37 <!-- this does not work on debian/ubuntu
38 <propertyfile file="${basedir}/target/yaz-config.properties"
39 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"
45 message="yaz.cflags=${yaz.cflags}${line.separator}yaz.libs=${yaz.libs}"/>
52 <groupId>org.codehaus.mojo</groupId>
53 <artifactId>properties-maven-plugin</artifactId>
54 <version>1.0-alpha-1</version>
57 <id>read-yaz-config</id>
58 <phase>initialize</phase>
60 <goal>read-project-properties</goal>
64 <file>${basedir}/target/yaz-config.properties</file>
71 <groupId>org.codehaus.mojo</groupId>
72 <artifactId>native-maven-plugin</artifactId>
73 <extensions>true</extensions>
75 <javahOS>linux</javahOS>
76 <compilerProvider>generic</compilerProvider>
77 <compilerExecutable>g++</compilerExecutable>
78 <compilerStartOptions>
79 <compilerStartOption>-fPIC</compilerStartOption>
80 </compilerStartOptions>
82 <compilerEndOption>${yaz.cflags}</compilerEndOption>
87 <include>**/*.cpp</include>
89 <directory>../src/main/native</directory>
93 <include>**/*.cpp</include>
95 <directory>../target/generated-sources/native</directory>
98 <linkerExecutable>g++</linkerExecutable>
100 <linkerStartOption>-shared</linkerStartOption>
101 </linkerStartOptions>
103 <linkerEndOption>${yaz.libs}</linkerEndOption>
108 <!-- this is to compile and execute tests, that are arch-dependent
109 because they need to load so/dll -->
111 <groupId>org.apache.maven.plugins</groupId>
112 <artifactId>maven-compiler-plugin</artifactId>
114 <encoding>UTF-8</encoding>
117 <showDeprecation>true</showDeprecation>
118 <showWarnings>true</showWarnings>
123 <groupId>org.codehaus.mojo</groupId>
124 <artifactId>build-helper-maven-plugin</artifactId>
127 <id>include-generated-test-sources</id>
128 <phase>generate-test-sources</phase>
129 <goals><goal>add-test-source</goal></goals>
132 <source>../src/main/java</source>
133 <source>../target/generated-sources/java</source>
141 <artifactId>maven-surefire-plugin</artifactId>
143 <forkMode>once</forkMode>
144 <workingDirectory>target</workingDirectory>
145 <argLine>-Djava.library.path=${project.build.directory}</argLine>
153 <id>Codehaus Snapshots</id>
154 <url>http://snapshots.repository.codehaus.org/</url>
156 <enabled>true</enabled>
159 <enabled>false</enabled>
165 <id>Codehaus Snapshots</id>
166 <url>http://snapshots.repository.codehaus.org/</url>
168 <enabled>true</enabled>
171 <enabled>true</enabled> <!-- Workaround for MNG-2974, see note below -->
174 </pluginRepositories>