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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  4. http://maven.apache.org/maven-v4_0_0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>org.apache.poi</groupId>
  8. <artifactId>poi-parent</artifactId>
  9. <version>5.0.1-SNAPSHOT</version>
  10. <relativePath>..</relativePath>
  11. </parent>
  12. <artifactId>poi-ooxml-lite</artifactId>
  13. <packaging>jar</packaging>
  14. <name>Apache POI - Openxmlformats Schema package</name>
  15. <properties>
  16. <!-- see http://docs.codehaus.org/display/SONAR/Narrowing+the+Focus for details of this property -->
  17. <sonar.exclusions>target/generated-sources/*</sonar.exclusions>
  18. <maven.compiler.fork>true</maven.compiler.fork>
  19. </properties>
  20. <build>
  21. <plugins>
  22. <plugin>
  23. <artifactId>maven-antrun-plugin</artifactId>
  24. <version>${maven.plugin.antrun.version}</version>
  25. <executions>
  26. <execution>
  27. <id>copy-xmltype-and-xsdconfig</id>
  28. <phase>generate-sources</phase>
  29. <goals>
  30. <goal>run</goal>
  31. </goals>
  32. <configuration>
  33. <target>
  34. <property name="xsdir" value="${basedir}/../../poi-ooxml-full/src/main/xmlschema/org/apache/poi"/>
  35. <copy todir="${basedir}/target/schemas">
  36. <zipfileset src="${xsdir}/schemas/OfficeOpenXML-XMLSchema-Transitional.zip"/>
  37. <zipfileset src="${xsdir}/schemas/OpenPackagingConventions-XMLSchema.zip" includes="opc-digSig.xsd,opc-relationships.xsd"/>
  38. <fileset dir="${xsdir}/xdgf" includes="*.xsd,*.xsdconfig"/>
  39. <fileset dir="${xsdir}/schemas" includes="*.xsd,*.xsdconfig"/>
  40. <fileset dir="${xsdir}/poifs/crypt" includes="signatureInfo.xsd"/>
  41. </copy>
  42. </target>
  43. </configuration>
  44. </execution>
  45. </executions>
  46. </plugin>
  47. <plugin>
  48. <groupId>org.codehaus.mojo</groupId>
  49. <artifactId>exec-maven-plugin</artifactId>
  50. <version>3.0.0</version>
  51. <executions>
  52. <execution>
  53. <phase>process-sources</phase>
  54. <goals>
  55. <!-- need to use exec instead of java, because SchemaCompiler calls System.exit() -->
  56. <goal>exec</goal>
  57. </goals>
  58. </execution>
  59. </executions>
  60. <configuration>
  61. <executable>java</executable>
  62. <arguments>
  63. <argument>-classpath</argument>
  64. <!-- automatically creates the classpath using all project dependencies,
  65. also adding the project build directory -->
  66. <classpath/>
  67. <argument>org.apache.xmlbeans.impl.tool.SchemaCompiler</argument>
  68. <argument>-srconly</argument>
  69. <argument>-name</argument>
  70. <argument>ooxml</argument>
  71. <argument>-repackage</argument>
  72. <argument>org.apache.xmlbeans.metadata:org.apache.poi.schemas.ooxml</argument>
  73. <argument>-d</argument>
  74. <argument>${basedir}/target/generated-resources</argument>
  75. <argument>-src</argument>
  76. <argument>${basedir}/target/generated-sources</argument>
  77. <argument>${basedir}/target/schemas</argument>
  78. </arguments>
  79. </configuration>
  80. </plugin>
  81. <plugin>
  82. <groupId>org.codehaus.mojo</groupId>
  83. <artifactId>build-helper-maven-plugin</artifactId>
  84. <version>3.2.0</version>
  85. <executions>
  86. <execution>
  87. <id>add-source</id>
  88. <goals>
  89. <goal>add-source</goal>
  90. <goal>add-resource</goal>
  91. </goals>
  92. <configuration>
  93. <resources>
  94. <resource>
  95. <directory>${basedir}/target/generated-resources</directory>
  96. </resource>
  97. <resource>
  98. <directory>${basedir}/../../poi-ooxml-full/src/main/java9</directory>
  99. <targetPath>META-INF/versions/9</targetPath>
  100. <includes>
  101. <include>*.class</include>
  102. </includes>
  103. </resource>
  104. </resources>
  105. <sources>
  106. <source>${basedir}/target/generated-sources</source>
  107. </sources>
  108. </configuration>
  109. </execution>
  110. </executions>
  111. </plugin>
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-jar-plugin</artifactId>
  115. <version>3.2.0</version>
  116. <configuration>
  117. <archive>
  118. <manifestEntries>
  119. <Multi-Release>true</Multi-Release>
  120. <Automatic-Module-Name>org.apache.poi.ooxml.schemas</Automatic-Module-Name>
  121. </manifestEntries>
  122. </archive>
  123. </configuration>
  124. </plugin>
  125. </plugins>
  126. </build>
  127. <dependencies>
  128. <dependency>
  129. <groupId>${project.groupId}</groupId>
  130. <artifactId>poi-main</artifactId>
  131. <version>${project.version}</version>
  132. </dependency>
  133. <dependency>
  134. <groupId>${project.groupId}</groupId>
  135. <artifactId>poi-scratchpad</artifactId>
  136. <version>${project.version}</version>
  137. </dependency>
  138. <dependency>
  139. <groupId>org.apache.xmlbeans</groupId>
  140. <artifactId>xmlbeans</artifactId>
  141. <version>${xmlbeans.version}</version>
  142. </dependency>
  143. </dependencies>
  144. </project>