2 <modelVersion>4.0.0</modelVersion>
4 <groupId>org.yaz4j</groupId>
5 <artifactId>yaz4j-lib</artifactId>
6 <version>1.5-SNAPSHOT</version>
8 <groupId>org.yaz4j</groupId>
9 <artifactId>libyaz4j</artifactId>
11 <packaging>${packaging}</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>${javahOS}</javahOS>
76 <jdkIncludePath>${jdkIncludePath}</jdkIncludePath>
77 <compilerProvider>generic</compilerProvider>
78 <compilerExecutable>g++</compilerExecutable>
79 <compilerStartOptions>
80 <compilerStartOption>-fPIC</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>
115 <encoding>UTF-8</encoding>
118 <showDeprecation>true</showDeprecation>
119 <showWarnings>true</showWarnings>
124 <groupId>org.codehaus.mojo</groupId>
125 <artifactId>build-helper-maven-plugin</artifactId>
128 <id>include-generated-test-sources</id>
129 <phase>generate-test-sources</phase>
130 <goals><goal>add-test-source</goal></goals>
133 <source>../src/main/java</source>
134 <source>../target/generated-sources/java</source>
142 <artifactId>maven-surefire-plugin</artifactId>
144 <forkMode>once</forkMode>
145 <workingDirectory>target</workingDirectory>
146 <argLine>-Djava.library.path=${project.build.directory}</argLine>
154 <id>Codehaus Snapshots</id>
155 <url>http://snapshots.repository.codehaus.org/</url>
157 <enabled>true</enabled>
160 <enabled>false</enabled>
166 <id>Codehaus Snapshots</id>
167 <url>http://snapshots.repository.codehaus.org/</url>
169 <enabled>true</enabled>
172 <enabled>true</enabled> <!-- Workaround for MNG-2974, see note below -->
175 </pluginRepositories>