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-email.git
The following commit(s) were added to refs/heads/master by this push: new 5f07f00 Set a baseline for JaCoCo checks 5f07f00 is described below commit 5f07f00754cd85e1f731616edcba8c8883373876 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed May 8 14:22:13 2024 -0400 Set a baseline for JaCoCo checks --- commons-email2-core/pom.xml | 8 +++- .../src/site/resources/profile.jacoco | 17 +++++++ commons-email2-jakarta/pom.xml | 8 +++- .../src/site/resources/profile.jacoco | 17 +++++++ commons-email2-javax/pom.xml | 8 +++- .../src/site/resources/profile.jacoco | 17 +++++++ pom.xml | 52 +++++++++++----------- 7 files changed, 99 insertions(+), 28 deletions(-) diff --git a/commons-email2-core/pom.xml b/commons-email2-core/pom.xml index 7f8d078..94b7e78 100644 --- a/commons-email2-core/pom.xml +++ b/commons-email2-core/pom.xml @@ -47,8 +47,14 @@ <commons.parent.dir>${basedir}/..</commons.parent.dir> <commons.module.name>org.apache.commons.mail2.core</commons.module.name> <project.build.outputTimestamp>2024-01-01T00:00:00Z</project.build.outputTimestamp> + <!-- JaCoCo: Don't make code coverage worse than: --> + <commons.jacoco.classRatio>0.33</commons.jacoco.classRatio> + <commons.jacoco.instructionRatio>0.35</commons.jacoco.instructionRatio> + <commons.jacoco.methodRatio>0.10</commons.jacoco.methodRatio> + <commons.jacoco.branchRatio>0.18</commons.jacoco.branchRatio> + <commons.jacoco.lineRatio>0.34</commons.jacoco.lineRatio> + <commons.jacoco.complexityRatio>0.14</commons.jacoco.complexityRatio> </properties> - <build> <resources> <resource> diff --git a/commons-email2-core/src/site/resources/profile.jacoco b/commons-email2-core/src/site/resources/profile.jacoco new file mode 100644 index 0000000..a12755f --- /dev/null +++ b/commons-email2-core/src/site/resources/profile.jacoco @@ -0,0 +1,17 @@ +# 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. +# ----------------------------------------------------------------------------- +# +# Empty file used to automatically trigger JaCoCo profile from commons parent pom diff --git a/commons-email2-jakarta/pom.xml b/commons-email2-jakarta/pom.xml index ca1f669..83f3431 100644 --- a/commons-email2-jakarta/pom.xml +++ b/commons-email2-jakarta/pom.xml @@ -84,8 +84,14 @@ <commons.parent.dir>${basedir}/..</commons.parent.dir> <commons.module.name>org.apache.commons.mail2.jakarta</commons.module.name> <project.build.outputTimestamp>2024-01-01T00:00:00Z</project.build.outputTimestamp> + <!-- JaCoCo: Don't make code coverage worse than: --> + <commons.jacoco.classRatio>1.00</commons.jacoco.classRatio> + <commons.jacoco.instructionRatio>0.83</commons.jacoco.instructionRatio> + <commons.jacoco.methodRatio>0.86</commons.jacoco.methodRatio> + <commons.jacoco.branchRatio>0.18</commons.jacoco.branchRatio> + <commons.jacoco.lineRatio>0.84</commons.jacoco.lineRatio> + <commons.jacoco.complexityRatio>0.76</commons.jacoco.complexityRatio> </properties> - <build> <resources> <resource> diff --git a/commons-email2-jakarta/src/site/resources/profile.jacoco b/commons-email2-jakarta/src/site/resources/profile.jacoco new file mode 100644 index 0000000..a12755f --- /dev/null +++ b/commons-email2-jakarta/src/site/resources/profile.jacoco @@ -0,0 +1,17 @@ +# 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. +# ----------------------------------------------------------------------------- +# +# Empty file used to automatically trigger JaCoCo profile from commons parent pom diff --git a/commons-email2-javax/pom.xml b/commons-email2-javax/pom.xml index d52383c..321475e 100644 --- a/commons-email2-javax/pom.xml +++ b/commons-email2-javax/pom.xml @@ -84,8 +84,14 @@ <commons.parent.dir>${basedir}/..</commons.parent.dir> <commons.module.name>org.apache.commons.mail2.javax</commons.module.name> <project.build.outputTimestamp>2024-01-01T00:00:00Z</project.build.outputTimestamp> + <!-- JaCoCo: Don't make code coverage worse than: --> + <commons.jacoco.classRatio>1.00</commons.jacoco.classRatio> + <commons.jacoco.instructionRatio>0.83</commons.jacoco.instructionRatio> + <commons.jacoco.methodRatio>0.86</commons.jacoco.methodRatio> + <commons.jacoco.branchRatio>0.77</commons.jacoco.branchRatio> + <commons.jacoco.lineRatio>0.84</commons.jacoco.lineRatio> + <commons.jacoco.complexityRatio>0.76</commons.jacoco.complexityRatio> </properties> - <build> <resources> <resource> diff --git a/commons-email2-javax/src/site/resources/profile.jacoco b/commons-email2-javax/src/site/resources/profile.jacoco new file mode 100644 index 0000000..a12755f --- /dev/null +++ b/commons-email2-javax/src/site/resources/profile.jacoco @@ -0,0 +1,17 @@ +# 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. +# ----------------------------------------------------------------------------- +# +# Empty file used to automatically trigger JaCoCo profile from commons parent pom diff --git a/pom.xml b/pom.xml index 6abfc2b..a39b877 100644 --- a/pom.xml +++ b/pom.xml @@ -90,6 +90,15 @@ <!--Skip JApiCmp for 1.x to 2.0. --> <japicmp.skip>true</japicmp.skip> <project.build.outputTimestamp>2024-01-01T00:00:00Z</project.build.outputTimestamp> + <surefire.argline></surefire.argline> + <!-- JaCoCo: Don't make code coverage worse than: --> + <commons.jacoco.haltOnFailure>true</commons.jacoco.haltOnFailure> + <commons.jacoco.classRatio>1.00</commons.jacoco.classRatio> + <commons.jacoco.instructionRatio>1.00</commons.jacoco.instructionRatio> + <commons.jacoco.methodRatio>1.00</commons.jacoco.methodRatio> + <commons.jacoco.branchRatio>1.00</commons.jacoco.branchRatio> + <commons.jacoco.lineRatio>1.00</commons.jacoco.lineRatio> + <commons.jacoco.complexityRatio>1.00</commons.jacoco.complexityRatio> </properties> <build> @@ -128,6 +137,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> + <argLine>${argLine} ${surefire.argline}</argLine> <!-- exclude test case support classes --> <excludes> <exclude>org/apache/commons/mail/mocks/*</exclude> @@ -219,31 +229,23 @@ <activation> <jdk>[17,)</jdk> </activation> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <argLine> - --illegal-access=permit - --add-opens java.base/java.lang=ALL-UNNAMED - --add-opens java.base/java.net=ALL-UNNAMED - --add-opens java.base/java.io=ALL-UNNAMED - --add-opens java.base/java.util=ALL-UNNAMED - --add-opens - java.base/java.util.regex=ALL-UNNAMED - --add-opens - java.base/java.nio.charset=ALL-UNNAMED - --add-opens - java.base/sun.nio.cs=ALL-UNNAMED - --add-opens - java.logging/java.util.logging=ALL-UNNAMED - </argLine> - </configuration> - </plugin> - </plugins> - </build> + <properties> + <surefire.argline> + --illegal-access=permit + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.net=ALL-UNNAMED + --add-opens java.base/java.io=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED + --add-opens + java.base/java.util.regex=ALL-UNNAMED + --add-opens + java.base/java.nio.charset=ALL-UNNAMED + --add-opens + java.base/sun.nio.cs=ALL-UNNAMED + --add-opens + java.logging/java.util.logging=ALL-UNNAMED + </surefire.argline> + </properties> </profile> <profile> <id>java8</id>