You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>org.apache.poi</groupId>
  5. <artifactId>poi-parent</artifactId>
  6. <packaging>pom</packaging>
  7. <version>4.1.1-SNAPSHOT</version>
  8. <name>Apache POI - the Java API for Microsoft Documents</name>
  9. <description>Maven build of Apache POI for Sonar checks</description>
  10. <url>http://poi.apache.org/</url>
  11. <mailingLists>
  12. <mailingList>
  13. <name>POI Users List</name>
  14. <subscribe>user-subscribe@poi.apache.org</subscribe>
  15. <unsubscribe>user-unsubscribe@poi.apache.org</unsubscribe>
  16. <archive>http://mail-archives.apache.org/mod_mbox/poi-user/</archive>
  17. </mailingList>
  18. <mailingList>
  19. <name>POI Developer List</name>
  20. <subscribe>dev-subscribe@poi.apache.org</subscribe>
  21. <unsubscribe>dev-unsubscribe@poi.apache.org</unsubscribe>
  22. <archive>http://mail-archives.apache.org/mod_mbox/poi-dev/</archive>
  23. </mailingList>
  24. </mailingLists>
  25. <licenses>
  26. <license>
  27. <name>Apache License, Version 2.0</name>
  28. <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
  29. </license>
  30. </licenses>
  31. <organization>
  32. <name>Apache Software Foundation</name>
  33. <url>http://www.apache.org/</url>
  34. </organization>
  35. <issueManagement>
  36. <system>Bugzilla</system>
  37. <url>https://bz.apache.org/bugzilla/</url>
  38. </issueManagement>
  39. <scm>
  40. <connection>scm:svn:http://svn.apache.org/repos/asf/poi/trunk</connection>
  41. <developerConnection>scm:svn:https://svn.apache.org/repos/asf/poi/trunk</developerConnection>
  42. <url>http://svn.apache.org/viewvc/poi</url>
  43. </scm>
  44. <repositories>
  45. <repository>
  46. <id>apache-releases-repo</id>
  47. <name>apache releases repo</name>
  48. <url>https://repository.apache.org/content/repositories/releases</url>
  49. </repository>
  50. </repositories>
  51. <modules>
  52. <module>main</module>
  53. <module>ooxml-schema</module>
  54. <module>ooxml-schema-encryption</module>
  55. <module>ooxml-schema-security</module>
  56. <module>ooxml</module>
  57. <module>scratchpad</module>
  58. <module>excelant</module>
  59. <module>examples</module>
  60. </modules>
  61. <properties>
  62. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  63. <!-- Try to disable running SVN blame as it causes errors here because the source is copied from the actual SVN location here! -->
  64. <sonar.scm.disabled>true</sonar.scm.disabled>
  65. <!-- define some of the third-party or plugin-versions globally to use the same in all modules -->
  66. <xmlbeans.version>3.1.0</xmlbeans.version>
  67. <junit.version>4.12</junit.version>
  68. <xmlunit.version>2.5.1</xmlunit.version>
  69. <mockito.version>2.13.0</mockito.version>
  70. <maven.plugin.resources.version>3.0.1</maven.plugin.resources.version>
  71. <maven.plugin.jar.version>3.0.1</maven.plugin.jar.version>
  72. <maven.plugin.clean.version>3.0.0</maven.plugin.clean.version>
  73. <maven.plugin.download.version>1.1.0</maven.plugin.download.version>
  74. <maven.plugin.antrun.version>1.8</maven.plugin.antrun.version>
  75. <maven.plugin.surefire.version>2.19.1</maven.plugin.surefire.version>
  76. </properties>
  77. <build>
  78. <pluginManagement>
  79. <plugins>
  80. <plugin>
  81. <groupId>org.apache.maven.plugins</groupId>
  82. <artifactId>maven-compiler-plugin</artifactId>
  83. <version>3.5.1</version>
  84. <configuration>
  85. <source>1.8</source>
  86. <target>1.8</target>
  87. </configuration>
  88. </plugin>
  89. </plugins>
  90. </pluginManagement>
  91. <plugins>
  92. <plugin>
  93. <groupId>org.apache.maven.plugins</groupId>
  94. <artifactId>maven-surefire-plugin</artifactId>
  95. <version>${maven.plugin.surefire.version}</version>
  96. <dependencies>
  97. <dependency>
  98. <groupId>org.apache.maven.surefire</groupId>
  99. <artifactId>surefire-junit47</artifactId>
  100. <version>${maven.plugin.surefire.version}</version>
  101. </dependency>
  102. </dependencies>
  103. <configuration>
  104. <systemPropertyVariables>
  105. <POI.testdata.path>../../test-data</POI.testdata.path>
  106. <java.awt.headless>true</java.awt.headless>
  107. <org.apache.poi.util.POILogger>org.apache.poi.util.NullLogger</org.apache.poi.util.POILogger>
  108. </systemPropertyVariables>
  109. <!-- use to following to analyze OOM issues: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -->
  110. <argLine>@{argLine} -Duser.language=en -Duser.country=US -Xmx1024m -Djava.io.tmpdir=${basedir}/target/tmp
  111. </argLine>
  112. <excludes>
  113. <exclude>**/All*Tests.java</exclude>
  114. <exclude>**/TestUnfixedBugs.java</exclude>
  115. <exclude>**/TestcaseRecordInputStream.java</exclude>
  116. <exclude>**/POITestCase.java</exclude>
  117. <!-- TODO: error about no public construct, seems to run with JUnit 3.8... -->
  118. <exclude>**/TestWordToConverterSuite*.java</exclude>
  119. <exclude>**/TestExcelConverterSuite*.java</exclude>
  120. </excludes>
  121. <!--test>TestPPTX2PNG</test-->
  122. <!--parallel>both</parallel>
  123. <threadCount>10</threadCount-->
  124. </configuration>
  125. </plugin>
  126. <plugin>
  127. <groupId>org.jacoco</groupId>
  128. <artifactId>jacoco-maven-plugin</artifactId>
  129. <version>0.8.2</version>
  130. </plugin>
  131. </plugins>
  132. </build>
  133. <dependencies>
  134. <dependency>
  135. <groupId>junit</groupId>
  136. <artifactId>junit</artifactId>
  137. <version>${junit.version}</version>
  138. <scope>test</scope>
  139. </dependency>
  140. <dependency>
  141. <groupId>org.xmlunit</groupId>
  142. <artifactId>xmlunit-core</artifactId>
  143. <version>${xmlunit.version}</version>
  144. <scope>test</scope>
  145. </dependency>
  146. <dependency>
  147. <groupId>org.mockito</groupId>
  148. <artifactId>mockito-core</artifactId>
  149. <version>${mockito.version}</version>
  150. <scope>test</scope>
  151. </dependency>
  152. </dependencies>
  153. <profiles>
  154. <!-- We need a fair amount of memory to compile the xml schema, -->
  155. <!-- but limit it in case it goes wrong! -->
  156. <!-- Pick the right amount based on 32 vs 64 bit jvm -->
  157. <!-- ********************************************************** -->
  158. <!-- If you are using IntelliJ, you might want to check -->
  159. <!-- http://stackoverflow.com/questions/24115142 -->
  160. <!-- ********************************************************** -->
  161. <profile>
  162. <id>32bitstuff</id>
  163. <activation>
  164. <property>
  165. <name>sun.arch.data.model</name>
  166. <value>32</value>
  167. </property>
  168. </activation>
  169. <properties>
  170. <maven.compiler.maxmem>512m</maven.compiler.maxmem>
  171. <argLine>-Xmx768m</argLine>
  172. </properties>
  173. </profile>
  174. <profile>
  175. <id>64bitstuff</id>
  176. <activation>
  177. <property>
  178. <name>sun.arch.data.model</name>
  179. <value>64</value>
  180. </property>
  181. </activation>
  182. <properties>
  183. <maven.compiler.maxmem>768m</maven.compiler.maxmem>
  184. <argLine>-Xmx1024m</argLine>
  185. </properties>
  186. </profile>
  187. <profile>
  188. <id>xmlbean</id>
  189. <activation>
  190. <file>
  191. <exists>xmlbeans.marker</exists>
  192. </file>
  193. </activation>
  194. <build>
  195. <plugins>
  196. <plugin>
  197. <groupId>org.codehaus.mojo</groupId>
  198. <artifactId>xmlbeans-maven-plugin</artifactId>
  199. <version>2.3.3</version>
  200. <executions>
  201. <execution>
  202. <phase>process-sources</phase>
  203. <goals>
  204. <goal>xmlbeans</goal>
  205. </goals>
  206. <configuration>
  207. <schemaDirectory>${basedir}/target/schemas</schemaDirectory>
  208. <javaSource>1.5</javaSource>
  209. <noJavac>true</noJavac>
  210. <noUpa>${xmlbeans.noUpa}</noUpa>
  211. <noPvr>${xmlbeans.noPvr}</noPvr>
  212. <xmlConfigs>
  213. <xmlConfig implementation="java.io.File">
  214. ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionCertificate.xsdconfig
  215. </xmlConfig>
  216. <xmlConfig implementation="java.io.File">
  217. ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionInfo.xsdconfig
  218. </xmlConfig>
  219. <xmlConfig implementation="java.io.File">
  220. ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionPassword.xsdconfig
  221. </xmlConfig>
  222. <xmlConfig implementation="java.io.File">
  223. ${basedir}/../../src/ooxml/resources/org/apache/poi/schemas/ooxmlSchemas.xsdconfig
  224. </xmlConfig>
  225. </xmlConfigs>
  226. </configuration>
  227. </execution>
  228. </executions>
  229. </plugin>
  230. <plugin>
  231. <artifactId>maven-antrun-plugin</artifactId>
  232. <version>${maven.plugin.antrun.version}</version>
  233. <executions>
  234. <execution>
  235. <id>copy-xmltype-and-xsdconfig</id>
  236. <phase>generate-sources</phase>
  237. <goals>
  238. <goal>run</goal>
  239. </goals>
  240. <configuration>
  241. <target>
  242. <copy todir="${basedir}/target/schemas">
  243. <fileset dir="${basedir}/../../src/ooxml/resources/org/apache/poi/schemas"/>
  244. </copy>
  245. </target>
  246. </configuration>
  247. </execution>
  248. <execution>
  249. <id>replace-xmltypeloader</id>
  250. <phase>process-sources</phase>
  251. <goals>
  252. <goal>run</goal>
  253. </goals>
  254. <configuration>
  255. <target>
  256. <!-- the space between "public static" is on purpose to prevent double execution -->
  257. <property name="loaderMethod"><![CDATA[
  258. private static java.lang.ref.SoftReference<org.apache.xmlbeans.SchemaTypeLoader> typeLoader;
  259. private static synchronized org.apache.xmlbeans.SchemaTypeLoader getTypeLoader() {
  260. org.apache.xmlbeans.SchemaTypeLoader stl = (typeLoader == null) ? null : typeLoader.get();
  261. if (stl == null) {
  262. stl = org.apache.xmlbeans.XmlBeans.typeLoaderForClassLoader(\2.class.getClassLoader());
  263. typeLoader = new java.lang.ref.SoftReference(stl);
  264. }
  265. return stl;
  266. }
  267. public static \2 newInstance\(\) \{]]></property>
  268. <fileset id="xsrc" dir="${basedir}/target/generated-sources/xmlbeans" includes="**/*.java" excludes="**/impl/**"/>
  269. <replaceregexp byline="true"
  270. match="(\s*)public static ([^ ]+) newInstance\(\) \{"
  271. replace="${loaderMethod}">
  272. <fileset refid="xsrc"/>
  273. </replaceregexp>
  274. <replace>
  275. <fileset refid="xsrc"/>
  276. <replacetoken>org.apache.xmlbeans.XmlBeans.getContextTypeLoader
  277. </replacetoken>
  278. <replacevalue>getTypeLoader</replacevalue>
  279. </replace>
  280. <!-- remove deprecated warnings, as we prefer the array methods - see #56854 -->
  281. <replace>
  282. <fileset refid="xsrc"/>
  283. <replacetoken><![CDATA[ * @deprecated
  284. ]]></replacetoken>
  285. </replace>
  286. </target>
  287. </configuration>
  288. </execution>
  289. <execution>
  290. <id>remove-xmltypeloader-from-schema-jar</id>
  291. <phase>prepare-package</phase>
  292. <goals>
  293. <goal>run</goal>
  294. </goals>
  295. <configuration>
  296. <target>
  297. <touch file="${basedir}/target/generated-sources/xmlbeans/.staleFlag"/>
  298. <delete dir="${basedir}/target/classes/org/apache"/>
  299. </target>
  300. </configuration>
  301. </execution>
  302. </executions>
  303. </plugin>
  304. </plugins>
  305. </build>
  306. <dependencies>
  307. <dependency>
  308. <groupId>org.apache.xmlbeans</groupId>
  309. <artifactId>xmlbeans</artifactId>
  310. <version>${xmlbeans.version}</version>
  311. </dependency>
  312. </dependencies>
  313. </profile>
  314. </profiles>
  315. </project>