poi/sonar/ooxml-schema-security/pom.xml

109 lines
3.7 KiB
XML

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
<version>4.1.3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>poi-ooxml-schema-security</artifactId>
<packaging>jar</packaging>
<name>Apache POI - Openxmlformats Security-Schema package</name>
<properties>
<!-- see http://docs.codehaus.org/display/SONAR/Narrowing+the+Focus for details of this property -->
<sonar.exclusions>target/generated-sources/*</sonar.exclusions>
<maven.compiler.fork>true</maven.compiler.fork>
<xmlbeans.noUpa>true</xmlbeans.noUpa>
<xmlbeans.noPvr>true</xmlbeans.noPvr>
</properties>
<build>
<plugins>
<!-- Download and unpack the OfficeOpenXML Schema and use xmlbeans to create classes from the XSDs -->
<!-- use maven plugin instead of ant tasks get because of caching feature ... -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>${maven.plugin.download.version}</version>
<executions>
<execution>
<id>install-xsds-part-1</id>
<phase>generate-sources</phase>
<goals><goal>wget</goal></goals>
<configuration>
<url>https://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip</url>
<unpack>true</unpack>
<md5>c8f0eac388691d5be0d1647146400a10</md5>
</configuration>
</execution>
<execution>
<id>install-xsds-part-2</id>
<phase>generate-sources</phase>
<goals><goal>wget</goal></goals>
<configuration>
<outputDirectory>target/schemas</outputDirectory>
<url>https://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd</url>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven.plugin.antrun.version}</version>
<executions>
<execution>
<id>unzip-schema</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo message="unzip schemas" />
<unzip src="target/OpenPackagingConventions-XMLSchema.zip" dest="target/schemas/">
<patternset>
<include name="opc-digSig.xsd"/>
<include name="opc-relationships.xsd"/>
</patternset>
</unzip>
<copy todir="target/schemas">
<fileset dir="../../src/ooxml/resources/org/apache/poi">
<include name="poifs/crypt/signatureInfo.xsd"/>
<include name="schemas/XAdES*.xsd"/>
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>${xmlbeans.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>poi-main</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>