Skip to content
Commits on Source (13)
# 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.
language: java
sudo: false
jdk:
- openjdk7
- oraclejdk8
- oraclejdk9
after_success:
- mvn clean test jacoco:report coveralls:report -Ptravis-jacoco
\ No newline at end of file
<!---
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 FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
|**** DO NOT EDIT DIRECTLY ****|
|**** ****|
+======================================================================+
| TEMPLATE FILE: contributing-md-template.md |
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+======================================================================+
| |
| 1) Re-generate using: mvn commons:contributing-md |
| |
| 2) Set the following properties in the component's pom: |
| - commons.jira.id (required, alphabetic, upper case) |
| |
| 3) Example Properties |
| |
| <properties> |
| <commons.jira.id>MATH</commons.jira.id> |
| </properties> |
| |
+======================================================================+
--->
Contributing to Apache Commons FileUpload
======================
You have found a bug or you have an idea for a cool new feature? Contributing code is a great way to give something back to
the open source community. Before you dig right into the code there are a few guidelines that we need contributors to
follow so that we can have a chance of keeping on top of things.
Getting Started
---------------
+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
+ Make sure you have a [GitHub account](https://github.com/signup/free).
+ If you're planning to implement a new feature it makes sense to discuss you're changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons FileUpload's scope.
+ Submit a ticket for your issue, assuming one does not already exist.
+ Clearly describe the issue including steps to reproduce when it is a bug.
+ Make sure you fill in the earliest version that you know has the issue.
+ Fork the repository on GitHub.
Making Changes
--------------
+ Create a topic branch from where you want to base your work (this is usually the master/trunk branch).
+ Make commits of logical units.
+ Respect the original code style:
+ Only use spaces for indentation.
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
+ Check for unnecessary whitespace with git diff --check before committing.
+ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue.
+ Make sure you have added the necessary tests for your changes.
+ Run all the tests with `mvn clean verify` to assure nothing else was accidentally broken.
Making Trivial Changes
----------------------
For changes of a trivial nature to comments and documentation, it is not always necessary to create a new ticket in JIRA.
In this case, it is appropriate to start the first line of a commit with '(doc)' instead of a ticket number.
Submitting Changes
------------------
+ Sign the [Contributor License Agreement][cla] if you haven't already.
+ Push your changes to a topic branch in your fork of the repository.
+ Submit a pull request to the repository in the apache organization.
+ Update your JIRA ticket and include a link to the pull request in the ticket.
Additional Resources
--------------------
+ [Contributing patches](https://commons.apache.org/patches.html)
+ [Apache Commons FileUpload JIRA project page](https://issues.apache.org/jira/browse/FILEUPLOAD)
+ [Contributor License Agreement][cla]
+ [General GitHub documentation](https://help.github.com/)
+ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+ #apachecommons IRC channel on freenode.org
[cla]:https://www.apache.org/licenses/#clas
Apache Commons FileUpload
Copyright 2002-2017 The Apache Software Foundation
Copyright 2002-2018 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
<!---
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 FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
|**** DO NOT EDIT DIRECTLY ****|
|**** ****|
+======================================================================+
| TEMPLATE FILE: readme-md-template.md |
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+======================================================================+
| |
| 1) Re-generate using: mvn commons:readme-md |
| |
| 2) Set the following properties in the component's pom: |
| - commons.componentid (required, alphabetic, lower case) |
| - commons.release.version (required) |
| |
| 3) Example Properties |
| |
| <properties> |
| <commons.componentid>math</commons.componentid> |
| <commons.release.version>1.2</commons.release.version> |
| </properties> |
| |
+======================================================================+
--->
Apache Commons FileUpload
===================
[![Build Status](https://travis-ci.org/apache/commons-fileupload.svg?branch=master)](https://travis-ci.org/apache/commons-fileupload)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/commons-fileupload/commons-fileupload/badge.svg)](https://maven-badges.herokuapp.com/maven-central/commons-fileupload/commons-fileupload/)
The Apache Commons FileUpload component provides a simple yet flexible means of adding support for multipart
file upload functionality to servlets and web applications.
Documentation
-------------
More information can be found on the [Apache Commons FileUpload homepage](https://commons.apache.org/proper/commons-fileupload).
The [Javadoc](https://commons.apache.org/proper/commons-fileupload/javadocs/api-release) can be browsed.
Questions related to the usage of Apache Commons FileUpload should be posted to the [user mailing list][ml].
Where can I get the latest release?
-----------------------------------
You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-fileupload/download_fileupload.cgi).
Alternatively you can pull it from the central Maven repositories:
```xml
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.4</version>
</dependency>
```
Contributing
------------
We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
There are some guidelines which will make applying PRs easier for us:
+ No tabs! Please use spaces for indentation.
+ Respect the code style.
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
License
-------
This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
See the `NOTICE.txt` file for required notices and attributions.
Donations
---------
You like Apache Commons FileUpload? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
Additional Resources
--------------------
+ [Apache Commons Homepage](https://commons.apache.org/)
+ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/FILEUPLOAD)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+ `#apache-commons` IRC channel on `irc.freenode.org`
[ml]:https://commons.apache.org/mail-lists.html
Apache Commons FileUpload 1.4 RELEASE NOTES
The Apache Commons FileUpload team is pleased to announce the release of Apache Commons FileUpload 1.4.
The Apache Commons FileUpload component provides a simple yet flexible means of
adding support for multipart file upload functionality to servlets and web
applications. Version 1.3 onwards requires Java 6 or later.
No client code changes are required to migrate from version 1.3.0 to 1.3.1.
1.4 Release
Changes in version 1.4 include:
New features:
o Site: added security report
Fixed Bugs:
o FILEUPLOAD-252: DiskFileItem#write() could lose original IO exception
o FILEUPLOAD-258: DiskFileItem#getStoreLocation() wrongly returned a File object for items stored in memory
o FILEUPLOAD-242: FileUploadBase - should not silently catch and ignore all Throwables
o FILEUPLOAD-257: Fix Javadoc 1.8.0 errors
o FILEUPLOAD-234: Fix section "Resource cleanup" of the user guide
o FILEUPLOAD-237: Fix streaming example: use FileItem.getInputStream() instead of openStream()
o FILEUPLOAD-248: DiskFileItem might suppress critical IOExceptions on rename - use FileUtil.move instead
o FILEUPLOAD-251: DiskFileItem#getTempFile() is broken
o FILEUPLOAD-250: FileUploadBase - potential resource leak - InputStream not closed on exception
o FILEUPLOAD-244: DiskFileItem.readObject fails to close FileInputStream
o FILEUPLOAD-245: DiskFileItem.get() may not fully read the data
Changes:
o FILEUPLOAD-292: Don't create un-needed resources in FileUploadBase.java
o FILEUPLOAD-282: Upversion complier.source, compiler.target to 1.6
o FILEUPLOAD-246: FileUpload should use IOUtils.closeQuietly where relevant
o FILEUPLOAD-243: Make some MultipartStream private fields final Thanks to Ville Skyttä.
For complete information on Apache Commons FileUpload, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Commons FileUpload website:
http://commons.apache.org/proper/commons-fileupload/
------------------------------------------------------------------------------
Apache Commons FileUpload 1.3.3 RELEASE NOTES
The Apache Commons FileUpload team is pleased to announce the release of Apache Commons FileUpload 1.3.3.
......@@ -13,6 +58,20 @@ Changes in version 1.3.3 include:
o FILEUPLOAD-279: DiskFileItem can no longer be deserialized, unless a particular system property is set.
For complete information on Apache Commons FileUpload, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Commons FileUpload website:
http://commons.apache.org/proper/commons-fileupload/
------------------------------------------------------------------------------
No client code changes are required to migrate from version 1.3.1 to 1.3.2.
Changes in version 1.3.2 include:
o FILEUPLOAD-272: Performance Improvement in MultipartStream. Prevents a DoS (CVE-2016-3092)
For complete information on Apache Commons FileUpload, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Commons FileUpload website:
......
<?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.
-->
<!--
WARNING: This file is generated! Do not edit by hand!
-->
<project name="maven" default="jar" basedir=".">
<target name="jar">
<property name="maven.build.dir" value="target" />
<property name="maven.build.dest" value="${maven.build.dir}/classes" />
<mkdir dir="${maven.build.dest}" />
<javac
destdir="${maven.build.dest}"
excludes="**/package.html"
debug="false"
deprecation="false"
optimize="false">
<src>
<pathelement location="src/java" />
</src>
</javac>
<jar
jarfile="${maven.build.dir}/${maven.final.name}.jar"
basedir="${maven.build.dest}"
excludes="**/package.html"
/>
</target>
</project>
# 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.
#Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE!
#Fri Mar 08 12:53:27 CET 2013
commons.compiler.compilerVersion=
maven.compile.source=1.5
commons.release.2.name=commons-fileupload-${commons.release.2.version}
commons.release.desc=
maven.build.srcDir.0=src/main/java
commons.binary.suffix=-bin
commons.manifestfile=${maven.build.outputDir}/osgi/MANIFEST.MF
maven.build.timestamp.format=yyyy-MM-dd HH\:mm\:ssZ
commons.project-info.version=2.6
maven.build.resourceDir.1=.
maven.build.resourceDir.0=src/main/resources
project.build.sourceEncoding=iso-8859-1
sourceReleaseAssemblyDescriptor=source-release
commons.release.3.name=commons-fileupload-${commons.release.3.version}
maven.build.outputDir=${maven.build.dir}/classes
commons.componentid=fileupload
commons.site.path=commons-fileupload
maven.repo.local=${user.home}/.m2/repository
maven.build.finalName=commons-fileupload-1.3-SNAPSHOT
commons.osgi.private=
maven.build.testDir.0=src/test/java
commons.javadoc.javaee.link=http\://download.oracle.com/javaee/6/api/
commons.osgi.export=org.apache.commons.*;version\=1.3-SNAPSHOT;-noimport\:\=true
commons.release.2.binary.suffix=-bin
maven.reporting.outputDirectory=${maven.build.dir}/site
commons.compiler.javac=
commons.encoding=iso-8859-1
organization.logo=http\://www.apache.org/images/asf_logo_wide.gif
commons.scmPubUrl=https\://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-fileupload
sonar.host.url=https\://analysis.apache.org/
commons.rc.version=RC1
commons.cobertura.version=2.5.2
commons.release.name=commons-fileupload-1.3
minSeverity=info
maven.build.testOutputDir=${maven.build.dir}/test-classes
project.reporting.outputEncoding=iso-8859-1
maven.build.dir=target
maven.test.reports=${maven.build.dir}/test-reports
gpg.useagent=true
commons.javadoc.version=2.9
commons.surefire.version=2.13
commons.changes.version=2.8
commons.release.version=1.3
commons.jxr.version=2.3
commons.surefire-report.version=2.13
commons.rat.version=0.8
commons.site.cache=/Users/stripodi/commons-sites
project.build.outputDirectory=${maven.build.outputDir}
commons.docEncoding=iso-8859-1
commons.javadoc.java.link=http\://download.oracle.com/javase/6/docs/api/
commons.deployment.protocol=scp
maven.settings.offline=false
distMgmtSnapshotsName=Apache Development Snapshot Repository
maven.settings.interactiveMode=true
maven.compile.target=1.5
commons.release.2.desc=
commons.jira.pid=12310476
project.build.directory=${maven.build.dir}
arguments=
commons.surefire-report.aggregate=false
commons.release.3.binary.suffix=-bin
commons.wagon-ssh.version=2.3
distMgmtSnapshotsUrl=https\://repository.apache.org/content/repositories/snapshots
maven.build.testResourceDir.1=.
maven.build.testResourceDir.0=src/test/resources
commons.osgi.dynamicImport=javax.portlet
commons.compiler.fork=false
commons.jdepend.version=2.0-beta-2
commons.release.3.desc=
implementation.build=${scmBranch}@r${buildNumber}; 2013-03-08 12\:53\:21+0100
commons.site-plugin.version=3.2
commons.osgi.symbolicName=org.apache.commons.fileupload
commons.surefire.java=
commons.osgi.import=\!javax.portlet,*
commons.jira.id=FILEUPLOAD
commons.clirr.version=2.5
<?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.
-->
<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
<!-- ====================================================================== -->
<!-- -->
<!-- Any modifications will be overwritten. -->
<!-- -->
<!-- Generated by Maven Ant Plugin on 3/8/13 12:53 PM -->
<!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ -->
<!-- -->
<!-- ====================================================================== -->
<project name="commons-fileupload-from-maven" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="${user.home}/.m2/maven.properties"/>
<property file="build.properties"/>
<property name="maven.build.finalName" value="commons-fileupload-1.3-SNAPSHOT"/>
<property name="maven.build.dir" value="target"/>
<property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
<property name="maven.build.srcDir.0" value="src/main/java"/>
<property name="maven.build.resourceDir.0" value="src/main/resources"/>
<property name="maven.build.resourceDir.1" value="."/>
<property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
<property name="maven.build.testDir.0" value="src/test/java"/>
<property name="maven.build.testResourceDir.0" value="src/test/resources"/>
<property name="maven.build.testResourceDir.1" value="."/>
<property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
<property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>
<property name="maven.repo.local" value="${user.home}/.m2/repository"/>
<property name="maven.settings.offline" value="false"/>
<property name="maven.settings.interactiveMode" value="true"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<pathelement location="${maven.repo.local}/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
<pathelement location="${maven.repo.local}/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"/>
<pathelement location="${maven.repo.local}/commons-io/commons-io/2.2/commons-io-2.2.jar"/>
</path>
<path id="build.test.classpath">
<pathelement location="${maven.repo.local}/junit/junit/4.11/junit-4.11.jar"/>
<pathelement location="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
<pathelement location="${maven.repo.local}/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
<pathelement location="${maven.repo.local}/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"/>
<pathelement location="${maven.repo.local}/commons-io/commons-io/2.2/commons-io-2.2.jar"/>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${maven.build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" depends="get-deps" description="Compile the code">
<mkdir dir="${maven.build.outputDir}"/>
<javac destdir="${maven.build.outputDir}"
encoding="iso-8859-1"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="1.5"
verbose="false"
fork="false"
source="1.5">
<src>
<pathelement location="${maven.build.srcDir.0}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<mkdir dir="${maven.build.outputDir}/META-INF"/>
<copy todir="${maven.build.outputDir}/META-INF">
<fileset dir="${maven.build.resourceDir.1}">
<include name="NOTICE.txt"/>
<include name="LICENSE.txt"/>
</fileset>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Test-compilation target -->
<!-- ====================================================================== -->
<target name="compile-tests"
depends="compile"
description="Compile the test code"
unless="maven.test.skip">
<mkdir dir="${maven.build.testOutputDir}"/>
<javac destdir="${maven.build.testOutputDir}"
encoding="iso-8859-1"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="1.5"
verbose="false"
fork="false"
source="1.5">
<src>
<pathelement location="${maven.build.testDir.0}"/>
</src>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${maven.build.outputDir}"/>
</classpath>
</javac>
<mkdir dir="${maven.build.testOutputDir}/META-INF"/>
<copy todir="${maven.build.testOutputDir}/META-INF">
<fileset dir="${maven.build.testResourceDir.1}">
<include name="NOTICE.txt"/>
<include name="LICENSE.txt"/>
</fileset>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Run all tests -->
<!-- ====================================================================== -->
<target name="test"
depends="compile-tests, junit-missing"
unless="junit.skipped"
description="Run the test cases">
<mkdir dir="${maven.test.reports}"/>
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
<sysproperty key="basedir" value="."/>
<formatter type="xml"/>
<formatter type="plain" usefile="false"/>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${maven.build.outputDir}"/>
<pathelement location="${maven.build.testOutputDir}"/>
</classpath>
<batchtest todir="${maven.test.reports}" unless="test">
<fileset dir="${maven.build.testDir.0}">
<include name="**/Test*.java"/>
<include name="**/*Test.java"/>
<include name="**/*TestCase.java"/>
<exclude name="**/*Abstract*Test.java"/>
</fileset>
</batchtest>
<batchtest todir="${maven.test.reports}" if="test">
<fileset dir="${maven.build.testDir.0}">
<include name="**/${test}.java"/>
<exclude name="**/*Abstract*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="test-junit-present">
<available classname="junit.framework.Test" property="junit.present"/>
</target>
<target name="test-junit-status"
depends="test-junit-present">
<condition property="junit.missing">
<and>
<isfalse value="${junit.present}"/>
<isfalse value="${maven.test.skip}"/>
</and>
</condition>
<condition property="junit.skipped">
<or>
<isfalse value="${junit.present}"/>
<istrue value="${maven.test.skip}"/>
</or>
</condition>
</target>
<target name="junit-missing"
depends="test-junit-status"
if="junit.missing">
<echo>=================================== WARNING ===================================</echo>
<echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo>
<echo>===============================================================================</echo>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${maven.build.srcDir.0}"
packagenames="*"
destdir="${maven.reporting.outputDirectory}/apidocs"
access="protected"
old="false"
verbose="false"
encoding="iso-8859-1"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
charset="ISO-8859-1"
docencoding="iso-8859-1"
source="1.5"
linksource="true"
breakiterator="false">
<link href="http://download.oracle.com/javase/6/docs/api/"/>
<link href="http://download.oracle.com/javaee/6/api/"/>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile,test" description="Package the application">
<jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar"
compress="true"
index="false"
manifest="${commons.manifestfile}"
basedir="${maven.build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Main-Class"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
<!-- ====================================================================== -->
<!-- Download dependencies target -->
<!-- ====================================================================== -->
<target name="test-offline">
<condition property="maven.mode.offline">
<equals arg1="${maven.settings.offline}" arg2="true"/>
</condition>
</target>
<target name="get-deps"
depends="test-offline"
description="Download all dependencies"
unless="maven.mode.offline">
<mkdir dir="${maven.repo.local}"/>
<mkdir dir="${maven.repo.local}/junit/junit/4.11"/>
<get src="http://repository.apache.org/snapshots/junit/junit/4.11/junit-4.11.jar"
dest="${maven.repo.local}/junit/junit/4.11/junit-4.11.jar"
usetimestamp="false"
ignoreerrors="true"/>
<get src="http://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.jar"
dest="${maven.repo.local}/junit/junit/4.11/junit-4.11.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3"/>
<get src="http://repository.apache.org/snapshots/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
dest="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
<get src="http://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
dest="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/javax/servlet/servlet-api/2.4"/>
<get src="http://repository.apache.org/snapshots/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"
dest="${maven.repo.local}/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"
usetimestamp="false"
ignoreerrors="true"/>
<get src="http://repo.maven.apache.org/maven2/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"
dest="${maven.repo.local}/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/portlet-api/portlet-api/1.0"/>
<get src="http://repository.apache.org/snapshots/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"
dest="${maven.repo.local}/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"
usetimestamp="false"
ignoreerrors="true"/>
<get src="http://repo.maven.apache.org/maven2/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"
dest="${maven.repo.local}/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/commons-io/commons-io/2.2"/>
<get src="http://repository.apache.org/snapshots/commons-io/commons-io/2.2/commons-io-2.2.jar"
dest="${maven.repo.local}/commons-io/commons-io/2.2/commons-io-2.2.jar"
usetimestamp="false"
ignoreerrors="true"/>
<get src="http://repo.maven.apache.org/maven2/commons-io/commons-io/2.2/commons-io-2.2.jar"
dest="${maven.repo.local}/commons-io/commons-io/2.2/commons-io-2.2.jar"
usetimestamp="false"
ignoreerrors="true"/>
</target>
</project>
libcommons-fileupload-java (1.4-1) unstable; urgency=medium
* New upstream release
- Refreshed the patch
- Fixed the compatibility with the Portlet API 2.0
* Removed Damien Raude-Morvan from the uploaders (Closes: #889439)
* Standards-Version updated to 4.5.0
* Switch to debhelper level 11
* Use salsa.debian.org Vcs-* URLs
* Use a secure watch URL
-- Emmanuel Bourg <ebourg@apache.org> Mon, 27 Jan 2020 13:19:30 +0100
libcommons-fileupload-java (1.3.3-1) unstable; urgency=medium
* Team upload.
......
......@@ -2,11 +2,9 @@ Source: libcommons-fileupload-java
Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders:
Damien Raude-Morvan <drazzib@debian.org>,
Emmanuel Bourg <ebourg@apache.org>
Uploaders: Emmanuel Bourg <ebourg@apache.org>
Build-Depends:
debhelper (>= 10),
debhelper (>= 11),
default-jdk,
junit4,
libcommons-io-java,
......@@ -14,9 +12,9 @@ Build-Depends:
libportlet-api-2.0-spec-java,
libservlet3.1-java,
maven-debian-helper (>= 2.0)
Standards-Version: 4.0.0
Vcs-Git: https://anonscm.debian.org/git/pkg-java/libcommons-fileupload-java.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/libcommons-fileupload-java.git
Standards-Version: 4.5.0
Vcs-Git: https://salsa.debian.org/java-team/libcommons-fileupload-java.git
Vcs-Browser: https://salsa.debian.org/java-team/libcommons-fileupload-java
Homepage: http://commons.apache.org/fileupload/
Package: libcommons-fileupload-java
......
......@@ -4,6 +4,7 @@ Upstream-Contact: Apache Commons Developers <dev@commons.apache.org>
Source: http://www.apache.org/dist/commons/fileupload/
Files-Excluded: .idea
*.iml
site-content/*
Files: *
Copyright: 2002-2013, The Apache Software Foundation.
......
com.github.siom79.japicmp japicmp-maven-plugin * * *
junit junit maven-plugin * * *
org.apache.maven.plugins maven-assembly-plugin maven-plugin * * *
org.apache.maven.plugins maven-changes-plugin maven-plugin * * *
org.apache.maven.plugins maven-checkstyle-plugin maven-plugin * * *
org.apache.maven.plugins maven-pmd-plugin maven-plugin * * *
org.apache.maven.plugins maven-release-plugin maven-plugin * * *
org.apache.rat apache-rat-plugin * * *
org.codehaus.mojo clirr-maven-plugin * * *
......@@ -26,9 +26,9 @@ Forwarded: not-needed
import javax.servlet.http.HttpSession;
+import javax.servlet.http.Part;
/**
* @version $Id$
@@ -221,6 +230,10 @@
public class MockHttpServletRequest implements HttpServletRequest {
@@ -239,6 +248,10 @@
return null;
}
......@@ -39,7 +39,7 @@ Forwarded: not-needed
/**
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdValid()
*/
@@ -296,6 +309,10 @@
@@ -323,6 +336,10 @@
return iLength;
}
......@@ -50,7 +50,7 @@ Forwarded: not-needed
/**
* For testing attack scenarios in SizesTest.
*/
@@ -485,6 +502,56 @@
@@ -536,6 +553,56 @@
return null;
}
......@@ -107,7 +107,7 @@ Forwarded: not-needed
private static class MyServletInputStream
extends javax.servlet.ServletInputStream {
@@ -513,6 +580,17 @@
@@ -564,6 +631,17 @@
return in.read(b, off, len);
}
......
Description: Fixes the compatibility with the Portlet API 2.0
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/test/java/org/apache/commons/fileupload/portlet/MockPortletActionRequest.java
+++ b/src/test/java/org/apache/commons/fileupload/portlet/MockPortletActionRequest.java
@@ -268,4 +268,28 @@
this.characterEncoding = characterEncoding;
}
+ @Override
+ public String getMethod() {
+ return "GET";
+ }
+
+ @Override
+ public javax.servlet.http.Cookie[] getCookies() {
+ return null;
+ }
+
+ @Override
+ public Map<String,String[]> getPublicParameterMap() {
+ return null;
+ }
+
+ @Override
+ public Map<String,String[]> getPrivateParameterMap() {
+ return null;
+ }
+
+ @Override
+ public String getWindowID() {
+ return null;
+ }
}
001_update-tests-for-servlet3-api.patch
002_portlet-api-compatibility.patch
#!/usr/bin/make -f
%:
dh $@ --buildsystem=maven
dh $@
override_dh_installchangelogs:
dh_installchangelogs -- RELEASE-NOTES.txt
get-orig-source:
uscan --download-current-version --force-download --rename --repack --compression xz
version=3
http://archive.apache.org/dist/commons/fileupload/source/commons-fileupload-([\.\d]+)-src.tar.gz debian uupdate
https://archive.apache.org/dist/commons/fileupload/source/commons-fileupload-([\.\d]+)-src.tar.gz
<?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.
-->
<module name="commons-fileupload">
<description>File upload component.</description>
<url href="http://commons.apache.org/fileupload/" />
<cvs repository="jakarta" />
<!-- This is really the cvs module. We need to change this but -->
<!-- I will leave this for now until everything works. -->
<project name="commons-fileupload">
<!-- Standard Maven target to produce Javadocs, source -->
<!-- and binary distributions. -->
<ant buildfile="build-gump.xml" target="jar">
<property name="maven.final.name" value="commons-fileupload-@@DATE@@" />
</ant>
<package>org.apache.commons.fileupload</package>
<!-- All Maven projects need Ant and Xerces to build. -->
<depend project="jakarta-ant" inherit="runtime" />
<depend project="xml-xerces" />
<depend project="jaf" />
<depend project="servletapi" />
<work nested="target/classes" />
<home nested="target" />
<jar name="commons-fileupload-@@DATE@@.jar" />
<javadoc nested="docs/apidocs" />
<nag from="Maven Developers &lt;turbine-maven-dev@jakarta.apache.org&gt;"
to="dev@commons.apache.org" />
</project>
</module>
......@@ -21,12 +21,12 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>41</version>
<version>47</version>
</parent>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
<version>1.4</version>
<name>Apache Commons FileUpload</name>
<description>
......@@ -101,7 +101,6 @@
<name>Rob Tompkins</name>
<id>chtompki</id>
<email>chtompki@apache.org</email>
<organization />
</developer>
</developers>
......@@ -154,6 +153,10 @@
<name>frank</name>
<email>mailsurfie@gmail.com</email>
</contributor>
<contributor>
<name>maxxedev</name>
<email>maxxedev@gmail.com</email>
</contributor>
<contributor>
<name>Rafal Krzewski</name>
<email>Rafal.Krzewski@e-point.pl</email>
......@@ -170,32 +173,55 @@
<name>David Sean Taylor</name>
<email>taylor@apache.org</email>
</contributor>
<contributor>
<name>fangwentong</name>
<email>fangwentong2012@gmail.com</email>
</contributor>
</contributors>
<scm>
<connection>scm:git:http://git-wip-us.apache.org/repos/asf/commons-fileupload.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/commons-fileupload.git</developerConnection>
<url>https://git-wip-us.apache.org/repos/asf?p=commons-fileupload.git</url>
<tag>commons-fileupload-1.3.3-RC6</tag>
</scm>
<issueManagement>
<system>jira</system>
<url>http://issues.apache.org/jira/browse/FILEUPLOAD</url>
</issueManagement>
<distributionManagement>
<site>
<id>apache.website</id>
<name>Apache Commons Site</name>
<url>scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-fileupload/</url>
</site>
</distributionManagement>
<properties>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
<maven.compile.encoding>ISO-8859-1</maven.compile.encoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<commons.componentid>fileupload</commons.componentid>
<commons.release.version>1.3.3</commons.release.version>
<commons.rc.version>RC1</commons.rc.version>
<commons.module.name>org.apache.commons.fileupload</commons.module.name>
<commons.release.desc>(requires Java ${maven.compiler.target} or later)</commons.release.desc>
<commons.jira.id>FILEUPLOAD</commons.jira.id>
<commons.jira.pid>12310476</commons.jira.pid>
<commons.site.path>fileupload</commons.site.path>
<commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-fileupload</commons.scmPubUrl>
<commons.scmPubCheckoutDirectory>site-content</commons.scmPubCheckoutDirectory>
<commons.osgi.export>!org.apache.commons.fileupload.util.mime,org.apache.commons.*;version=${project.version};-noimport:=true</commons.osgi.export>
<commons.osgi.import>!javax.portlet,*</commons.osgi.import>
<commons.osgi.dynamicImport>javax.portlet</commons.osgi.dynamicImport>
<project.scm.id>git-wip-us.apache.org</project.scm.id>
<commons.japicmp.version>0.13.0</commons.japicmp.version>
<japicmp.skip>true</japicmp.skip>
<!-- Commons Release Plugin -->
<commons.release.version>1.4</commons.release.version>
<commons.bc.version>1.3.3</commons.bc.version>
<commons.rc.version>RC2</commons.rc.version>
<commons.release.isDistModule>true</commons.release.isDistModule>
<commons.distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}</commons.distSvnStagingUrl>
<commons.releaseManagerName>Rob Tompkins</commons.releaseManagerName>
<commons.releaseManagerKey>B6E73D84EA4FCC47166087253FAAD2CD5ECBB314</commons.releaseManagerKey>
</properties>
<dependencies>
......@@ -247,10 +273,21 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<tagBase>https://svn.apache.org/repos/asf/commons/proper/fileupload/tags</tagBase>
<excludes>
<exclude>site-content/**</exclude>
<exclude>src/site/resources/download_lang.cgi</exclude>
<exclude>src/checkstyle/license-header.txt</exclude>
</excludes>
</configuration>
</plugin><!-- override skip property of parent pom -->
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
......@@ -263,19 +300,28 @@
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-antrun-plugin
</artifactId>
<versionRange>[1.7,)</versionRange>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.8,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
<execute/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<versionRange>[1.10,)</versionRange>
<goals>
<goal>parse-version</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute/>
</action>
</pluginExecution>
</pluginExecutions>
......@@ -312,6 +358,7 @@
<configLocation>${basedir}/src/checkstyle/fileupload_checks.xml</configLocation>
<suppressionsLocation>${basedir}/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
<enableRulesSummary>false</enableRulesSummary>
<headerLocation>${basedir}/src/checkstyle/license-header.txt</headerLocation>
</configuration>
</plugin>
<plugin>
......@@ -330,9 +377,71 @@
<artifactId>clirr-maven-plugin</artifactId>
<version>${commons.clirr.version}</version>
<configuration>
<comparisonVersion>1.3</comparisonVersion>
<comparisonArtifacts>
<comparisonArtifact>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3</version>
</comparisonArtifact>
</comparisonArtifacts>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>setup-checkout</id>
<activation>
<file>
<missing>site-content</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>prepare-checkout</id>
<phase>pre-site</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<exec executable="svn">
<arg line="checkout --depth immediates ${commons.scmPubUrl} ${commons.scmPubCheckoutDirectory}"/>
</exec>
<exec executable="svn">
<arg line="update --set-depth exclude ${commons.scmPubCheckoutDirectory}/javadocs"/>
</exec>
<pathconvert pathsep=" " property="dirs">
<dirset dir="${commons.scmPubCheckoutDirectory}" includes="*"/>
</pathconvert>
<exec executable="svn">
<arg line="update --set-depth infinity ${dirs}"/>
</exec>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java9</id>
<activation>
<jdk>9</jdk>
</activation>
<properties>
<!-- coverall version 4.3.0 does not work with java 9, see https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
<coveralls.skip>true</coveralls.skip>
</properties>
</profile>
</profiles>
</project>