7f78c191b7acb3dffb236199e897a683e7ebd02a
[yaz4j-moved-to-github.git] / win32 / 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.4</version>
7   </parent>
8   <groupId>org.yaz4j</groupId>
9   <artifactId>yaz4j</artifactId>
10   <name>yaz4j</name>
11
12    <packaging>dll</packaging>
13
14    <build>
15      <testSourceDirectory>../src/test</testSourceDirectory>
16      <plugins>
17        <plugin>
18          <groupId>org.codehaus.mojo</groupId>
19          <artifactId>native-maven-plugin</artifactId>
20          <extensions>true</extensions>
21          <configuration>
22            <javahOS>win32</javahOS>
23            <!--<envFactoryName>org.codehaus.mojo.natives.msvc.MSVC6EnvFactory</envFactoryName>-->
24          
25            <compilerProvider>msvc</compilerProvider>
26            
27            <compilerStartOptions>
28              <compilerStartOption>${yaz.include}</compilerStartOption>
29              <compilerStartOption>/D WIN32</compilerStartOption>
30            </compilerStartOptions>
31            <sources>
32             <source>
33               <includes>
34                 <include>**/*.cpp</include>
35               </includes>
36               <directory>../src/main/native</directory>
37             </source>
38             <source>
39               <includes>
40                 <include>**/*.cpp</include>
41               </includes>
42               <directory>../target/generated-sources/native</directory>
43             </source>
44           </sources>
45           <linkerStartOptions>
46             <linkerStartOption>/dll</linkerStartOption>
47           </linkerStartOptions>
48           <linkerEndOptions>
49             <linkerEndOption>${yaz.libs}</linkerEndOption>
50           </linkerEndOptions>
51         </configuration>
52        </plugin>
53
54       <!-- this is to compile and execute tests, that are arch-dependent
55        because they need to load so/dll -->
56       <plugin>
57         <groupId>org.apache.maven.plugins</groupId>
58         <artifactId>maven-compiler-plugin</artifactId>
59         <configuration>
60           <encoding>UTF-8</encoding>
61           <source>1.6</source>
62           <target>1.6</target>
63           <showDeprecation>true</showDeprecation>
64           <showWarnings>true</showWarnings>
65         </configuration>
66       </plugin>
67
68       <plugin>
69         <groupId>org.codehaus.mojo</groupId>
70         <artifactId>build-helper-maven-plugin</artifactId>
71         <executions>
72           <execution>
73             <id>include-generated-test-sources</id>
74             <phase>generate-test-sources</phase>
75             <goals><goal>add-test-source</goal></goals>
76             <configuration>
77               <sources>
78                 <source>../src/main/java</source>
79                 <source>../target/generated-sources/java</source>
80               </sources>
81             </configuration>
82           </execution>
83         </executions>
84       </plugin>
85
86       <plugin>
87         <artifactId>maven-surefire-plugin</artifactId>
88         <configuration>
89           <forkMode>once</forkMode>
90           <workingDirectory>target</workingDirectory>
91           <environmentVariables>
92             <PATH>${project.build.directory};${yaz.path}\bin</PATH>
93           </environmentVariables>
94         </configuration>
95       </plugin>
96
97  
98     </plugins>    
99   </build>
100 </project>