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 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  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.2-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:https://svn.apache.org/repos/asf/poi/trunk</connection>
  41. <developerConnection>scm:svn:https://svn.apache.org/repos/asf/poi/trunk</developerConnection>
  42. <url>https://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. <module>integration-test</module>
  61. </modules>
  62. <properties>
  63. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  64. <!-- Try to disable running SVN blame as it causes errors here because the source is copied from the actual SVN location here! -->
  65. <sonar.scm.disabled>true</sonar.scm.disabled>
  66. <sonar.organization>apache</sonar.organization>
  67. <sonar.projectKey>poi-parent</sonar.projectKey>
  68. <sonar.moduleKey>${artifactId}</sonar.moduleKey>
  69. <sonar.host.url>https://sonarcloud.io</sonar.host.url>
  70. <sonar.jacoco.reportPaths>target/jacoco.exec</sonar.jacoco.reportPaths>
  71. <sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
  72. <!-- define some of the third-party or plugin-versions globally to use the same in all modules -->
  73. <xmlbeans.version>3.1.0</xmlbeans.version>
  74. <junit.version>4.13</junit.version>
  75. <xmlunit.version>2.6.3</xmlunit.version>
  76. <mockito.version>2.13.0</mockito.version>
  77. <maven.plugin.resources.version>3.1.0</maven.plugin.resources.version>
  78. <maven.plugin.jar.version>3.2.0</maven.plugin.jar.version>
  79. <maven.plugin.clean.version>3.1.0</maven.plugin.clean.version>
  80. <maven.plugin.download.version>1.1.0</maven.plugin.download.version>
  81. <maven.plugin.antrun.version>1.8</maven.plugin.antrun.version>
  82. <maven.plugin.surefire.version>3.0.0-M4</maven.plugin.surefire.version>
  83. </properties>
  84. <build>
  85. <pluginManagement>
  86. <plugins>
  87. <plugin>
  88. <groupId>org.apache.maven.plugins</groupId>
  89. <artifactId>maven-compiler-plugin</artifactId>
  90. <version>3.8.1</version>
  91. <configuration>
  92. <source>1.8</source>
  93. <target>1.8</target>
  94. </configuration>
  95. </plugin>
  96. </plugins>
  97. </pluginManagement>
  98. <plugins>
  99. <plugin>
  100. <groupId>org.apache.maven.plugins</groupId>
  101. <artifactId>maven-surefire-plugin</artifactId>
  102. <version>${maven.plugin.surefire.version}</version>
  103. <dependencies>
  104. <dependency>
  105. <groupId>org.apache.maven.surefire</groupId>
  106. <artifactId>surefire-junit47</artifactId>
  107. <version>${maven.plugin.surefire.version}</version>
  108. </dependency>
  109. </dependencies>
  110. <configuration>
  111. <systemPropertyVariables>
  112. <POI.testdata.path>../../test-data</POI.testdata.path>
  113. <java.awt.headless>true</java.awt.headless>
  114. <org.apache.poi.util.POILogger>org.apache.poi.util.NullLogger</org.apache.poi.util.POILogger>
  115. </systemPropertyVariables>
  116. <!-- use to following to analyze OOM issues: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -->
  117. <argLine>@{argLine} -Duser.language=en -Duser.country=US -Xmx1024m -Djava.io.tmpdir=${basedir}/target/tmp
  118. </argLine>
  119. <excludes>
  120. <exclude>**/All*Tests.java</exclude>
  121. <exclude>**/TestUnfixedBugs.java</exclude>
  122. <exclude>**/TestcaseRecordInputStream.java</exclude>
  123. <exclude>**/POITestCase.java</exclude>
  124. <!-- TODO: error about no public construct, seems to run with JUnit 3.8... -->
  125. <exclude>**/TestWordToConverterSuite*.java</exclude>
  126. <exclude>**/TestExcelConverterSuite*.java</exclude>
  127. </excludes>
  128. <!--test>TestPPTX2PNG</test-->
  129. <!--parallel>both</parallel>
  130. <threadCount>10</threadCount-->
  131. </configuration>
  132. </plugin>
  133. <plugin>
  134. <groupId>org.jacoco</groupId>
  135. <artifactId>jacoco-maven-plugin</artifactId>
  136. <version>0.8.5</version>
  137. <executions>
  138. <execution>
  139. <goals>
  140. <goal>prepare-agent</goal>
  141. </goals>
  142. </execution>
  143. <execution>
  144. <id>report</id>
  145. <phase>prepare-package</phase>
  146. <goals>
  147. <goal>report</goal>
  148. </goals>
  149. </execution>
  150. </executions>
  151. </plugin>
  152. </plugins>
  153. </build>
  154. <dependencies>
  155. <dependency>
  156. <groupId>junit</groupId>
  157. <artifactId>junit</artifactId>
  158. <version>${junit.version}</version>
  159. <scope>test</scope>
  160. </dependency>
  161. <dependency>
  162. <groupId>org.xmlunit</groupId>
  163. <artifactId>xmlunit-core</artifactId>
  164. <version>${xmlunit.version}</version>
  165. <scope>test</scope>
  166. </dependency>
  167. <dependency>
  168. <groupId>org.mockito</groupId>
  169. <artifactId>mockito-core</artifactId>
  170. <version>${mockito.version}</version>
  171. <scope>test</scope>
  172. </dependency>
  173. </dependencies>
  174. <profiles>
  175. <!-- We need a fair amount of memory to compile the xml schema, -->
  176. <!-- but limit it in case it goes wrong! -->
  177. <!-- Pick the right amount based on 32 vs 64 bit jvm -->
  178. <!-- ********************************************************** -->
  179. <!-- If you are using IntelliJ, you might want to check -->
  180. <!-- http://stackoverflow.com/questions/24115142 -->
  181. <!-- ********************************************************** -->
  182. <profile>
  183. <id>32bitstuff</id>
  184. <activation>
  185. <property>
  186. <name>sun.arch.data.model</name>
  187. <value>32</value>
  188. </property>
  189. </activation>
  190. <properties>
  191. <maven.compiler.maxmem>512m</maven.compiler.maxmem>
  192. <argLine>-Xmx768m</argLine>
  193. </properties>
  194. </profile>
  195. <profile>
  196. <id>64bitstuff</id>
  197. <activation>
  198. <property>
  199. <name>sun.arch.data.model</name>
  200. <value>64</value>
  201. </property>
  202. </activation>
  203. <properties>
  204. <maven.compiler.maxmem>768m</maven.compiler.maxmem>
  205. <argLine>-Xmx1024m</argLine>
  206. </properties>
  207. </profile>
  208. <profile>
  209. <id>xmlbean</id>
  210. <activation>
  211. <file>
  212. <exists>xmlbeans.marker</exists>
  213. </file>
  214. </activation>
  215. <build>
  216. <plugins>
  217. <plugin>
  218. <groupId>org.codehaus.mojo</groupId>
  219. <artifactId>xmlbeans-maven-plugin</artifactId>
  220. <version>2.3.3</version>
  221. <executions>
  222. <execution>
  223. <phase>process-sources</phase>
  224. <goals>
  225. <goal>xmlbeans</goal>
  226. </goals>
  227. <configuration>
  228. <schemaDirectory>${basedir}/target/schemas</schemaDirectory>
  229. <javaSource>1.5</javaSource>
  230. <noJavac>true</noJavac>
  231. <noUpa>${xmlbeans.noUpa}</noUpa>
  232. <noPvr>${xmlbeans.noPvr}</noPvr>
  233. <xmlConfigs>
  234. <xmlConfig implementation="java.io.File">
  235. ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionCertificate.xsdconfig
  236. </xmlConfig>
  237. <xmlConfig implementation="java.io.File">
  238. ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionInfo.xsdconfig
  239. </xmlConfig>
  240. <xmlConfig implementation="java.io.File">
  241. ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionPassword.xsdconfig
  242. </xmlConfig>
  243. <xmlConfig implementation="java.io.File">
  244. ${basedir}/../../src/ooxml/resources/org/apache/poi/schemas/ooxmlSchemas.xsdconfig
  245. </xmlConfig>
  246. </xmlConfigs>
  247. </configuration>
  248. </execution>
  249. </executions>
  250. </plugin>
  251. <plugin>
  252. <artifactId>maven-antrun-plugin</artifactId>
  253. <version>${maven.plugin.antrun.version}</version>
  254. <executions>
  255. <execution>
  256. <id>copy-xmltype-and-xsdconfig</id>
  257. <phase>generate-sources</phase>
  258. <goals>
  259. <goal>run</goal>
  260. </goals>
  261. <configuration>
  262. <target>
  263. <copy todir="${basedir}/target/schemas">
  264. <fileset dir="${basedir}/../../src/ooxml/resources/org/apache/poi/schemas" excludes="XAdES*.xsd"/>
  265. </copy>
  266. </target>
  267. </configuration>
  268. </execution>
  269. <execution>
  270. <id>replace-xmltypeloader</id>
  271. <phase>process-sources</phase>
  272. <goals>
  273. <goal>run</goal>
  274. </goals>
  275. <configuration>
  276. <target>
  277. <!-- the space between "public static" is on purpose to prevent double execution -->
  278. <property name="loaderMethod"><![CDATA[
  279. private static java.lang.ref.SoftReference<org.apache.xmlbeans.SchemaTypeLoader> typeLoader;
  280. private static synchronized org.apache.xmlbeans.SchemaTypeLoader getTypeLoader() {
  281. org.apache.xmlbeans.SchemaTypeLoader stl = (typeLoader == null) ? null : typeLoader.get();
  282. if (stl == null) {
  283. stl = org.apache.xmlbeans.XmlBeans.typeLoaderForClassLoader(\2.class.getClassLoader());
  284. typeLoader = new java.lang.ref.SoftReference(stl);
  285. }
  286. return stl;
  287. }
  288. public static \2 newInstance\(\) \{]]></property>
  289. <fileset id="xsrc" dir="${basedir}/target/generated-sources/xmlbeans" includes="**/*.java" excludes="**/impl/**"/>
  290. <replaceregexp byline="true"
  291. match="(\s*)public static ([^ ]+) newInstance\(\) \{"
  292. replace="${loaderMethod}">
  293. <fileset refid="xsrc"/>
  294. </replaceregexp>
  295. <replace>
  296. <fileset refid="xsrc"/>
  297. <replacetoken>org.apache.xmlbeans.XmlBeans.getContextTypeLoader
  298. </replacetoken>
  299. <replacevalue>getTypeLoader</replacevalue>
  300. </replace>
  301. <!-- remove deprecated warnings, as we prefer the array methods - see #56854 -->
  302. <replace>
  303. <fileset refid="xsrc"/>
  304. <replacetoken><![CDATA[ * @deprecated
  305. ]]></replacetoken>
  306. </replace>
  307. </target>
  308. </configuration>
  309. </execution>
  310. <execution>
  311. <id>remove-xmltypeloader-from-schema-jar</id>
  312. <phase>prepare-package</phase>
  313. <goals>
  314. <goal>run</goal>
  315. </goals>
  316. <configuration>
  317. <target>
  318. <touch file="${basedir}/target/generated-sources/xmlbeans/.staleFlag"/>
  319. <delete dir="${basedir}/target/classes/org/apache"/>
  320. </target>
  321. </configuration>
  322. </execution>
  323. </executions>
  324. </plugin>
  325. </plugins>
  326. </build>
  327. <dependencies>
  328. <dependency>
  329. <groupId>org.apache.xmlbeans</groupId>
  330. <artifactId>xmlbeans</artifactId>
  331. <version>${xmlbeans.version}</version>
  332. </dependency>
  333. </dependencies>
  334. </profile>
  335. </profiles>
  336. </project>