aboutsummaryrefslogtreecommitdiffstats
path: root/sonar/ooxml-schema/pom.xml
blob: cbe50d65a05275f000c416faaf24d93cc69244f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<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.0-beta1-SNAPSHOT</version>
        <relativePath>..</relativePath>
    </parent>
    <artifactId>poi-ooxml-schema</artifactId>
    <packaging>jar</packaging>

    <name>Apache POI - Openxmlformats 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.xsdconfig>${basedir}/../../src/ooxml/resources/org/apache/poi/schemas/ooxmlSchemas.xsdconfig</xmlbeans.xsdconfig>
	</properties>

    <build>
		<plugins>
			<!-- Download and unpack the OfficeOpenXML Schema and use xmlbeans to create classes from the XSDs -->
			<plugin>
				<groupId>com.googlecode.maven-download-plugin</groupId>
				<artifactId>maven-download-plugin</artifactId>
				<version>${maven.plugin.download.version}</version>
				<executions>
					<execution>
						<id>download-xsds</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>wget</goal>
						</goals>
						<configuration>
							<url>http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%204%20(PDF).zip</url>
							<unpack>true</unpack>
							<md5>abe6bb6e7799e854934b3c634e8bcf7b</md5>
						</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>
						<configuration>
							<target>
								<echo message="unzip schemas" />
								<unzip src="target/OfficeOpenXML-XMLSchema.zip" dest="target/schemas" />
								<copy file="../../src/ooxml/resources/org/apache/poi/xdgf/visio.xsd"
									todir="target/schemas"/>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
    </build>

    <dependencies>
        <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>
        <dependency>
          <groupId>org.apache.xmlbeans</groupId>
          <artifactId>xmlbeans</artifactId>
          <version>${xmlbeans.version}</version>
        </dependency>
    </dependencies>
</project>