1. support for the ooxml maven dependencies:

added pom templates for openxml4j and ooxml-schemas, the maven-ooxml-dependencies task generates m1 distrib for both 2. excluded jar-14 and compile-14 from the main distrib cycle \n


git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@708030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yegor Kozlov 2008-10-26 20:08:58 +00:00
parent 5965d73fd1
commit 9276e99d9d
4 changed files with 281 additions and 4 deletions

View File

@ -145,6 +145,14 @@ under the License.
<property name="ooxml.xsds.url" value="http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%20Part%204%20(DOCX).zip" />
<property name="ooxml.xsds.jar" location="${ooxml.lib}/ooxml-schemas.jar"/>
<!--
YK: OOXML requires two dependencies that are not in the Maven repository.
-->
<property name="maven.ooxml.xsds.version.id" value="1.0"/>
<property name="maven.ooxml.xsds.jar" value="ooxml-schemas-${maven.ooxml.xsds.version.id}.jar"/>
<property name="maven.openxml4j.version.id" value="1.0-beta"/>
<property name="maven.openxml4j.jar" value="openxml4j-${maven.openxml4j.version.id}.jar"/>
<property name="build.site" location="build/tmp/site/build/site"/>
<property name="build.site.src" location="build/tmp/site"/>
<property name="junit.report.dir" location="${build.site}/junit"/>
@ -156,6 +164,7 @@ under the License.
<property name="mavendist.dir" location="build/maven-dist"/>
<property name="mavendist.poi.dir" location="build/maven-dist/poi"/>
<property name="mavendist.oap.dir" location="build/maven-dist/org.apache.poi"/>
<property name="mavendist.ooxml.dir" location="build/maven-ooxml-dependencies"/>
<property name="jar.name" value="poi"/>
<property name="version.id" value="3.5-beta4"/>
<property name="halt.on.test.failure" value="true"/>
@ -411,7 +420,7 @@ under the License.
</xmlbean>
</target>
<target name="compile" depends="init, compile-main, compile-main-14,
<target name="compile" depends="init, compile-main,
compile-scratchpad, compile-contrib, compile-examples"
description="Compiles the POI main classes, scratchpad, contrib, and examples"/>
@ -1102,6 +1111,9 @@ FORREST_HOME environment variable!</echo>
<copy
file="${dist.dir}/${jar.name}-scratchpad-${version.id}-${DSTAMP}.jar"
tofile="${mavendist.oap.dir}/jars/${jar.name}-scratchpad-${version.id}.jar" />
<copy
file="${dist.dir}/${jar.name}-ooxml-${version.id}-${DSTAMP}.jar"
tofile="${mavendist.oap.dir}/jars/${jar.name}-ooxml-${version.id}.jar" />
<!-- TODO: Decide about source jars, and copy them if we have some -->
@ -1157,6 +1169,22 @@ FORREST_HOME environment variable!</echo>
</tokenfilter>
</filterchain>
</copy>
<!-- And the ooxml pom -->
<copy
file="maven/poi-ooxml.pom"
tofile="${mavendist.oap.dir}/poms/${jar.name}-ooxml-${version.id}.pom"
>
<filterchain>
<replacetokens>
<token key="VERSION" value="${version.id}" />
<token key="ARTIFICAT" value="poi-ooxml" />
</replacetokens>
<tokenfilter>
<replaceregex pattern="..-- START_NON_MAIN_DEPENDENCY --." replace="" flags="s"/>
<replaceregex pattern="..-- END_NON_MAIN_DEPENDENCY --." replace="" flags="s"/>
</tokenfilter>
</filterchain>
</copy>
<!-- Build the poi => org.apache.poi redirect poms -->
<!-- Copy from the base file, substituting in the version+artifact -->
@ -1191,7 +1219,29 @@ FORREST_HOME environment variable!</echo>
<!-- And that's it for maven -->
</target>
<target name="jar-14" depends="compile-main-14, compile-version" description="Creates the jdk 1.4 only jar file">
<target name="maven-ooxml-dependencies" description="Builds the POM files for OpenXml4J and compiled XmlBeans generated from the Ecma supplied xsds">
<!-- OpenXml4J -->
<copy file="${ooxml.jar6.dir}" tofile="${mavendist.ooxml.dir}/org.openxml4j/jars/${maven.openxml4j.jar}" />
<copy file="maven/openxml4j.pom" tofile="${mavendist.ooxml.dir}/org.openxml4j/poms/openxml4j-${maven.openxml4j.version.id}.pom">
<filterchain>
<replacetokens>
<token key="VERSION" value="${maven.openxml4j.version.id}" />
</replacetokens>
</filterchain>
</copy>
<!-- ooxml-schemas -->
<copy file="${ooxml.xsds.jar}" tofile="${mavendist.ooxml.dir}/org.apache.poi/jars/${maven.ooxml.xsds.jar}" />
<copy file="maven/ooxml-schemas.pom" tofile="${mavendist.ooxml.dir}/org.apache.poi/poms/ooxml-schemas-${maven.ooxml.xsds.version.id}.pom">
<filterchain>
<replacetokens>
<token key="VERSION" value="${maven.ooxml.xsds.version.id}" />
</replacetokens>
</filterchain>
</copy>
</target>
<target name="jar-14" depends="compile-main-14, compile-version" description="Creates the jdk 1.4 only jar file">
<jar destfile="${dist.dir}/${jar.name}-jdk14-${version.id}-${DSTAMP}.jar">
<fileset dir="${main14.output.dir}" />
<fileset dir="legal/" />
@ -1205,8 +1255,9 @@ FORREST_HOME environment variable!</echo>
<attribute name="Implementation-Vendor" value="Apache"/>
</manifest>
</jar>
</target>
<target name="jar" depends="compile, compile-version, jar-14, jar-ooxml" description="Creates jar files for distribution">
</target>
<target name="jar" depends="compile, compile-version, jar-ooxml" description="Creates jar files for distribution">
<jar destfile="${dist.dir}/${jar.name}-${version.id}-${DSTAMP}.jar">
<fileset dir="${main.output.dir}" />
<fileset dir="legal/" />

70
maven/ooxml-schemas.pom Executable file
View File

@ -0,0 +1,70 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>@VERSION@</version>
<packaging>jar</packaging>
<name>OOXML schemas</name>
<description>XmlBeans generated from the Ecma supplied xsds:
http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%20Part%204%20(DOCX).zip</description>
<url>http://poi.apache.org/</url>
<mailingLists>
<mailingList>
<name>POI Users List</name>
<subscribe>user-subscribe@poi.apache.org</subscribe>
<unsubscribe>user-unsubscribe@poi.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/poi-user/</archive>
</mailingList>
<mailingList>
<name>POI Developer List</name>
<subscribe>dev-subscribe@poi.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@poi.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/poi-dev/</archive>
</mailingList>
</mailingLists>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<dependencies>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
</project>

70
maven/openxml4j.pom Executable file
View File

@ -0,0 +1,70 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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>
<groupId>org.openxml4j</groupId>
<artifactId>openxml4j</artifactId>
<version>@VERSION@</version>
<packaging>jar</packaging>
<name>OpenXML4J</name>
<url>http://openxml4j.org/</url>
<description>Office Open XML File Format library for Java</description>
<mailingLists>
<mailingList>
<name>OpenXML4J Users List</name>
<archive>http://sourceforge.net/mailarchive/forum.php?forum_name=openxml4j-users</archive>
</mailingList>
<mailingList>
<name>OpenXML4J Developer List</name>
<archive>http://sourceforge.net/mailarchive/forum.php?forum_name=openxml4j-devs</archive>
</mailingList>
</mailingLists>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>OpenXML4J</name>
<url>http://www.openxml4j.org/</url>
</organization>
<dependencies>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
</dependency>
</dependencies>
</project>

86
maven/poi-ooxml.pom Executable file
View File

@ -0,0 +1,86 @@
:tab<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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>
<groupId>org.apache.poi</groupId>
<artifactId>@ARTIFICAT@</artifactId>
<version>@VERSION@</version>
<packaging>jar</packaging>
<name>Apache POI</name>
<url>http://poi.apache.org/</url>
<description>Apache POI - Java API To Access Microsoft Format Files</description>
<mailingLists>
<mailingList>
<name>OpenXML4J Users List</name>
<archive>http://sourceforge.net/mailarchive/forum.php?forum_name=openxml4j-users</archive>
</mailingList>
<mailingList>
<name>OpenXML4J Developer List</name>
<archive>http://sourceforge.net/mailarchive/forum.php?forum_name=openxml4j-devs</archive>
</mailingList>
<mailingList>
<name>POI Developer List</name>
<subscribe>dev-subscribe@poi.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@poi.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/poi-dev/</archive>
</mailingList>
</mailingLists>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<dependencies>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>@VERSION@</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>openxml4j</artifactId>
<version>@VERSION@</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>@VERSION@</version>
</dependency>
</dependencies>
</project>