This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
The following commit(s) were added to refs/heads/master by this push: new 37055631 Bump org.apache.commons:commons-parent from 69 to 71 37055631 is described below commit 370556314d805e30b21593d0f495416f21ef7dbb Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Jun 23 09:01:44 2024 -0400 Bump org.apache.commons:commons-parent from 69 to 71 Redo PMD configuration --- pom.xml | 17 +++++-- src/changes/changes.xml | 2 +- src/checkstyle/fileupload_basic.xml | 25 ---------- src/conf/pmd-ruleset.xml | 91 +++++++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+), 30 deletions(-) diff --git a/pom.xml b/pom.xml index df920783..2c679790 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ <parent> <groupId>org.apache.commons</groupId> <artifactId>commons-parent</artifactId> - <version>69</version> + <version>71</version> </parent> <artifactId>commons-fileupload2</artifactId> @@ -258,9 +258,8 @@ <japicmp.skip>true</japicmp.skip> <clirr.skip>true</clirr.skip> <animal.sniffer.skip>true</animal.sniffer.skip> - <commons.javadoc.java.link>${commons.javadoc11.java.link}</commons.javadoc.java.link> <commons.javadoc.javaee.link>https://jakarta.ee/specifications/platform/9.1/apidocs/</commons.javadoc.javaee.link> - <commons.javadoc.version>3.6.3</commons.javadoc.version> + <commons.javadoc.version>3.7.0</commons.javadoc.version> <!-- Commons Release Plugin --> <commons.bc.version>2.0.0-M1</commons.bc.version> @@ -337,6 +336,16 @@ <excludeFilterFile>${commons.parent.dir}/spotbugs-exclude-filter.xml</excludeFilterFile> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <configuration> + <targetJdk>${maven.compiler.target}</targetJdk> + <rulesets> + <ruleset>${commons.parent.dir}/src/conf/pmd-ruleset.xml</ruleset> + </rulesets> + </configuration> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> @@ -395,7 +404,7 @@ <configuration> <targetJdk>${maven.compiler.target}</targetJdk> <rulesets> - <ruleset>${commons.parent.dir}/src/checkstyle/fileupload_basic.xml</ruleset> + <ruleset>${commons.parent.dir}/src/conf/pmd-ruleset.xml</ruleset> </rulesets> </configuration> </plugin> diff --git a/src/changes/changes.xml b/src/changes/changes.xml index a35a1f03..60637c23 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -50,7 +50,7 @@ The <action> type attribute can be add,update,fix,remove. <!-- ADD --> <action dev="ggregory" type="add" due-to="mufasa1976, Gary Gregory">Handle multipart/related Requests without content-disposition header.</action> <!-- UDPATE --> - <action dev="ggregory" type="update" due-to="Gary Gregory">Bump org.apache.commons:commons-parent from 66 to 69 #283, #294.</action> + <action dev="ggregory" type="update" due-to="Gary Gregory">Bump org.apache.commons:commons-parent from 66 to 71 #283, #294.</action> <action dev="ggregory" type="update" due-to="Gary Gregory">Bump commons-io:commons-io from 2.16.0 to 2.16.1 #297.</action> </release> <release version="2.0.0-M2" date="2023-12-24" description="2.0.0-M2 Release, requires Java 11."> diff --git a/src/checkstyle/fileupload_basic.xml b/src/checkstyle/fileupload_basic.xml deleted file mode 100644 index e4f22601..00000000 --- a/src/checkstyle/fileupload_basic.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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. ---> - -<ruleset name="FileUpload Basic Rules"> - <description>PMD Basic Ruleset minus the EmptyCatchBlock rule.</description> - - <rule ref="category/java/errorprone.xml"> - <exclude name="EmptyCatchBlock"/> - </rule> -</ruleset> diff --git a/src/conf/pmd-ruleset.xml b/src/conf/pmd-ruleset.xml new file mode 100644 index 00000000..89eb9b8d --- /dev/null +++ b/src/conf/pmd-ruleset.xml @@ -0,0 +1,91 @@ +<?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. +--> +<ruleset name='commons-bcel' + xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"> + <description> + This ruleset checks the code for discouraged programming constructs. + </description> + <!-- Default ruleset --> + <rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/> + <rule ref="category/java/bestpractices.xml/CheckResultSet"/> + <rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation"/> + <rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/> + <rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/> + <rule ref="category/java/bestpractices.xml/UnusedPrivateField"/> + <rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/> + <rule ref="category/java/codestyle.xml/ExtendsObject"/> + <rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop"/> + <rule ref="category/java/codestyle.xml/TooManyStaticImports"/> + <rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/> + <rule ref="category/java/codestyle.xml/UnnecessaryImport"/> + <rule ref="category/java/codestyle.xml/UnnecessaryModifier"/> + <rule ref="category/java/codestyle.xml/UnnecessaryReturn"/> + <rule ref="category/java/codestyle.xml/UnnecessarySemicolon"/> + <rule ref="category/java/codestyle.xml/UselessParentheses"/> + <rule ref="category/java/codestyle.xml/UselessQualifiedThis"/> + <rule ref="category/java/design.xml/CollapsibleIfStatements"/> + <rule ref="category/java/design.xml/SimplifiedTernary"/> + <rule ref="category/java/design.xml/UselessOverridingMethod"/> + <rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop"/> + <rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/> + <rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/> + <rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/> + <rule ref="category/java/errorprone.xml/BrokenNullCheck"/> + <rule ref="category/java/errorprone.xml/CheckSkipResult"/> + <rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray"/> + <rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/> + <rule ref="category/java/errorprone.xml/JumbledIncrementer"/> + <rule ref="category/java/errorprone.xml/MisplacedNullCheck"/> + <rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/> + <rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/> + <rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/> + <rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary"/> + <rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals"/> + <rule ref="category/java/errorprone.xml/UselessOperationOnImmutable"/> + <rule ref="category/java/multithreading.xml/AvoidThreadGroup"/> + <rule ref="category/java/multithreading.xml/DontCallThreadRun"/> + <rule ref="category/java/multithreading.xml/DoubleCheckedLocking"/> + <rule ref="category/java/performance.xml/BigIntegerInstantiation"/> + <!-- Rule customisations. --> + <rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"> + <properties> + <!-- java.lang annotations have the same name as BCEL classes so must be fully + qualified, e.g. java.lang.Deprecated --> + <property name="violationSuppressXPath" + value="//ClassOrInterfaceDeclaration[@SimpleName='AccessFlags' or @SimpleName='Attribute' + or @SimpleName='AttributeReader' or @SimpleName='Constant' + or @SimpleName='ConstantCP' or @SimpleName='ConstantUtf8' or @SimpleName='ElementValue' + or @SimpleName='FieldOrMethod' or @SimpleName='LocalVariableTable' or @SimpleName='StackMapEntry' + or @SimpleName='ClassLoader' or @SimpleName='ClassLoaderRepository' or @SimpleName='JavaWrapper']"/> + </properties> + </rule> + <!-- Apache Commons Compress custom --> + <rule ref="category/java/errorprone.xml/EmptyCatchBlock"> + <properties> + <property name="allowCommentedBlocks" value="true" /> + <property name="allowExceptionNameRegex" value="^(ignored|expected)$" /> + </properties> + </rule> + <rule ref="category/java/codestyle.xml/EmptyControlStatement"> + <properties> + <property name="allowCommentedBlocks" value="true" /> + </properties> + </rule> +</ruleset>