| @@ -292,6 +292,12 @@ | |||||
| <filename name="${optional.package}/Xalan2TraceSupport*"/> | <filename name="${optional.package}/Xalan2TraceSupport*"/> | ||||
| </selector> | </selector> | ||||
| <selector id="needs.xz"> | |||||
| <or> | |||||
| <filename name="${optional.package}/xz/Xz*"/> | |||||
| </or> | |||||
| </selector> | |||||
| <selector id="ant.launcher"> | <selector id="ant.launcher"> | ||||
| <filename name="${ant.package}/launch/"/> | <filename name="${ant.package}/launch/"/> | ||||
| </selector> | </selector> | ||||
| @@ -318,6 +324,7 @@ | |||||
| <selector refid="needs.junit4"/> | <selector refid="needs.junit4"/> | ||||
| <selector refid="needs.netrexx"/> | <selector refid="needs.netrexx"/> | ||||
| <selector refid="needs.swing"/> | <selector refid="needs.swing"/> | ||||
| <selector refid="needs.xz"/> | |||||
| <selector refid="ant.launcher"/> | <selector refid="ant.launcher"/> | ||||
| </or> | </or> | ||||
| </not> | </not> | ||||
| @@ -505,6 +512,9 @@ | |||||
| <available property="jsch.present" | <available property="jsch.present" | ||||
| classname="com.jcraft.jsch.Session" | classname="com.jcraft.jsch.Session" | ||||
| classpathref="classpath" ignoresystemclasses="${ignoresystemclasses}"/> | classpathref="classpath" ignoresystemclasses="${ignoresystemclasses}"/> | ||||
| <available property="xz.present" | |||||
| classname="org.tukaani.xz.XZOutputStream" | |||||
| classpathref="classpath" ignoresystemclasses="${ignoresystemclasses}"/> | |||||
| <property name="build.compiler" value="modern"/> | <property name="build.compiler" value="modern"/> | ||||
| @@ -592,6 +602,7 @@ | |||||
| <selector refid="needs.jdepend" unless="jdepend.present"/> | <selector refid="needs.jdepend" unless="jdepend.present"/> | ||||
| <selector refid="needs.swing" unless="swing.present"/> | <selector refid="needs.swing" unless="swing.present"/> | ||||
| <selector refid="needs.jsch" unless="jsch.present"/> | <selector refid="needs.jsch" unless="jsch.present"/> | ||||
| <selector refid="needs.xz" unless="xz.present"/> | |||||
| <selector refid="needs.xmlschema" unless="xmlschema.present"/> | <selector refid="needs.xmlschema" unless="xmlschema.present"/> | ||||
| <selector refid="needs.apache-xalan2" | <selector refid="needs.apache-xalan2" | ||||
| unless="recent.xalan2.present"/> | unless="recent.xalan2.present"/> | ||||
| @@ -764,6 +775,7 @@ | |||||
| <optional-jar dep="jsch"/> | <optional-jar dep="jsch"/> | ||||
| <optional-jar dep="jdepend"/> | <optional-jar dep="jdepend"/> | ||||
| <optional-jar dep="apache-xalan2"/> | <optional-jar dep="apache-xalan2"/> | ||||
| <optional-jar dep="xz"/> | |||||
| </target> | </target> | ||||
| @@ -857,6 +869,7 @@ | |||||
| <optional-src-jar dep="jsch"/> | <optional-src-jar dep="jsch"/> | ||||
| <optional-src-jar dep="jdepend"/> | <optional-src-jar dep="jdepend"/> | ||||
| <optional-src-jar dep="apache-xalan2"/> | <optional-src-jar dep="apache-xalan2"/> | ||||
| <optional-src-jar dep="xz"/> | |||||
| </target> | </target> | ||||
| @@ -334,8 +334,12 @@ Set -Ddest=LOCATION on the command line | |||||
| <get src="ftp://ftp.software.ibm.com/software/awdtools/netrexx/NetRexx.zip" dest="${temp.dir}/NetRexx.zip" skipexisting="true"/> | <get src="ftp://ftp.software.ibm.com/software/awdtools/netrexx/NetRexx.zip" dest="${temp.dir}/NetRexx.zip" skipexisting="true"/> | ||||
| </target> | </target> | ||||
| <target name="xz" depends="init" description="loads XZ for Java"> | |||||
| <f2 project="org.tukaani" archive="xz"/> | |||||
| </target> | |||||
| <target name="all" | <target name="all" | ||||
| description="load all the libraries (except jython)" | description="load all the libraries (except jython)" | ||||
| depends="ivy,logging,junit,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging,script,javamail,jspc,jai,netrexx" /> | |||||
| depends="ivy,logging,junit,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging,script,javamail,jspc,jai,netrexx,xz" /> | |||||
| </project> | </project> | ||||
| @@ -61,6 +61,7 @@ which.version=1.0 | |||||
| xalan.version=2.7.2 | xalan.version=2.7.2 | ||||
| xml-resolver.version=1.2 | xml-resolver.version=1.2 | ||||
| mail.version=1.4 | mail.version=1.4 | ||||
| xz.version=1.6 | |||||
| #paired | #paired | ||||
| jacl.version=1.2.6 | jacl.version=1.2.6 | ||||
| tcljava.version=${jacl.version} | tcljava.version=${jacl.version} | ||||
| @@ -158,6 +158,12 @@ | |||||
| <artifact name="ant-testutil" type="jar.asc" ext="jar.asc"/> | <artifact name="ant-testutil" type="jar.asc" ext="jar.asc"/> | ||||
| <artifact name="ant-testutil" type="source" ext="jar" e:classifier="sources" /> | <artifact name="ant-testutil" type="source" ext="jar" e:classifier="sources" /> | ||||
| <artifact name="ant-testutil" type="source.asc" ext="jar.asc" e:classifier="sources" /> | <artifact name="ant-testutil" type="source.asc" ext="jar.asc" e:classifier="sources" /> | ||||
| <artifact name="ant-xz" type="pom" ext="pom"/> | |||||
| <artifact name="ant-xz" type="pom.asc" ext="pom.asc"/> | |||||
| <artifact name="ant-xz" type="jar" ext="jar"/> | |||||
| <artifact name="ant-xz" type="jar.asc" ext="jar.asc"/> | |||||
| <artifact name="ant-xz" type="source" ext="jar" e:classifier="sources" /> | |||||
| <artifact name="ant-xz" type="source.asc" ext="jar.asc" e:classifier="sources" /> | |||||
| </publications> | </publications> | ||||
| <dependencies/> | <dependencies/> | ||||
| </ivy-module> | </ivy-module> | ||||
| @@ -0,0 +1,70 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!-- | |||||
| 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. | |||||
| --> | |||||
| <!-- | |||||
| This POM has been created manually by the Ant Development Team. | |||||
| Please contact us if you are not satisfied with the data contained in this POM. | |||||
| URL : http://ant.apache.org | |||||
| --> | |||||
| <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"> | |||||
| <parent> | |||||
| <groupId>org.apache.ant</groupId> | |||||
| <artifactId>ant-parent</artifactId> | |||||
| <relativePath>../pom.xml</relativePath> | |||||
| <version>1.10.1-SNAPSHOT</version> | |||||
| </parent> | |||||
| <modelVersion>4.0.0</modelVersion> | |||||
| <url>http://ant.apache.org/</url> | |||||
| <groupId>org.apache.ant</groupId> | |||||
| <artifactId>ant-xz</artifactId> | |||||
| <version>1.10.1-SNAPSHOT</version> | |||||
| <name>Apache Ant + XZ for Java</name> | |||||
| <description>contains the xz compression support</description> | |||||
| <dependencies> | |||||
| <dependency> | |||||
| <groupId>org.apache.ant</groupId> | |||||
| <artifactId>ant</artifactId> | |||||
| <version>1.10.1-SNAPSHOT</version> | |||||
| <scope>compile</scope> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.tukaani</groupId> | |||||
| <artifactId>xz</artifactId> | |||||
| <version>1.6</version> | |||||
| <scope>compile</scope> | |||||
| </dependency> | |||||
| </dependencies> | |||||
| <build> | |||||
| <plugins> | |||||
| <plugin> | |||||
| <groupId>org.apache.maven.plugins</groupId> | |||||
| <artifactId>maven-compiler-plugin</artifactId> | |||||
| <configuration> | |||||
| <includes> | |||||
| <include>org/apache/tools/ant/taskdefs/optional/xz/*</include> | |||||
| </includes> | |||||
| </configuration> | |||||
| </plugin> | |||||
| </plugins> | |||||
| <sourceDirectory>../../../../src/main</sourceDirectory> | |||||
| <testSourceDirectory>../../../../src/testcases</testSourceDirectory> | |||||
| <outputDirectory>../../../../target/${project.artifactId}/classes</outputDirectory> | |||||
| <testOutputDirectory>../../../../target/${project.artifactId}/testcases</testOutputDirectory> | |||||
| <directory>../../../../target/${project.artifactId}</directory> | |||||
| </build> | |||||
| </project> | |||||
| @@ -122,6 +122,7 @@ | |||||
| <exclude>org/apache/tools/ant/taskdefs/optional/NetRexxC*</exclude> | <exclude>org/apache/tools/ant/taskdefs/optional/NetRexxC*</exclude> | ||||
| <exclude>org/apache/tools/ant/taskdefs/optional/Xalan2TraceSupport*</exclude> | <exclude>org/apache/tools/ant/taskdefs/optional/Xalan2TraceSupport*</exclude> | ||||
| <exclude>org/apache/tools/ant/taskdefs/optional/jdepend/*</exclude> | <exclude>org/apache/tools/ant/taskdefs/optional/jdepend/*</exclude> | ||||
| <exclude>org/apache/tools/ant/taskdefs/optional/xz/*</exclude> | |||||
| </excludes> | </excludes> | ||||
| <testExcludes> | <testExcludes> | ||||
| <exclude>org/apache/tools/ant/filters/util/JavaClassHelper*</exclude> | <exclude>org/apache/tools/ant/filters/util/JavaClassHelper*</exclude> | ||||
| @@ -102,6 +102,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma | |||||
| <module>ant-netrexx</module> | <module>ant-netrexx</module> | ||||
| <module>ant-swing</module> | <module>ant-swing</module> | ||||
| <module>ant-testutil</module> | <module>ant-testutil</module> | ||||
| <module>ant-xz</module> | |||||
| </modules> | </modules> | ||||
| <dependencies> | <dependencies> | ||||
| <dependency> | <dependency> | ||||
| @@ -115,6 +115,7 @@ war=org.apache.tools.ant.taskdefs.War | |||||
| whichresource=org.apache.tools.ant.taskdefs.WhichResource | whichresource=org.apache.tools.ant.taskdefs.WhichResource | ||||
| xmlproperty=org.apache.tools.ant.taskdefs.XmlProperty | xmlproperty=org.apache.tools.ant.taskdefs.XmlProperty | ||||
| xslt=org.apache.tools.ant.taskdefs.XSLTProcess | xslt=org.apache.tools.ant.taskdefs.XSLTProcess | ||||
| xz=org.apache.tools.ant.taskdefs.optional.xz.Xz | |||||
| zip=org.apache.tools.ant.taskdefs.Zip | zip=org.apache.tools.ant.taskdefs.Zip | ||||
| # optional tasks | # optional tasks | ||||
| @@ -0,0 +1,67 @@ | |||||
| /* | |||||
| * 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. | |||||
| * | |||||
| */ | |||||
| package org.apache.tools.ant.taskdefs.optional.xz; | |||||
| import java.io.BufferedOutputStream; | |||||
| import java.io.FileOutputStream; | |||||
| import java.io.IOException; | |||||
| import org.apache.tools.ant.BuildException; | |||||
| import org.apache.tools.ant.util.FileUtils; | |||||
| import org.apache.tools.ant.taskdefs.Pack; | |||||
| import org.tukaani.xz.LZMA2Options; | |||||
| import org.tukaani.xz.XZOutputStream; | |||||
| /** | |||||
| * Compresses a file with the XZ algorithm. Normally used to compress | |||||
| * non-compressed archives such as TAR files. | |||||
| * | |||||
| * @since Ant 1.10.1 | |||||
| * | |||||
| * @ant.task category="packaging" | |||||
| */ | |||||
| public class Xz extends Pack { | |||||
| /** | |||||
| * Compress the zipFile. | |||||
| */ | |||||
| protected void pack() { | |||||
| XZOutputStream zOut = null; | |||||
| try { | |||||
| zOut = new XZOutputStream(new FileOutputStream(zipFile), | |||||
| new LZMA2Options()); | |||||
| zipResource(getSrcResource(), zOut); | |||||
| } catch (IOException ioe) { | |||||
| String msg = "Problem creating xz " + ioe.getMessage(); | |||||
| throw new BuildException(msg, ioe, getLocation()); | |||||
| } finally { | |||||
| FileUtils.close(zOut); | |||||
| } | |||||
| } | |||||
| /** | |||||
| * Whether this task can deal with non-file resources. | |||||
| * | |||||
| * <p>This implementation always returns true only.</p> | |||||
| * @return true | |||||
| */ | |||||
| protected boolean supportsNonFileResources() { | |||||
| return true; | |||||
| } | |||||
| } | |||||