Rename the project artifacts
[yaz4j-moved-to-github.git] / unix / pom.xml
1 <project>
2   <modelVersion>4.0.0</modelVersion>
3   <parent>
4     <groupId>org.yaz4j</groupId>
5     <artifactId>yaz4j-lib</artifactId>
6     <version>1.2-SNAPSHOT</version>
7   </parent>
8   <groupId>org.yaz4j</groupId>
9   <artifactId>libyaz4j</artifactId>
10   <name>libyaz4j</name>
11   <packaging>${packaging}</packaging>
12
13   <build>
14     <finalName>${artifactId}</finalName>
15     <testSourceDirectory>../src/test</testSourceDirectory>
16
17     <plugins>
18       <plugin>
19         <artifactId>maven-antrun-plugin</artifactId>
20         <executions>
21           <execution>
22             <id>write-yaz-config</id>
23             <phase>initialize</phase>
24             <goals>
25               <goal>run</goal>
26             </goals>
27             <configuration>
28               <tasks>
29                 <exec executable="${yaz.config}" outputproperty="yaz.cflags">
30                   <arg value="--cflags" />
31                 </exec>
32                 <echo message="YAZ CFLAGS: ${yaz.cflags}"/>
33                 <exec executable="${yaz.config}" outputproperty="yaz.libs">
34                   <arg value="--libs" />
35                 </exec>
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}"/>
42                 </propertyfile>
43                 -->
44                 <echo file="${basedir}/target/yaz-config.properties"
45                   message="yaz.cflags=${yaz.cflags}${line.separator}yaz.libs=${yaz.libs}"/>
46               </tasks>
47             </configuration>
48           </execution>
49         </executions>
50       </plugin>
51       <plugin>
52         <groupId>org.codehaus.mojo</groupId>
53         <artifactId>properties-maven-plugin</artifactId>
54         <version>1.0-alpha-1</version>
55         <executions>
56           <execution>
57             <id>read-yaz-config</id>
58             <phase>initialize</phase>
59             <goals>
60               <goal>read-project-properties</goal>
61             </goals>
62             <configuration>
63               <files>
64                 <file>${basedir}/target/yaz-config.properties</file>
65               </files>
66             </configuration>
67           </execution>
68         </executions>
69       </plugin>
70       <plugin>
71         <groupId>org.codehaus.mojo</groupId>
72         <artifactId>native-maven-plugin</artifactId>
73         <extensions>true</extensions>       
74         <configuration>         
75           <javahOS>${javahOS}</javahOS>
76           <jdkIncludePath>${jdkIncludePath}</jdkIncludePath>
77           <compilerProvider>generic</compilerProvider>
78           <compilerExecutable>g++</compilerExecutable>
79           <compilerStartOptions>
80             <compilerStartOption>-fPIC</compilerStartOption>
81           </compilerStartOptions>
82           <compilerEndOptions>
83             <compilerEndOption>${yaz.cflags}</compilerEndOption>
84           </compilerEndOptions>
85           <sources>
86             <source>
87               <includes>
88                 <include>**/*.cpp</include>
89               </includes>
90               <directory>../src/main/native</directory>
91             </source>
92             <source>
93               <includes>
94                 <include>**/*.cpp</include>
95               </includes>
96               <directory>../target/generated-sources/native</directory>
97             </source>
98           </sources>
99           <linkerExecutable>g++</linkerExecutable>
100           <linkerStartOptions>
101             <linkerStartOption>-shared</linkerStartOption>
102           </linkerStartOptions>
103           <linkerEndOptions>
104             <linkerEndOption>${yaz.libs}</linkerEndOption>
105           </linkerEndOptions>
106         </configuration>
107       </plugin>
108
109       <!-- this is to compile and execute tests, that are arch-dependent
110        because they need to load so/dll -->
111       <plugin>
112         <groupId>org.apache.maven.plugins</groupId>
113         <artifactId>maven-compiler-plugin</artifactId>
114         <configuration>
115           <encoding>UTF-8</encoding>
116           <source>1.6</source>
117           <target>1.6</target>
118           <showDeprecation>true</showDeprecation>
119           <showWarnings>true</showWarnings>
120         </configuration>
121       </plugin>
122
123       <plugin>
124         <groupId>org.codehaus.mojo</groupId>
125         <artifactId>build-helper-maven-plugin</artifactId>
126         <executions>
127           <execution>
128             <id>include-generated-test-sources</id>
129             <phase>generate-test-sources</phase>
130             <goals><goal>add-test-source</goal></goals>
131             <configuration>
132               <sources>
133                 <source>../src/main/java</source>
134                 <source>../target/generated-sources/java</source>
135               </sources>
136             </configuration>
137           </execution>
138         </executions>
139       </plugin>
140
141       <plugin>
142         <artifactId>maven-surefire-plugin</artifactId>
143         <configuration>
144           <forkMode>once</forkMode>
145           <workingDirectory>target</workingDirectory>
146           <argLine>-Djava.library.path=${project.build.directory}</argLine>
147         </configuration>
148       </plugin>
149     </plugins>    
150   </build>
151
152   <repositories>
153     <repository>
154       <id>Codehaus Snapshots</id>
155       <url>http://snapshots.repository.codehaus.org/</url>
156       <snapshots>
157         <enabled>true</enabled>
158       </snapshots>
159       <releases>
160         <enabled>false</enabled>
161       </releases>
162     </repository>
163   </repositories>
164   <pluginRepositories>
165     <pluginRepository>
166       <id>Codehaus Snapshots</id>
167       <url>http://snapshots.repository.codehaus.org/</url>
168       <snapshots>
169         <enabled>true</enabled>
170       </snapshots>
171       <releases>
172         <enabled>true</enabled>  <!-- Workaround for MNG-2974, see note below -->
173       </releases>
174     </pluginRepository>
175   </pluginRepositories>
176 </project>