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>${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"
40 comment="YAZ COMPILER/LINKER FLAGS">
41 <entry key="yaz.cflags" value="${yaz.cflags}"/>
42 <entry key="yaz.libs" value="${yaz.libs}"/>
45 <echo file="${basedir}/target/yaz-config.properties"
46 message="yaz.cflags=${yaz.cflags}${line.separator}yaz.libs=${yaz.libs}"/>
53 <groupId>org.codehaus.mojo</groupId>
54 <artifactId>properties-maven-plugin</artifactId>
55 <version>1.0-alpha-1</version>
58 <id>read-yaz-config</id>
59 <phase>initialize</phase>
61 <goal>read-project-properties</goal>
65 <file>${basedir}/target/yaz-config.properties</file>
72 <groupId>org.codehaus.mojo</groupId>
73 <artifactId>native-maven-plugin</artifactId>
74 <version>1.0-alpha-8</version>
75 <extensions>true</extensions>
77 <javahOS>${javahOS}</javahOS>
78 <jdkIncludePath>${jdkIncludePath}</jdkIncludePath>
79 <compilerProvider>generic</compilerProvider>
80 <compilerExecutable>g++</compilerExecutable>
81 <compilerStartOptions>
82 <compilerStartOption>-fPIC</compilerStartOption>
83 </compilerStartOptions>
85 <compilerEndOption>${yaz.cflags}</compilerEndOption>
90 <include>**/*.cpp</include>
92 <directory>../src/main/native</directory>
96 <include>**/*.cpp</include>
98 <directory>../target/generated-sources/native</directory>
101 <linkerExecutable>g++</linkerExecutable>
103 <linkerStartOption>-shared</linkerStartOption>
104 </linkerStartOptions>
106 <linkerEndOption>${yaz.libs}</linkerEndOption>
111 <!-- this is to compile and execute tests, that are arch-dependent
112 because they need to load so/dll -->
114 <groupId>org.apache.maven.plugins</groupId>
115 <artifactId>maven-compiler-plugin</artifactId>
116 <version>3.3</version>
118 <encoding>UTF-8</encoding>
121 <showDeprecation>true</showDeprecation>
122 <showWarnings>true</showWarnings>
127 <groupId>org.codehaus.mojo</groupId>
128 <artifactId>build-helper-maven-plugin</artifactId>
129 <version>1.9.1</version>
132 <id>include-generated-test-sources</id>
133 <phase>generate-test-sources</phase>
134 <goals><goal>add-test-source</goal></goals>
137 <source>../src/main/java</source>
138 <source>../target/generated-sources/java</source>
146 <artifactId>maven-surefire-plugin</artifactId>
147 <version>2.18.1</version>
149 <forkMode>once</forkMode>
150 <workingDirectory>target</workingDirectory>
151 <argLine>-Djava.library.path=${project.build.directory}</argLine>
159 <id>Codehaus Snapshots</id>
160 <url>http://snapshots.repository.codehaus.org/</url>
162 <enabled>true</enabled>
165 <enabled>false</enabled>
171 <id>Codehaus Snapshots</id>
172 <url>http://snapshots.repository.codehaus.org/</url>
174 <enabled>true</enabled>
177 <enabled>true</enabled> <!-- Workaround for MNG-2974, see note below -->
180 </pluginRepositories>