(maven-site) branch master updated: [MNG-8135] Clarify case insensitivity on the OS profile activation
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-site.git The following commit(s) were added to refs/heads/master by this push: new 2417876a [MNG-8135] Clarify case insensitivity on the OS profile activation 2417876a is described below commit 2417876a26203c7c790e7f0259edf219a4c4b5d2 Author: Konrad Windszus AuthorDate: Wed Jun 5 16:45:15 2024 +0200 [MNG-8135] Clarify case insensitivity on the OS profile activation --- content/apt/guides/introduction/introduction-to-profiles.apt | 4 ++-- content/apt/pom.apt.vm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/apt/guides/introduction/introduction-to-profiles.apt b/content/apt/guides/introduction/introduction-to-profiles.apt index beeca205..3b5e3c65 100644 --- a/content/apt/guides/introduction/introduction-to-profiles.apt +++ b/content/apt/guides/introduction/introduction-to-profiles.apt @@ -218,11 +218,11 @@ mvn groupId:artifactId:goal -P profile-1,profile-2,?profile-3 <<>>, <<>>, <<>> and the family being derived from those. Each value can be prefixed with <<>> to negate the matching. - The values match if they are (not) equal to the actual String value. + The values match if they are (not) equal to the actual String value (<>). All given OS conditions must match for the profile to be considered for activation. Since {{{https://issues.apache.org/jira/browse/MNG-5726}Maven 3.9.7}} the value for <<>> may be prefixed with <<>>. - In that case {{{https://docs.oracle.com/javase/tutorial/essential/regex/}regular pattern matching}} is applied for the version matching. + In that case {{{https://docs.oracle.com/javase/tutorial/essential/regex/}regular pattern matching}} is applied for the version matching and applied against the <> <<>> value. The actual OS values which need to match the given values are emitted when executing <<>>. diff --git a/content/apt/pom.apt.vm b/content/apt/pom.apt.vm index 2dde78d7..df0d3f18 100644 --- a/content/apt/pom.apt.vm +++ b/content/apt/pom.apt.vm @@ -2044,7 +2044,7 @@ scm:cvs:pserver:127.0.0.1:/cvs/root:my-project * <>: The <<>> element can require some operating system specific properties having specific values. Each value may start with <<>> which means the condition is fulfilled if the value following does equal the actual value, - otherwise the condition is fulfilled if the value equals the according system property (or derived value). + otherwise the condition is fulfilled if the value equals the according system property (or derived value). In both cases the check is <>. * <>, is matched against system property <<>> @@ -2054,7 +2054,7 @@ scm:cvs:pserver:127.0.0.1:/cvs/root:my-project * <>, is matched against system property <<>>. Since {{{https://issues.apache.org/jira/browse/MNG-5726}Maven 3.9.7}} the value for <<>> may be prefixed with <<>>. In that case {{{https://docs.oracle.com/javase/tutorial/essential/regex/}regular pattern matching}} -is applied for the version matching. +is applied for the version matching. Note that system property <<>> is converted to <> prior to the matching. See the maven-enforcer-plugin's {{{/enforcer/enforcer-rules/requireOS.html}Require OS Rule}} for more details about OS values.
(maven-site) branch feature/clarify-case-sensitivity-on-os-profile-activation deleted (was 9a9d1fe2)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/clarify-case-sensitivity-on-os-profile-activation in repository https://gitbox.apache.org/repos/asf/maven-site.git was 9a9d1fe2 [MNG-8135] Clarify case insensitivity on the OS profile activation The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-site) 01/01: [MNG-8135] Clarify case insensitivity on the OS profile activation
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/clarify-case-sensitivity-on-os-profile-activation in repository https://gitbox.apache.org/repos/asf/maven-site.git commit 9a9d1fe295865d059959166201bd219443fe9d2c Author: Konrad Windszus AuthorDate: Wed Jun 5 16:45:15 2024 +0200 [MNG-8135] Clarify case insensitivity on the OS profile activation --- content/apt/guides/introduction/introduction-to-profiles.apt | 4 ++-- content/apt/pom.apt.vm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/apt/guides/introduction/introduction-to-profiles.apt b/content/apt/guides/introduction/introduction-to-profiles.apt index beeca205..3b5e3c65 100644 --- a/content/apt/guides/introduction/introduction-to-profiles.apt +++ b/content/apt/guides/introduction/introduction-to-profiles.apt @@ -218,11 +218,11 @@ mvn groupId:artifactId:goal -P profile-1,profile-2,?profile-3 <<>>, <<>>, <<>> and the family being derived from those. Each value can be prefixed with <<>> to negate the matching. - The values match if they are (not) equal to the actual String value. + The values match if they are (not) equal to the actual String value (<>). All given OS conditions must match for the profile to be considered for activation. Since {{{https://issues.apache.org/jira/browse/MNG-5726}Maven 3.9.7}} the value for <<>> may be prefixed with <<>>. - In that case {{{https://docs.oracle.com/javase/tutorial/essential/regex/}regular pattern matching}} is applied for the version matching. + In that case {{{https://docs.oracle.com/javase/tutorial/essential/regex/}regular pattern matching}} is applied for the version matching and applied against the <> <<>> value. The actual OS values which need to match the given values are emitted when executing <<>>. diff --git a/content/apt/pom.apt.vm b/content/apt/pom.apt.vm index 2dde78d7..df0d3f18 100644 --- a/content/apt/pom.apt.vm +++ b/content/apt/pom.apt.vm @@ -2044,7 +2044,7 @@ scm:cvs:pserver:127.0.0.1:/cvs/root:my-project * <>: The <<>> element can require some operating system specific properties having specific values. Each value may start with <<>> which means the condition is fulfilled if the value following does equal the actual value, - otherwise the condition is fulfilled if the value equals the according system property (or derived value). + otherwise the condition is fulfilled if the value equals the according system property (or derived value). In both cases the check is <>. * <>, is matched against system property <<>> @@ -2054,7 +2054,7 @@ scm:cvs:pserver:127.0.0.1:/cvs/root:my-project * <>, is matched against system property <<>>. Since {{{https://issues.apache.org/jira/browse/MNG-5726}Maven 3.9.7}} the value for <<>> may be prefixed with <<>>. In that case {{{https://docs.oracle.com/javase/tutorial/essential/regex/}regular pattern matching}} -is applied for the version matching. +is applied for the version matching. Note that system property <<>> is converted to <> prior to the matching. See the maven-enforcer-plugin's {{{/enforcer/enforcer-rules/requireOS.html}Require OS Rule}} for more details about OS values.
(maven-site) branch feature/clarify-case-sensitivity-on-os-profile-activation created (now 9a9d1fe2)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/clarify-case-sensitivity-on-os-profile-activation in repository https://gitbox.apache.org/repos/asf/maven-site.git at 9a9d1fe2 [MNG-8135] Clarify case insensitivity on the OS profile activation This branch includes the following new commits: new 9a9d1fe2 [MNG-8135] Clarify case insensitivity on the OS profile activation The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven) branch master updated: Caplital OS name can not activate profile
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven.git The following commit(s) were added to refs/heads/master by this push: new 0456c7c629 Caplital OS name can not activate profile 0456c7c629 is described below commit 0456c7c629d6fc872073268faeb77d2bde9a1b7d Author: liutang123 AuthorDate: Sat Jun 1 23:56:00 2024 +0800 Caplital OS name can not activate profile --- .../activation/OperatingSystemProfileActivator.java| 8 .../activation/OperatingSystemProfileActivatorTest.java| 14 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java index 8afc691565..2553735cb4 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivator.java @@ -105,14 +105,14 @@ public class OperatingSystemProfileActivator implements ProfileActivator { reverse = true; test = test.substring(1); } -result = actualVersion.equals(test); +result = actualVersion.equalsIgnoreCase(test); } return reverse != result; } private boolean determineArchMatch(String expectedArch, String actualArch) { -String test = expectedArch; +String test = expectedArch.toLowerCase(Locale.ENGLISH); boolean reverse = false; if (test.startsWith("!")) { @@ -126,7 +126,7 @@ public class OperatingSystemProfileActivator implements ProfileActivator { } private boolean determineNameMatch(String expectedName, String actualName) { -String test = expectedName; +String test = expectedName.toLowerCase(Locale.ENGLISH); boolean reverse = false; if (test.startsWith("!")) { @@ -140,7 +140,7 @@ public class OperatingSystemProfileActivator implements ProfileActivator { } private boolean determineFamilyMatch(String family, String actualName) { -String test = family; +String test = family.toLowerCase(Locale.ENGLISH); boolean reverse = false; if (test.startsWith("!")) { diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivatorTest.java index 9fe3fb01dd..d2ab767d48 100644 --- a/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivatorTest.java +++ b/maven-model-builder/src/test/java/org/apache/maven/model/profile/activation/OperatingSystemProfileActivatorTest.java @@ -135,4 +135,18 @@ class OperatingSystemProfileActivatorTest extends AbstractProfileActivatorTest
(maven-enforcer) branch bugfix/fix-documentation-requireMatchingCoordinates deleted (was e72f226)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/fix-documentation-requireMatchingCoordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git was e72f226 [MENFORCER-505] fix documentation for requireMatchingCoordinates The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-enforcer) branch master updated: [MENFORCER-505] fix documentation for requireMatchingCoordinates (#320)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git The following commit(s) were added to refs/heads/master by this push: new 2e35dc1 [MENFORCER-505] fix documentation for requireMatchingCoordinates (#320) 2e35dc1 is described below commit 2e35dc14a001fb68043084938215c626a73af7eb Author: Konrad Windszus AuthorDate: Mon Jun 3 14:57:52 2024 +0200 [MENFORCER-505] fix documentation for requireMatchingCoordinates (#320) --- enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm b/enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm index 906d61f..bb72ced 100644 --- a/enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm +++ b/enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm @@ -61,8 +61,8 @@ Require Matching Coordinates - com\.example.\namespace\..* - + com\.example\.namespace\..* +
(maven-enforcer) branch bugfix/fix-documentation-requireMatchingCoordinates updated (2fb9572 -> e72f226)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/fix-documentation-requireMatchingCoordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git discard 2fb9572 [MENFORCER-505] fix documentation for requireMatchingCoordinates add a24b557 Manage ignore artifacts for dependabot in PR add 1cf5c5f [MENFORCER-504] Bump org.apache.maven:maven-parent from 41 to 42 (#314) add 3eb6343 Bump project version to 3.5.0-SNAPSHOT add 6665083 [MENFORCER-501] Bump commons-codec:commons-codec from 1.16.1 to 1.17.0 (#312) add e687c46 [MENFORCER-501] Bump commons-io:commons-io from 2.16.0 to 2.16.1 (#311) add 5c7d0bc [MENFORCER-494] Allow banning dynamic versions in whole tree (#294) add 80e6626 [MENFORCER-503] Pass context to ProfileActivator - fix NPE in Maven 3.9.7 add 29d1c0d [MENFORCER-497] Require Maven 3.6.3+ add e6cd6e9 Remove unused dependency (#316) add 21b31b5 [maven-release-plugin] prepare release enforcer-3.5.0 add fc4e7a6 [maven-release-plugin] prepare for next development iteration add e72f226 [MENFORCER-505] fix documentation for requireMatchingCoordinates This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (2fb9572) \ N -- N -- N refs/heads/bugfix/fix-documentation-requireMatchingCoordinates (e72f226) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .github/dependabot.yml | 3 +- README.md | 14 --- enforcer-api/pom.xml | 2 +- enforcer-rules/pom.xml | 10 +-- .../org/apache/maven/enforcer/rules/RequireOS.java | 22 - .../rules/dependency/BanDynamicVersions.java | 99 ++ .../enforcer/rules/dependency/ResolverUtil.java| 4 +- .../src/site/apt/banDynamicVersions.apt.vm | 2 + .../apache/maven/enforcer/rules/TestRequireOS.java | 26 -- maven-enforcer-extension/pom.xml | 9 +- .../src/it/projects/invoker.properties | 1 - maven-enforcer-plugin/pom.xml | 6 +- ...om => menforcer494_dependency-1.0-SNAPSHOT.pom} | 2 +- ...s-1.0.4.pom => menforcer494_dependency-2.0.pom} | 6 +- ...T.pom => menforcer494_project-1.0-SNAPSHOT.pom} | 6 +- .../invoker.properties | 0 .../pom.xml| 39 +++-- .../verify.groovy | 45 +- .../invoker.properties | 18 .../invoker.properties | 18 .../require-plugin-versions-ci/invoker.properties | 3 +- .../invoker.properties | 25 -- .../invoker.properties | 3 +- .../invoker.properties | 18 .../pom.xml| 2 +- .../invoker.properties | 1 - .../invoker.properties | 18 .../invoker.properties | 18 .../maven/plugins/enforcer/TestEnforceMojo.java| 12 ++- .../enforcer/internal/EnforcerRuleManagerTest.java | 6 +- pom.xml| 35 +++- 31 files changed, 195 insertions(+), 278 deletions(-) copy maven-enforcer-plugin/src/it/mrm/repository/{menforcer134_model-1.0-20130423.044324-5638.pom => menforcer494_dependency-1.0-SNAPSHOT.pom} (93%) copy maven-enforcer-plugin/src/it/mrm/repository/{menforcer138_utils-1.0.4.pom => menforcer494_dependency-2.0.pom} (91%) copy maven-enforcer-plugin/src/it/mrm/repository/{menforcer134_modelbuilder-1.0-SNAPSHOT.pom => menforcer494_project-1.0-SNAPSHOT.pom} (87%) copy maven-enforcer-plugin/src/it/projects/{MENFORCER-434 => ban-dynamic-versions-verbose}/invoker.properties (100%) copy maven-enforcer-plugin/src/it/projects/{ban-dynamic-versions-scope-all-scopes => ban-dynamic-versions-verbose}/pom.xml (63%) copy maven-enforcer-plugin/src/it/projects/{ban-dynamic-versions-scope-all-scopes => ban-dynamic-versions-verbose}/verify.groovy (73%) delete mode 100644 maven-enforcer-plugin/src/it/projects/dependencies_converge_exclude_wildcard/invoker.properties delete mode 100644
(maven-enforcer) branch bugfix/fix-documentation-requireMatchingCoordinates created (now 2fb9572)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/fix-documentation-requireMatchingCoordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git at 2fb9572 [MENFORCER-505] fix documentation for requireMatchingCoordinates This branch includes the following new commits: new 2fb9572 [MENFORCER-505] fix documentation for requireMatchingCoordinates The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven-enforcer) 01/01: [MENFORCER-505] fix documentation for requireMatchingCoordinates
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch bugfix/fix-documentation-requireMatchingCoordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git commit 2fb957240cc4201574aeed23746c7e641fc55e85 Author: Konrad Windszus AuthorDate: Mon Jun 3 10:29:41 2024 +0200 [MENFORCER-505] fix documentation for requireMatchingCoordinates --- enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm b/enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm index 906d61f..bb72ced 100644 --- a/enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm +++ b/enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm @@ -61,8 +61,8 @@ Require Matching Coordinates - com\.example.\namespace\..* - + com\.example\.namespace\..* +
(maven-site) branch feature/clarify-dependency-types updated (87229d3d -> 8bfb4706)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/clarify-dependency-types in repository https://gitbox.apache.org/repos/asf/maven-site.git from 87229d3d [MNG-8097] Outline the two different ways to reference a dependency (with a related artifact handler) add 8bfb4706 incorporate some feedback from PR No new revisions were added by this update. Summary of changes: content/apt/pom.apt.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(maven-site) branch feature/clarify-dependency-types updated (827787d1 -> 87229d3d)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/clarify-dependency-types in repository https://gitbox.apache.org/repos/asf/maven-site.git omit 827787d1 [MNG-8097] Outline the two different ways to reference a dependency (with a related artifact handler) add 87229d3d [MNG-8097] Outline the two different ways to reference a dependency (with a related artifact handler) This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (827787d1) \ N -- N -- N refs/heads/feature/clarify-dependency-types (87229d3d) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: content/apt/pom.apt.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(maven-site) 01/01: [MNG-8097] Outline the two different ways to reference a dependency (with a related artifact handler)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/clarify-dependency-types in repository https://gitbox.apache.org/repos/asf/maven-site.git commit 827787d148304422fde09b25a36aff0c9029baf7 Author: Konrad Windszus AuthorDate: Sat May 18 17:09:03 2024 +0200 [MNG-8097] Outline the two different ways to reference a dependency (with a related artifact handler) --- content/apt/pom.apt.vm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/apt/pom.apt.vm b/content/apt/pom.apt.vm index 2dde78d7..32388734 100644 --- a/content/apt/pom.apt.vm +++ b/content/apt/pom.apt.vm @@ -271,13 +271,20 @@ mvn install:install-file -Dfile=non-maven-proj.jar -DgroupId=some.group -Dartifa you browse the Maven central repository, you will notice that the classifiers <<>> and <<>> are used to deploy the project source code and API docs along with the packaged class files. + The classifier may also be derived from the <> in case the related {{{/ref/current/maven-core/artifact-handlers.html} artifact handler}} defines one. + * <>:\ Corresponds to the chosen dependency type. This defaults to <<>>. While it usually represents - the extension on the filename of the dependency, that is not always the case: a type can be mapped to a + the extension of the referenced artifact, that is not always the case: a type can be mapped to a different extension and a classifier. The type often corresponds to the packaging used, though this is also not always the case. Some examples are <<>>, <<>> and <<>>: see {{{/ref/current/maven-core/artifact-handlers.html}default artifact handlers}} for a list. New types can be defined by plugins that set <<>> to true, so this is not a complete list. + + In case there is an artifact handler defined there is different ways of referencing the same dependency. + By using the or by using the registered value. The former considers all attributes from the artifact handler, while the latter + never adds the dependency to the classpath nor includes its dependencies. Further information in + {{{/repositories/artifacts.html#but-where-do-i-set-artifact-extension}Maven Artifacts}}. * <>:\ This element refers to the classpath of the task at hand (compiling and runtime, testing, etc.) as well as
(maven-site) branch feature/clarify-dependency-types created (now 827787d1)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/clarify-dependency-types in repository https://gitbox.apache.org/repos/asf/maven-site.git at 827787d1 [MNG-8097] Outline the two different ways to reference a dependency (with a related artifact handler) This branch includes the following new commits: new 827787d1 [MNG-8097] Outline the two different ways to reference a dependency (with a related artifact handler) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven) branch feature/validate-ids-across-settings-and-model deleted (was 23cf492ef9)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/validate-ids-across-settings-and-model in repository https://gitbox.apache.org/repos/asf/maven.git was 23cf492ef9 only emit warnings when urls differ The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven) branch master updated: [MNG-8050] emit warn in case of repo id clashes between settings and POM (#1412)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven.git The following commit(s) were added to refs/heads/master by this push: new ac80eeabc4 [MNG-8050] emit warn in case of repo id clashes between settings and POM (#1412) ac80eeabc4 is described below commit ac80eeabc4cf28199cf65cb58b27eae590b3d16a Author: Konrad Windszus AuthorDate: Sat May 18 16:09:22 2024 +0200 [MNG-8050] emit warn in case of repo id clashes between settings and POM (#1412) --- maven-model-builder/pom.xml| 1 + .../maven/model/building/DefaultModelBuilder.java | 1 + .../model/validation/DefaultModelValidator.java| 49 ++ .../maven/model/validation/ModelValidator.java | 21 ++ 4 files changed, 72 insertions(+) diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml index f98c7e019f..be93a2a485 100644 --- a/maven-model-builder/pom.xml +++ b/maven-model-builder/pom.xml @@ -179,6 +179,7 @@ under the License. org.apache.maven.model.superpom.SuperPomProvider#getSuperModel(java.lang.String):METHOD_RETURN_TYPE_CHANGED org.apache.maven.model.validation.DefaultModelValidator#validateDependencyVersion(org.apache.maven.model.building.ModelProblemCollector,org.apache.maven.model.Dependency,java.lang.String):METHOD_REMOVED org.apache.maven.model.validation.ModelValidator#validateFileModel(org.apache.maven.model.Model,org.apache.maven.model.building.ModelBuildingRequest,org.apache.maven.model.building.ModelProblemCollector):METHOD_NEW_DEFAULT + org.apache.maven.model.validation.ModelValidator#validateExternalProfiles(java.util.List,org.apache.maven.model.Model,org.apache.maven.model.building.ModelBuildingRequest,org.apache.maven.model.building.ModelProblemCollector):METHOD_NEW_DEFAULT diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java index 7045579513..73d5f3b14a 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java @@ -754,6 +754,7 @@ public class DefaultModelBuilder implements ModelBuilder { profileInjector.injectProfile(inputModel, activeProfile, request, problems); } +modelValidator.validateExternalProfiles(activeExternalProfiles, inputModel, request, problems); for (Profile activeProfile : activeExternalProfiles) { profileInjector.injectProfile(inputModel, activeProfile, request, problems); } diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java index 246e2f8b13..b51bbc22c7 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java @@ -24,6 +24,7 @@ import javax.inject.Singleton; import java.io.File; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; import java.util.Deque; import java.util.HashMap; @@ -788,6 +789,54 @@ public class DefaultModelValidator implements ModelValidator { } } +@Override +public void validateExternalProfiles( +List activeExternalProfiles, +Model ma, +ModelBuildingRequest request, +ModelProblemCollector problems) { +org.apache.maven.api.model.Model m = ma.getDelegate(); +// check for id clashes in repositories +for (Profile profile : activeExternalProfiles.stream() +.map(org.apache.maven.model.Profile::getDelegate) +.collect(Collectors.toList())) { +String externalRepositoriesSource = "external profile with id '" + profile.getId() + "' in settings.xml"; +validateUniqueRepositoryIds( +false, m.getRepositories(), profile.getRepositories(), externalRepositoriesSource, problems); +validateUniqueRepositoryIds( +true, +m.getPluginRepositories(), +profile.getPluginRepositories(), +externalRepositoriesSource, +problems); +} +} + +private void validateUniqueRepositoryIds( +boolean isPluginRepository, +Collection pomRepositories, +Collection externalRepositories, +String externalRepositoriesSource, +ModelProblemCollector problems) { +for (Repositor
(maven) branch feature/validate-ids-across-settings-and-model updated (862a3992f5 -> 23cf492ef9)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/validate-ids-across-settings-and-model in repository https://gitbox.apache.org/repos/asf/maven.git omit 862a3992f5 only emit warnings when urls differ add 23cf492ef9 only emit warnings when urls differ This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (862a3992f5) \ N -- N -- N refs/heads/feature/validate-ids-across-settings-and-model (23cf492ef9) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../model/validation/DefaultModelValidator.java| 49 +- 1 file changed, 1 insertion(+), 48 deletions(-)
(maven) branch feature/validate-ids-across-settings-and-model updated (312983bc2d -> 862a3992f5)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/validate-ids-across-settings-and-model in repository https://gitbox.apache.org/repos/asf/maven.git omit 312983bc2d only emit warnings when urls differ add 862a3992f5 only emit warnings when urls differ This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (312983bc2d) \ N -- N -- N refs/heads/feature/validate-ids-across-settings-and-model (862a3992f5) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../model/validation/DefaultModelValidator.java| 36 -- 1 file changed, 33 insertions(+), 3 deletions(-)
(maven) branch feature/validate-ids-across-settings-and-model updated (885cee2970 -> 312983bc2d)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/validate-ids-across-settings-and-model in repository https://gitbox.apache.org/repos/asf/maven.git discard 885cee2970 only emit warnings when urls differ discard bee5ef434b improve message, validate pluginRepositories as well discard 4f3fe699f1 [MNG-8050] emit warn in case of repo id clashes between settings and POM add 84e2d8ad3f [MNG-8084] Include repository metadata in the API (#1465) add 9be08ccef8 [MNG-8084] Include lifecycle in the API add d075fe7e85 [MNG-8084] New model builder and resolver provider add fba2542aa2 [MNG-4840] fix requiredMavenVersion description #1445 add ce87334f68 Fix split package in org.apache.maven.api.di add 860310b692 [MNG-8043] document new default types, replacing artifact handlers add aae74dfbee [MNG-8082] Exceptions of proxied SessionScoped components are not working correctly (#1449) add 52c5659b25 Fix nasty concurrency issue in AbstractSession (#1479) add 3bad5068a2 [MNG-8025] Restore compatibility (#1467) add 5d15093532 [MNG-8105] Upgrade JLine to 3.26.0 (#1478) add 529d80a169 [MNG-8102] Upgrade Parent to 42 (#1476) add d0f05ffccf [MNG-8103] Upgrade default plugin bindings (#1475) add 41d1950a6d [MNG-8084] add di & api-impl add 5d1cfd47f3 Cleanup dependencies add 728473c54f Deprecate test classes in maven-compat which cause lots of warnings add 9fc4f49917 Add missing dep add 81e2b3c1ee Make Maven 4.0.0 be beta-1 (#1484) add 31d2dc1815 [MNG-8105] Upgrade JLine to 3.26.1 (#1485) add 854589b131 [MNG-8106] Fix metadata merge (#1481) add 8d6bf5f033 Fix terminal usage in mvnd (#1486) add 6fddd97513 Use the new resolver provider (#1483) add 8fbbbc978c [MNG-8107] Update Resolver 2.0.0-alpha-11 (#1488) add 9ee77a8cb2 [MNG-8084] add API metadata group add b35aa27b80 Maven Resolver 2.0.0-alpha-11 is released add 6814ba386d Simplified redundant judgment (#1489) add 399f8b4ffc [MNG-8081] interpolate available properties during default profile selection (Maven 4.x) (#1446) add 64e9447926 Fix consumer pom builder (#1491) add febfd2b5c9 Resolver updates (#1495) add 7451585a19 Fix reactor loading problems (#1497) add d19f28e793 Upgrade plexus-interactivity-api to 1.3 (#1498) add 3d3137920a [MNG-8073] Adding ASL2 header to XSD files (#1499) add d8199bf3b9 [MNG-8084] add system properties to test (#1500) add ba52bfe600 [MNG-8117] Maven PluginVersionResolver improvement (#1502) add 0564480440 [MNG-8118] Merge BOM exclusions instead of overwriting (#1504) add c363e272ea Bump org.xmlunit:xmlunit-core from 2.9.1 to 2.10.0 (#1494) add 583667a869 [MNG-8015] Adjustments in new API related to PathType (#1501) add 9442164ab2 [MNG-8108] Fix problem when building the consumer pom (#1506) add d296927de2 [MNG-8119] Remove build section from profiles in the consumer pom (#1503) add bde81a4d85 [MNG-8108] Fix problem when building the consumer pom add 828faba819 [maven-release-plugin] prepare release maven-4.0.0-beta-2 add 9acbed7d4f [maven-release-plugin] prepare for next development iteration add 71bb3bdf95 [MNG-8121] Fix NPE in metadata merge (#1509) add accbbcf5a0 Fix packaging not found (#1507) add fe5de5ad2b Enable dependabot (#1513) add de4e335216 Remove dependabot limit / schedule add ac4debe8f5 Fix distribution licenses (#1525) add 1d0ca63fbd [MNG-8050] emit warn in case of repo id clashes between settings and POM add f32e0cbc9c improve message, validate pluginRepositories as well add 312983bc2d only emit warnings when urls differ This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (885cee2970) \ N -- N -- N refs/heads/feature/validate-ids-across-settings-and-model (312983bc2d) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .github/dependabot.yml | 28 + apache-maven/pom.xml |7 +- .../main/appended-resources/META-INF/LICENSE.vm| 17 +- .../appended-resources/licenses/BSD-2-Clause.txt | 24 + .../appended-resources/licenses/BSD-3-Clause.txt | 28 + ...txt => CDDL+GPLv2-with-classpath-exception.txt} |0 .../licenses/{MIT-slf4
(maven) branch feature/validate-ids-across-settings-and-model updated (cd7aba6af6 -> 885cee2970)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/validate-ids-across-settings-and-model in repository https://gitbox.apache.org/repos/asf/maven.git omit cd7aba6af6 only emit warnings when urls differ omit 35c9ac5f4e improve message, validate pluginRepositories as well omit 8280b80e37 [MNG-8050] emit warn in case of repo id clashes between settings and POM add 0c529f830a [MNG-8053] Profile activation by packaging in the POM (#1410) add 972b074656 [MNG-8039] Don't change resolved artifact by DefaultProjectBuilder add 7b60c8d7dc [MNG-8054] Ability to force build number (#1414) add 54c1b2f28a [MNG-8029] improve documentation about mirror settings add 969a6ffbb2 Move API first (as needed by other modules) add ff5fa9e4e5 [MNG-8057] Upgrade Modello to 2.3.0 (#1418) add a31c145ae9 [MNG-8006] Switch property contributors to use a lazy lookup (#1419) add cf438ca624 [MNG-8059] Paths everywhere (#1413) add 83949a7384 Use isEmpty instead of length (#1420) add ab6ec5bd74 [MNG-7976] Investigate MNG-6127 IT instability (#1422) add cf60940497 [MNG-5726] Support regular expression matching in profile activation for (#1421) add 3c2f8ebdb7 Use v4 api to resolve project dependencies (#1409) add 5307bcba09 Use SessionData to store ProjectIndex (#1423) add ce15193394 Fix concurrent cache access (#1425) add a9934f91fd Extract JLine support into its own module (#1426) add 24eee1f8e6 Add a SpiService marker interface (#1427) add 456890d40b Missing annotations on api (#1428) add a3e8da805c Make LifecycleStarter pluggable (#1424) add a27873629f [MNG-8024] Make WrapperProperties and WrapperList serializable (#1433) add 9780ca1baf [MNG-8015] Control the type of path where each dependency can be placed (#1401) add 5029cc238c [MNG-8012] Warn if in-reactor BOM import happens (#1434) add 2bfa3a8fae [MNG-8061] Maven: Require Java 17 (#1430) add 0a6a5617fe [maven-release-plugin] prepare release maven-4.0.0-alpha-13 add 33788fd7fc [maven-release-plugin] prepare for next development iteration add 1fc87b8d0d [MNG-8075] Allow project.baseUri in repository.url add 740dae43ca [MNG-4840] document requiredMavenVersion in plugin descriptor add a0206ec32f Bump ognl:ognl from 2.5.1 to 3.0.12 in /maven-compat/src/test/resources (#1439) add 267de063ee remove repetitive words (#1436) add c710760fb9 [MNG-8085] switch png+imagemap to svg add 6e508869f0 configure javadoc groups add 52d453caf9 Complete Packaging in v4 api (#1451) add 003a5bc06d [MNG-8084] Make the v4 api usable outside the Maven runtime (#1441) add a5ea944c99 Remove unneeded dependencies in maven-di (#1440) add 2594047014 [MNG-8088] Using Resolver with MRESOLVER-512 (#1442) add c16f45d858 [MNG-8089] Introduce fat-JAR types (#1459) add 691e3780e6 This is NOT a component (#1462) add a6f52774eb Boot JLine in async mode add 97518b5b29 Do not recreate nodes if merge does nothing add 8418fb3960 Cache parent artifact resolution add 084e3f9500 Lazily create builders during transformations add 34863e6345 [MNG-8091] Update Resolver to 2.0.0-alpha-10 (#1460) add 4f3fe699f1 [MNG-8050] emit warn in case of repo id clashes between settings and POM add bee5ef434b improve message, validate pluginRepositories as well add 885cee2970 only emit warnings when urls differ This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (cd7aba6af6) \ N -- N -- N refs/heads/feature/validate-ids-across-settings-and-model (885cee2970) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .github/workflows/maven.yml|6 +- .github/workflows/maven_build_itself.yml |2 +- .gitignore |1 + Jenkinsfile|4 +- Jenkinsfile.s390x |4 +- README.md |2 +- apache-maven/pom.xml |2 +- apache-maven/src/site/site.xml |5 +- api/maven-api-core/pom.xml |2 +- .../main/java/org/apache/maven/api/Dependency.java |8 + .../java/
(maven-site-plugin) branch feature/configure-parser-with-plexus-configurator updated (58db21ec -> 0c82571d)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-parser-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git discard 58db21ec [MSITE-1000] Introduce parser configuration parameter add 0c82571d [MSITE-1000] Introduce parser configuration parameter This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (58db21ec) \ N -- N -- N refs/heads/feature/configure-parser-with-plexus-configurator (0c82571d) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../maven/plugins/site/render/ParserConfiguratorImpl.java | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-)
(maven-site-plugin) branch feature/configure-parser-with-plexus-configurator updated (614a0575 -> 58db21ec)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-parser-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git omit 614a0575 [MSITE-1000] Introduce parser configuration parameter add 58db21ec [MSITE-1000] Introduce parser configuration parameter This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (614a0575) \ N -- N -- N refs/heads/feature/configure-parser-with-plexus-configurator (58db21ec) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: pom.xml | 2 +- .../org/apache/maven/plugins/site/render/ParserConfiguratorImpl.java| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
(maven-fluido-skin) branch bugfix/add-code-highlightling-for-all-pre-code-combinations updated (0ebfdfe -> 2b56992)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/add-code-highlightling-for-all-pre-code-combinations in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git discard 0ebfdfe [MSKINS-245] Add code highlighting class to every combination add 2b56992 [MSKINS-245] Add code highlighting class to every combination This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (0ebfdfe) \ N -- N -- N refs/heads/bugfix/add-code-highlightling-for-all-pre-code-combinations (2b56992) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: src/main/resources/META-INF/maven/skin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(maven-doxia-sitetools) branch feature/configure-parser deleted (was 37267c0)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-parser in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git was 37267c0 Configure per parser id (not per source file path) The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-doxia-sitetools) branch feature/configure-with-plexus-configurator deleted (was 39b79bb)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git was 39b79bb [DOXIASITETOOLS-324] Allow configuration of parsers The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-doxia-sitetools) branch master updated: [DOXIASITETOOLS-324] Allow configuration of parsers (#140)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git The following commit(s) were added to refs/heads/master by this push: new 2cdd1de [DOXIASITETOOLS-324] Allow configuration of parsers (#140) 2cdd1de is described below commit 2cdd1dee58f635781ab52e450df3da8001e53023 Author: Konrad Windszus AuthorDate: Sat Apr 20 19:49:07 2024 +0200 [DOXIASITETOOLS-324] Allow configuration of parsers (#140) Introduce interface ParserConfigurator which can be passed to SiteRenderingContext --- .../doxia/siterenderer/DefaultSiteRenderer.java| 13 ++-- .../doxia/siterenderer/ParserConfigurator.java | 38 ++ .../doxia/siterenderer/SiteRenderingContext.java | 20 3 files changed, 68 insertions(+), 3 deletions(-) diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java index 8880371..cb621f7 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java @@ -320,9 +320,16 @@ public class DefaultSiteRenderer implements Renderer { String resource = doc.getAbsolutePath(); Parser parser = doxia.getParser(docRenderingContext.getParserId()); -// DOXIASITETOOLS-146 don't render comments from source markup -parser.setEmitComments(false); -parser.setEmitAnchorsForIndexableEntries(true); +ParserConfigurator configurator = siteContext.getParserConfigurator(); +boolean isConfigured = false; +if (configurator != null) { +isConfigured = configurator.configure(docRenderingContext.getParserId(), doc.toPath(), parser); +} +if (!isConfigured) { +// DOXIASITETOOLS-146 don't render comments from source markup +parser.setEmitComments(false); +parser.setEmitAnchorsForIndexableEntries(true); +} // TODO: DOXIA-111: the filter used here must be checked generally. if (docRenderingContext.getAttribute("velocity") != null) { diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java new file mode 100644 index 000..c07a6b2 --- /dev/null +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java @@ -0,0 +1,38 @@ +/* + * 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.maven.doxia.siterenderer; + +import java.nio.file.Path; + +import org.apache.maven.doxia.parser.Parser; + +/** + * Interface which allows to configure a particular {@link Parser} before it is being used. + */ +public interface ParserConfigurator { + +/** + * Configures the given parser which is afterwards used to parse the source file with the given path. + * @param parserId the parser id + * @param filePath the absolute path of the file to parse + * @param parser the parser to configure + * @return {@code true} if the parser has been configured, otherwise {@code false} + */ +boolean configure(String parserId, Path filePath, Parser parser); +} diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java index 12733d0..aa87c81 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java @@ -72,6 +72,8 @@ public class SiteRenderingContext { private File processedContentOutput; +private ParserConfigurator parserConfigurator; + /**
(maven-doxia-sitetools) branch feature/configure-with-plexus-configurator updated (9a8bc62 -> 39b79bb)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git omit 9a8bc62 [DOXIASITETOOLS-324] Allow configuration of parsers omit 511fb2f Fix spotless issues omit 3d2a293 [DOXIASITETOOLS-335] Upgrade to Doxia 2.0.0-M10 omit 6d09d65 Bump org.codehaus.plexus:plexus-classworlds from 2.6.0 to 2.8.0 omit 8c86070 Bump commons-io:commons-io from 2.16.0 to 2.16.1 omit 31f354b Bump org.htmlunit:htmlunit from 3.11.0 to 4.0.0 omit 03c0cca Fix broken links omit 6dec0cd Consistency log Doxia source path for Velocity actions omit 79086a0 [DOXIASITETOOLS-334] Pass project-relative file path as reference to Parser (#142) omit 96e2450 [DOXIASITETOOLS-333] Bump commons-io:commons-io from 2.15.1 to 2.16.0 (#141) add 39b79bb [DOXIASITETOOLS-324] Allow configuration of parsers This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (9a8bc62) \ N -- N -- N refs/heads/feature/configure-with-plexus-configurator (39b79bb) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: doxia-integration-tools/pom.xml | 2 +- doxia-site-model/src/site/apt/index.apt | 2 +- doxia-site-renderer/pom.xml | 4 ++-- .../maven/doxia/siterenderer/DefaultSiteRenderer.java | 4 ++-- .../apache/maven/doxia/siterenderer/ParserConfigurator.java | 2 +- doxia-site-renderer/src/site/apt/index.apt.vm | 6 +++--- .../apache/maven/doxia/siterenderer/AttributesVerifier.java | 13 ++--- .../maven/doxia/siterenderer/DefaultSiteRendererTest.java | 4 ++-- .../apache/maven/doxia/siterenderer/EntitiesVerifier.java | 10 +- .../org/apache/maven/doxia/siterenderer/FaqVerifier.java| 9 + pom.xml | 4 ++-- 11 files changed, 30 insertions(+), 30 deletions(-)
(maven-scm) branch master updated (93d0142a5 -> a297237e9)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/maven-scm.git from 93d0142a5 [SCM-1024] maven-scm-plugin tests do not properly check for existence of svn command add a297237e9 [SCM-914] Introduce properly typed last modified date (#193) No new revisions were added by this update. Summary of changes: .../org/apache/maven/scm/CommandParameter.java | 2 +- .../apache/maven/scm/command/info/InfoItem.java| 34 .../org/apache/maven/scm/util/FilenameUtils.java | 2 +- .../git/gitexe/command/info/GitInfoCommand.java| 55 - .../git/gitexe/command/info/GitInfoConsumer.java | 78 +- .../GitExeInfoCommandTckTest.java} | 13 +-- .../gitexe/command/info/GitInfoCommandTest.java| 2 +- .../GitInfoCommandTckTest.java}| 6 +- .../scm/provider/git/jgit/command/JGitUtils.java | 95 +++--- .../git/jgit/command/info/JGitInfoCommand.java | 75 ++--- .../JGitInfoCommandTckTest.java} | 7 +- .../svn/svnexe/command/info/SvnInfoConsumer.java | 14 .../SvnInfoConsumerTest.java} | 22 ++--- .../SvnInfoCommandTckTest.java}| 9 +- .../scm/tck/command/info/InfoCommandTckTest.java | 66 +++ 15 files changed, 346 insertions(+), 134 deletions(-) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/{untag/GitExeUntagCommandTckTest.java => info/GitExeInfoCommandTckTest.java} (70%) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gittest/src/main/java/org/apache/maven/scm/provider/git/command/{diff/GitDiffCommandTckTest.java => info/GitInfoCommandTckTest.java} (86%) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/test/java/org/apache/maven/scm/provider/git/jgit/command/{diff/JGitDiffCommandTckTest.java => info/JGitInfoCommandTckTest.java} (86%) copy maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/{remove/SvnExeRemoveCommandTckTest.java => info/SvnInfoConsumerTest.java} (64%) copy maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svntest/src/main/java/org/apache/maven/scm/provider/svn/command/{remove/SvnRemoveCommandTckTest.java => info/SvnInfoCommandTckTest.java} (85%) create mode 100644 maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/info/InfoCommandTckTest.java
(maven-scm) branch feature/expose-last-modified-date deleted (was 4343fb952)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git was 4343fb952 Properly close JGit repository The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven) branch clarify-pom-extension updated (5b2e4114fb -> 11639cee30)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch clarify-pom-extension in repository https://gitbox.apache.org/repos/asf/maven.git from 5b2e4114fb Update artifact-handlers.apt add 11639cee30 Fix test case No new revisions were added by this update. Summary of changes: maven-core/src/site/apt/artifact-handlers.apt | 2 ++ .../org/apache/maven/artifact/handler/ArtifactHandlerTest.java | 7 +-- 2 files changed, 7 insertions(+), 2 deletions(-)
(maven) branch clarify-pom-extension created (now 5b2e4114fb)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch clarify-pom-extension in repository https://gitbox.apache.org/repos/asf/maven.git at 5b2e4114fb Update artifact-handlers.apt This branch includes the following new commits: new 5b2e4114fb Update artifact-handlers.apt The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven) 01/01: Update artifact-handlers.apt
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch clarify-pom-extension in repository https://gitbox.apache.org/repos/asf/maven.git commit 5b2e4114fb70ae2f5ee73b6d9056ef1dbd9d610b Author: Konrad Windszus AuthorDate: Fri Apr 5 10:10:18 2024 +0200 Update artifact-handlers.apt Clarify that the extension used outside repositories for pom files usually differs --- maven-core/src/site/apt/artifact-handlers.apt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-core/src/site/apt/artifact-handlers.apt b/maven-core/src/site/apt/artifact-handlers.apt index 5e3be0430b..e6fce66161 100644 --- a/maven-core/src/site/apt/artifact-handlers.apt +++ b/maven-core/src/site/apt/artifact-handlers.apt @@ -35,7 +35,7 @@ Default Artifact Handlers Reference *+---+++---+-+---+ || type || classifier || extension || packaging || language || added to classpath || includesDependencies || *+---+++---+-+---+ -| <<>> | | <= type> | <= type> | none | | | +| <<>> | | <= type>, Note: this differs for POM files outside the repository which usually use <<>> as filesystem extension. | <= type> | none | | | *+---+++---+-+---+ | <<>> | | <= type> | <= type> | java | <<>> | | *+---+++---+-+---+
(maven-enforcer) branch feature/require-matching-coordinates deleted (was f8430ef)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/require-matching-coordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git was f8430ef [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-enforcer) branch master updated: [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns(#309)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git The following commit(s) were added to refs/heads/master by this push: new 80ee78e [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns(#309) 80ee78e is described below commit 80ee78e5f7473dafc8ca8e68d8f2af7895290303 Author: Konrad Windszus AuthorDate: Thu Apr 4 20:45:38 2024 +0200 [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns(#309) Optionally allows to enforce the module directory name being equal to the module's artifactId. --- .../enforcer/rules/RequireMatchingCoordinates.java | 110 + enforcer-rules/src/site/apt/index.apt | 2 + .../src/site/apt/requireMatchingCoordinates.apt.vm | 75 ++ .../require-matching-coordinates/mod2/pom.xml | 43 .../projects/require-matching-coordinates/pom.xml | 75 ++ .../test-multimodule-mod1/pom.xml | 37 +++ .../require-matching-coordinates/verify.groovy | 23 + 7 files changed, 365 insertions(+) diff --git a/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireMatchingCoordinates.java b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireMatchingCoordinates.java new file mode 100644 index 000..f5aff82 --- /dev/null +++ b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireMatchingCoordinates.java @@ -0,0 +1,110 @@ +/* + * 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.maven.enforcer.rules; + +import javax.inject.Inject; +import javax.inject.Named; + +import java.util.Objects; +import java.util.regex.Pattern; + +import org.apache.maven.enforcer.rule.api.EnforcerRuleException; +import org.apache.maven.project.MavenProject; + +/** + * This rule checks that the Maven coordinates (i.e. the project's {@code groupId} and {@code artifactId}) each match a given pattern. + * @since 3.5.0 + */ +@Named("requireMatchingCoordinates") +public final class RequireMatchingCoordinates extends AbstractStandardEnforcerRule { + +private Pattern groupIdPattern; + +private Pattern artifactIdPattern; + +private boolean moduleNameMustMatchArtifactId; + +private final MavenProject project; + +@Inject +public RequireMatchingCoordinates(MavenProject project) { +this.project = Objects.requireNonNull(project); +} + +@Override +public void execute() throws EnforcerRuleException { +StringBuilder msgBuilder = new StringBuilder(); +if (groupIdPattern != null +&& !groupIdPattern.matcher(project.getGroupId()).matches()) { +msgBuilder +.append("Group ID must match pattern \"") +.append(groupIdPattern) +.append("\" but is \"") +.append(project.getGroupId()) +.append("\""); +} +if (artifactIdPattern != null +&& !artifactIdPattern.matcher(project.getArtifactId()).matches()) { +if (msgBuilder.length() > 0) { +msgBuilder.append(System.lineSeparator()); +} +msgBuilder +.append("Artifact ID must match pattern \"") +.append(artifactIdPattern) +.append("\" but is \"") +.append(project.getArtifactId()) +.append("\""); +} +if (moduleNameMustMatchArtifactId +&& !project.isExecutionRoot() +&& !project.getBasedir().getName().equals(project.getArtifactId())) { +if (msgBuilder.length() > 0) { +msgBuilder.append(System.lineSeparator()); +} +msgBuilder +.append("Module directory name must be equal to its artifact ID \"") +
(maven-doxia-sitetools) branch bugfix/pass-project-relative-path-as-reference-to-parser deleted (was 7bd1f4a)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/pass-project-relative-path-as-reference-to-parser in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git was 7bd1f4a fix stubbing as last argument may be null The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-doxia-sitetools) branch master updated: [DOXIASITETOOLS-334] Pass project-relative file path as reference to Parser (#142)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git The following commit(s) were added to refs/heads/master by this push: new 79086a0 [DOXIASITETOOLS-334] Pass project-relative file path as reference to Parser (#142) 79086a0 is described below commit 79086a0a3f4b256ff053bb771aefaa6387d2d7cb Author: Konrad Windszus AuthorDate: Wed Apr 3 10:05:58 2024 +0200 [DOXIASITETOOLS-334] Pass project-relative file path as reference to Parser (#142) --- .../java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java | 2 +- .../org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java index c37562e..34ef319 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java @@ -366,7 +366,7 @@ public class DefaultSiteRenderer implements Renderer { } } -doxia.parse(reader, docRenderingContext.getParserId(), sink, docRenderingContext.getInputName()); +doxia.parse(reader, docRenderingContext.getParserId(), sink, docRenderingContext.getDoxiaSourcePath()); } catch (ParserNotFoundException e) { throw new RendererException("Error getting a parser for '" + doc + "'", e); } catch (ParseException e) { diff --git a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java index f9c1a0b..6762d50 100644 --- a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java +++ b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java @@ -145,7 +145,7 @@ public class DefaultSiteRendererTest { Doxia doxiaSpy = spy(doxiaInstance); Mockito.doThrow(new ParseException(exceptionMessage)) .when(doxiaSpy) -.parse(Mockito.any(), Mockito.anyString(), Mockito.any(), Mockito.anyString()); +.parse(Mockito.any(), Mockito.anyString(), Mockito.any(), Mockito.nullable(String.class)); SiteRenderer siteRenderer = container.lookup(SiteRenderer.class); ReflectionUtils.setVariableValueInObject(siteRenderer, "doxia", doxiaSpy); @@ -176,7 +176,7 @@ public class DefaultSiteRendererTest { Doxia doxiaSpy = spy(doxiaInstance); Mockito.doThrow(new ParseException(exceptionMessage, 42, 36)) .when(doxiaSpy) -.parse(Mockito.any(), Mockito.anyString(), Mockito.any(), Mockito.anyString()); +.parse(Mockito.any(), Mockito.anyString(), Mockito.any(), Mockito.nullable(String.class)); SiteRenderer siteRenderer = container.lookup(SiteRenderer.class); ReflectionUtils.setVariableValueInObject(siteRenderer, "doxia", doxiaSpy);
(maven-doxia-sitetools) branch bugfix/pass-project-relative-path-as-reference-to-parser updated (2f27f64 -> 7bd1f4a)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/pass-project-relative-path-as-reference-to-parser in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git omit 2f27f64 fix stubbing as last argument may be null add 7bd1f4a fix stubbing as last argument may be null This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (2f27f64) \ N -- N -- N refs/heads/bugfix/pass-project-relative-path-as-reference-to-parser (7bd1f4a) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
(maven-doxia-sitetools) branch bugfix/pass-project-relative-path-as-reference-to-parser updated (f92a770 -> 2f27f64)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/pass-project-relative-path-as-reference-to-parser in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git from f92a770 [DOXIASITETOOL-334] Pass project-relative file path as reference to Parser add 2f27f64 fix stubbing as last argument may be null No new revisions were added by this update. Summary of changes: .../org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
(maven-doxia-sitetools) 01/01: [DOXIASITETOOL-334] Pass project-relative file path as reference to Parser
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch bugfix/pass-project-relative-path-as-reference-to-parser in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git commit f92a770bc2bafa23290d07874830199a48051c76 Author: Konrad Windszus AuthorDate: Tue Apr 2 19:34:27 2024 +0200 [DOXIASITETOOL-334] Pass project-relative file path as reference to Parser --- .../java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java index c37562e..34ef319 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java @@ -366,7 +366,7 @@ public class DefaultSiteRenderer implements Renderer { } } -doxia.parse(reader, docRenderingContext.getParserId(), sink, docRenderingContext.getInputName()); +doxia.parse(reader, docRenderingContext.getParserId(), sink, docRenderingContext.getDoxiaSourcePath()); } catch (ParserNotFoundException e) { throw new RendererException("Error getting a parser for '" + doc + "'", e); } catch (ParseException e) {
(maven-doxia-sitetools) branch bugfix/pass-project-relative-path-as-reference-to-parser created (now f92a770)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/pass-project-relative-path-as-reference-to-parser in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git at f92a770 [DOXIASITETOOL-334] Pass project-relative file path as reference to Parser This branch includes the following new commits: new f92a770 [DOXIASITETOOL-334] Pass project-relative file path as reference to Parser The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven-doxia) branch master updated: [DOXIA-723] Improve logging for null references
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia.git The following commit(s) were added to refs/heads/master by this push: new 3aea5e4e [DOXIA-723] Improve logging for null references 3aea5e4e is described below commit 3aea5e4e20315f1a6a88edbacd2ee30e183c875b Author: Konrad Windszus AuthorDate: Tue Apr 2 10:16:50 2024 +0200 [DOXIA-723] Improve logging for null references --- .../src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java| 2 ++ 1 file changed, 2 insertions(+) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java index fe75a06e..c98df474 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java @@ -454,6 +454,8 @@ public abstract class AbstractSink implements Sink, Markup { if (locator.getReference() != null) { buffer.append(locator.getReference()); +} else { +buffer.append("Unknown source"); } if (locator.getLineNumber() > 0) { buffer.append(", line ").append(locator.getLineNumber());
(maven-doxia) branch bugfix/expose-document-location-via-bufferingsinkproxy deleted (was 63a4e3dd)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/expose-document-location-via-bufferingsinkproxy in repository https://gitbox.apache.org/repos/asf/maven-doxia.git was 63a4e3dd DOXIA-723 correctly expose document location through BufferingSinkProxy The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-doxia) branch master updated: DOXIA-723 correctly expose document location through BufferingSinkProxy (#206)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia.git The following commit(s) were added to refs/heads/master by this push: new 3cde902e DOXIA-723 correctly expose document location through BufferingSinkProxy (#206) 3cde902e is described below commit 3cde902e33d906a43c298e3228d92de8e371918d Author: Konrad Windszus AuthorDate: Mon Apr 1 18:24:13 2024 +0200 DOXIA-723 correctly expose document location through BufferingSinkProxy (#206) Add tests --- .../doxia/sink/impl/BufferingSinkProxyFactory.java | 9 .../sink/impl/BufferingSinkProxyFactoryTest.java | 56 ++ 2 files changed, 65 insertions(+) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java index 17fb1f0e..3d8a3965 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java @@ -61,11 +61,13 @@ public class BufferingSinkProxyFactory implements SinkWrapperFactory { private final Sink delegate; private static final Method FLUSH_METHOD; private static final Method GET_BUFFERED_SINK_METHOD; +private static final Method GET_DOCUMENT_LOCATOR_METHOD; static { try { FLUSH_METHOD = Sink.class.getMethod("flush"); GET_BUFFERED_SINK_METHOD = BufferingSink.class.getMethod("getBufferedSink"); +GET_DOCUMENT_LOCATOR_METHOD = BufferingSink.class.getMethod("getDocumentLocator"); } catch (NoSuchMethodException | SecurityException e) { throw new IllegalStateException("Could not find flush method in Sink!", e); } @@ -83,9 +85,16 @@ public class BufferingSinkProxyFactory implements SinkWrapperFactory { bufferedInvocations.clear(); } else if (method.equals(GET_BUFFERED_SINK_METHOD)) { return delegate; +} else if (method.equals(GET_DOCUMENT_LOCATOR_METHOD)) { +return delegate.getDocumentLocator(); } else { bufferedInvocations.add(new MethodWithArguments(method, args)); } +if (method.getReturnType() != Void.TYPE) { +throw new IllegalStateException( +"BufferingSinkProxy only works for methods returning void, but given method " + method ++ " requires another return type"); +} return null; } } diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java new file mode 100644 index ..1864b143 --- /dev/null +++ b/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java @@ -0,0 +1,56 @@ +/* + * 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.maven.doxia.sink.impl; + +import org.apache.maven.doxia.parser.AbstractParserTest; +import org.apache.maven.doxia.sink.Sink; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class BufferingSinkProxyFactoryTest { + +@Test +void testCastAsBufferingSink() { +SinkEventTestingSink testingSink = new SinkEventTestingSink(); +assertThrows(IllegalArgumentException.class, () -> BufferingSinkProxyFactory.castAsBufferingSink(testingSink)); +BufferingSinkProxyFactory factory = new BufferingSinkProxyFactory(); +Sink bufferingSink = factory.createWrapper(testingSink); +BufferingSinkProxyFactory.castAsBufferingSink(bufferingSink); +} + +@T
(maven-doxia) 01/01: DOXIA-723 correctly expose document location through BufferingSinkProxy
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch bugfix/expose-document-location-via-bufferingsinkproxy in repository https://gitbox.apache.org/repos/asf/maven-doxia.git commit 63a4e3dd56c13536b3a82b0e2ba64ad2a7fa440a Author: Konrad Windszus AuthorDate: Mon Apr 1 15:21:49 2024 +0200 DOXIA-723 correctly expose document location through BufferingSinkProxy Add tests --- .../doxia/sink/impl/BufferingSinkProxyFactory.java | 9 .../sink/impl/BufferingSinkProxyFactoryTest.java | 56 ++ 2 files changed, 65 insertions(+) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java index 17fb1f0e..3d8a3965 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java @@ -61,11 +61,13 @@ public class BufferingSinkProxyFactory implements SinkWrapperFactory { private final Sink delegate; private static final Method FLUSH_METHOD; private static final Method GET_BUFFERED_SINK_METHOD; +private static final Method GET_DOCUMENT_LOCATOR_METHOD; static { try { FLUSH_METHOD = Sink.class.getMethod("flush"); GET_BUFFERED_SINK_METHOD = BufferingSink.class.getMethod("getBufferedSink"); +GET_DOCUMENT_LOCATOR_METHOD = BufferingSink.class.getMethod("getDocumentLocator"); } catch (NoSuchMethodException | SecurityException e) { throw new IllegalStateException("Could not find flush method in Sink!", e); } @@ -83,9 +85,16 @@ public class BufferingSinkProxyFactory implements SinkWrapperFactory { bufferedInvocations.clear(); } else if (method.equals(GET_BUFFERED_SINK_METHOD)) { return delegate; +} else if (method.equals(GET_DOCUMENT_LOCATOR_METHOD)) { +return delegate.getDocumentLocator(); } else { bufferedInvocations.add(new MethodWithArguments(method, args)); } +if (method.getReturnType() != Void.TYPE) { +throw new IllegalStateException( +"BufferingSinkProxy only works for methods returning void, but given method " + method ++ " requires another return type"); +} return null; } } diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java new file mode 100644 index ..1864b143 --- /dev/null +++ b/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java @@ -0,0 +1,56 @@ +/* + * 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.maven.doxia.sink.impl; + +import org.apache.maven.doxia.parser.AbstractParserTest; +import org.apache.maven.doxia.sink.Sink; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class BufferingSinkProxyFactoryTest { + +@Test +void testCastAsBufferingSink() { +SinkEventTestingSink testingSink = new SinkEventTestingSink(); +assertThrows(IllegalArgumentException.class, () -> BufferingSinkProxyFactory.castAsBufferingSink(testingSink)); +BufferingSinkProxyFactory factory = new BufferingSinkProxyFactory(); +Sink bufferingSink = factory.createWrapper(testingSink); +BufferingSinkProxyFactory.castAsBufferingSink(bufferingSink); +} + +@Test +void testBufferingSink() { +SinkEventTestingSink testingSink = new SinkEventTestingSink(); +BufferingSinkProxyFactory factory = new Buffering
(maven-doxia) branch bugfix/expose-document-location-via-bufferingsinkproxy updated (db3ab469 -> 63a4e3dd)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/expose-document-location-via-bufferingsinkproxy in repository https://gitbox.apache.org/repos/asf/maven-doxia.git omit db3ab469 DOXIA-723 correctly expose document location through BufferingSinkProxy new 63a4e3dd DOXIA-723 correctly expose document location through BufferingSinkProxy This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (db3ab469) \ N -- N -- N refs/heads/bugfix/expose-document-location-via-bufferingsinkproxy (63a4e3dd) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../sink/impl/BufferingSinkProxyFactoryTest.java | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-)
(maven-doxia) 01/01: DOXIA-723 correctly expose document location through BufferingSinkProxy
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch bugfix/expose-document-location-via-bufferingsinkproxy in repository https://gitbox.apache.org/repos/asf/maven-doxia.git commit db3ab469a7bc65065dd387c6c5b6a09328dea67e Author: Konrad Windszus AuthorDate: Mon Apr 1 15:21:49 2024 +0200 DOXIA-723 correctly expose document location through BufferingSinkProxy Add tests --- .../doxia/sink/impl/BufferingSinkProxyFactory.java | 9 ++ .../sink/impl/BufferingSinkProxyFactoryTest.java | 36 ++ 2 files changed, 45 insertions(+) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java index 17fb1f0e..3d8a3965 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactory.java @@ -61,11 +61,13 @@ public class BufferingSinkProxyFactory implements SinkWrapperFactory { private final Sink delegate; private static final Method FLUSH_METHOD; private static final Method GET_BUFFERED_SINK_METHOD; +private static final Method GET_DOCUMENT_LOCATOR_METHOD; static { try { FLUSH_METHOD = Sink.class.getMethod("flush"); GET_BUFFERED_SINK_METHOD = BufferingSink.class.getMethod("getBufferedSink"); +GET_DOCUMENT_LOCATOR_METHOD = BufferingSink.class.getMethod("getDocumentLocator"); } catch (NoSuchMethodException | SecurityException e) { throw new IllegalStateException("Could not find flush method in Sink!", e); } @@ -83,9 +85,16 @@ public class BufferingSinkProxyFactory implements SinkWrapperFactory { bufferedInvocations.clear(); } else if (method.equals(GET_BUFFERED_SINK_METHOD)) { return delegate; +} else if (method.equals(GET_DOCUMENT_LOCATOR_METHOD)) { +return delegate.getDocumentLocator(); } else { bufferedInvocations.add(new MethodWithArguments(method, args)); } +if (method.getReturnType() != Void.TYPE) { +throw new IllegalStateException( +"BufferingSinkProxy only works for methods returning void, but given method " + method ++ " requires another return type"); +} return null; } } diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java new file mode 100644 index ..c012bd34 --- /dev/null +++ b/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/BufferingSinkProxyFactoryTest.java @@ -0,0 +1,36 @@ +package org.apache.maven.doxia.sink.impl; + +import org.apache.maven.doxia.parser.AbstractParserTest; +import org.apache.maven.doxia.sink.Sink; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class BufferingSinkProxyFactoryTest { + +@Test +void testCastAsBufferingSink() { +SinkEventTestingSink testingSink = new SinkEventTestingSink(); +assertThrows(IllegalArgumentException.class, () -> BufferingSinkProxyFactory.castAsBufferingSink(testingSink)); +BufferingSinkProxyFactory factory = new BufferingSinkProxyFactory(); +Sink bufferingSink = factory.createWrapper(testingSink); +BufferingSinkProxyFactory.castAsBufferingSink(bufferingSink); +} + +@Test +void testBufferingSink() { +SinkEventTestingSink testingSink = new SinkEventTestingSink(); +BufferingSinkProxyFactory factory = new BufferingSinkProxyFactory(); +Sink bufferingSink = factory.createWrapper(testingSink); +assertNotNull(bufferingSink.getDocumentLocator()); +assertEquals(testingSink, BufferingSinkProxyFactory.castAsBufferingSink(bufferingSink).getBufferedSink()); + +bufferingSink.text("buffered text"); +assertEquals(0, testingSink.getEventList().size()); + +bufferingSink.flush(); + AbstractParserTest.assertSinkStartsWith(testingSink.getEventList().iterator(), "text"); +} +}
(maven-doxia) branch bugfix/expose-document-location-via-bufferingsinkproxy created (now db3ab469)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/expose-document-location-via-bufferingsinkproxy in repository https://gitbox.apache.org/repos/asf/maven-doxia.git at db3ab469 DOXIA-723 correctly expose document location through BufferingSinkProxy This branch includes the following new commits: new db3ab469 DOXIA-723 correctly expose document location through BufferingSinkProxy The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven-scm) branch feature/expose-last-modified-date updated (8ad0ba825 -> 914dd6f11)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git from 8ad0ba825 Try harder to clean up on Windows add 914dd6f11 Properly close JGit repository No new revisions were added by this update. Summary of changes: .../maven/scm/provider/git/jgit/command/info/JGitInfoCommand.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)
(maven-scm) branch feature/expose-last-modified-date updated (224194b2a -> 8ad0ba825)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git from 224194b2a Don't use buggy clone add 8ad0ba825 Try harder to clean up on Windows No new revisions were added by this update. Summary of changes: .../git/jgit/command/info/JGitInfoCommandTckTest.java| 12 1 file changed, 12 insertions(+)
(maven-scm) branch feature/expose-last-modified-date updated (008182705 -> 9b182ffba)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git discard 008182705 Increase version to 2.1.0-SNAPSHOT add 9b182ffba Increase version to 2.1.0-SNAPSHOT This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (008182705) \ N -- N -- N refs/heads/feature/expose-last-modified-date (9b182ffba) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: maven-scm-api/pom.xml.versionsBackup | 59 -- maven-scm-client/pom.xml.versionsBackup| 117 -- .../pom.xml.versionsBackup | 48 - maven-scm-managers/pom.xml.versionsBackup | 38 maven-scm-plugin/pom.xml.versionsBackup| 236 - .../maven-scm-provider-hg/pom.xml.versionsBackup | 88 .../pom.xml.versionsBackup | 102 - .../pom.xml.versionsBackup | 101 - .../pom.xml.versionsBackup | 73 --- .../pom.xml.versionsBackup | 85 .../maven-scm-provider-jgit/pom.xml.versionsBackup | 120 --- .../maven-scm-providers-git/pom.xml.versionsBackup | 60 -- .../pom.xml.versionsBackup | 57 - .../pom.xml.versionsBackup | 101 - .../pom.xml.versionsBackup | 75 --- .../pom.xml.versionsBackup | 48 - .../maven-scm-providers-svn/pom.xml.versionsBackup | 59 -- maven-scm-providers/pom.xml.versionsBackup | 108 -- maven-scm-test/pom.xml.versionsBackup | 79 --- 19 files changed, 1654 deletions(-) delete mode 100644 maven-scm-api/pom.xml.versionsBackup delete mode 100644 maven-scm-client/pom.xml.versionsBackup delete mode 100644 maven-scm-managers/maven-scm-manager-plexus/pom.xml.versionsBackup delete mode 100644 maven-scm-managers/pom.xml.versionsBackup delete mode 100644 maven-scm-plugin/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-provider-hg/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-provider-local/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gittest/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-git/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-standard/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svntest/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/maven-scm-providers-svn/pom.xml.versionsBackup delete mode 100644 maven-scm-providers/pom.xml.versionsBackup delete mode 100644 maven-scm-test/pom.xml.versionsBackup
(maven-scm) branch feature/expose-last-modified-date updated (bbb7ec826 -> 008182705)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git omit bbb7ec826 Increase version to 2.1.0-SNAPSHOT add 008182705 Increase version to 2.1.0-SNAPSHOT This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (bbb7ec826) \ N -- N -- N refs/heads/feature/expose-last-modified-date (008182705) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: pom.xml.versionsBackup | 566 - 1 file changed, 566 deletions(-) delete mode 100644 pom.xml.versionsBackup
(maven-scm) branch feature/expose-last-modified-date updated (27d69fe27 -> bbb7ec826)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git from 27d69fe27 [SCM-914] Introduce properly typed last modified date add bbb7ec826 Increase version to 2.1.0-SNAPSHOT No new revisions were added by this update. Summary of changes: maven-scm-api/pom.xml | 2 +- maven-scm-api/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-client/pom.xml | 2 +- maven-scm-client/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-managers/maven-scm-manager-plexus/pom.xml | 2 +- .../maven-scm-manager-plexus/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-managers/pom.xml| 2 +- maven-scm-managers/{pom.xml => pom.xml.versionsBackup}| 0 maven-scm-plugin/pom.xml | 2 +- maven-scm-plugin/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-providers/maven-scm-provider-hg/pom.xml | 2 +- .../maven-scm-provider-hg/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-providers/maven-scm-provider-local/pom.xml | 2 +- .../maven-scm-provider-local/{pom.xml => pom.xml.versionsBackup} | 0 .../maven-scm-providers-git/maven-scm-provider-git-commons/pom.xml| 2 +- .../{pom.xml => pom.xml.versionsBackup} | 0 .../maven-scm-providers-git/maven-scm-provider-gitexe/pom.xml | 2 +- .../maven-scm-provider-gitexe/{pom.xml => pom.xml.versionsBackup} | 0 .../maven-scm-providers-git/maven-scm-provider-gittest/pom.xml| 2 +- .../maven-scm-provider-gittest/{pom.xml => pom.xml.versionsBackup}| 0 .../maven-scm-providers-git/maven-scm-provider-jgit/pom.xml | 2 +- .../maven-scm-provider-jgit/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-providers/maven-scm-providers-git/pom.xml | 2 +- .../maven-scm-providers-git/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-providers/maven-scm-providers-standard/pom.xml | 2 +- .../maven-scm-providers-standard/{pom.xml => pom.xml.versionsBackup} | 0 .../maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml| 2 +- .../{pom.xml => pom.xml.versionsBackup} | 0 .../maven-scm-providers-svn/maven-scm-provider-svnexe/pom.xml | 2 +- .../maven-scm-provider-svnexe/{pom.xml => pom.xml.versionsBackup} | 0 .../maven-scm-providers-svn/maven-scm-provider-svntest/pom.xml| 2 +- .../maven-scm-provider-svntest/{pom.xml => pom.xml.versionsBackup}| 0 maven-scm-providers/maven-scm-providers-svn/pom.xml | 2 +- .../maven-scm-providers-svn/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-providers/pom.xml | 2 +- maven-scm-providers/{pom.xml => pom.xml.versionsBackup} | 0 maven-scm-test/pom.xml| 2 +- maven-scm-test/{pom.xml => pom.xml.versionsBackup}| 0 pom.xml | 4 ++-- pom.xml => pom.xml.versionsBackup | 0 40 files changed, 21 insertions(+), 21 deletions(-) copy maven-scm-api/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-client/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-managers/maven-scm-manager-plexus/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-managers/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-plugin/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-provider-hg/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-provider-local/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gittest/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-providers-git/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-providers-standard/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/{pom.xml => pom.xml.versionsBackup} (100%) copy maven-scm-providers/maven-sc
(maven-scm) branch feature/expose-last-modified-date updated (6ba25bcb4 -> 27d69fe27)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git omit 6ba25bcb4 [SCM-914] Introduce properly typed last modified date add 90f9abc43 [SCM-1016] Update maven-parent to 41 (#195) add 27d69fe27 [SCM-914] Introduce properly typed last modified date This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (6ba25bcb4) \ N -- N -- N refs/heads/feature/expose-last-modified-date (27d69fe27) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: maven-scm-client/pom.xml | 5 .../maven-scm-provider-local/pom.xml | 4 +++ .../maven-scm-provider-git-commons/pom.xml | 4 +++ .../maven-scm-provider-svn-commons/pom.xml | 4 +++ maven-scm-test/pom.xml | 15 +++--- pom.xml| 32 ++ 6 files changed, 18 insertions(+), 46 deletions(-)
(maven-scm) branch master updated: [SCM-1016] Update maven-parent to 41 (#195)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-scm.git The following commit(s) were added to refs/heads/master by this push: new 90f9abc43 [SCM-1016] Update maven-parent to 41 (#195) 90f9abc43 is described below commit 90f9abc4397e269b929b039dda567f538b28375d Author: Konrad Windszus AuthorDate: Wed Mar 27 19:44:28 2024 +0100 [SCM-1016] Update maven-parent to 41 (#195) This fixes build with Java 21 due to using a newer palantir formatter. Removal of direct dependencies of legacy plexus annotations. --- maven-scm-client/pom.xml | 5 .../maven-scm-provider-local/pom.xml | 4 +++ .../maven-scm-provider-git-commons/pom.xml | 4 +++ .../maven-scm-provider-svn-commons/pom.xml | 4 +++ maven-scm-test/pom.xml | 15 +++--- pom.xml| 32 ++ 6 files changed, 18 insertions(+), 46 deletions(-) diff --git a/maven-scm-client/pom.xml b/maven-scm-client/pom.xml index e94a86539..739a2d90f 100644 --- a/maven-scm-client/pom.xml +++ b/maven-scm-client/pom.xml @@ -75,11 +75,6 @@ plexus-classworlds runtime - - org.codehaus.plexus - plexus-component-annotations - runtime - org.eclipse.sisu org.eclipse.sisu.plexus diff --git a/maven-scm-providers/maven-scm-provider-local/pom.xml b/maven-scm-providers/maven-scm-provider-local/pom.xml index 83e8444cf..a7089e63c 100644 --- a/maven-scm-providers/maven-scm-provider-local/pom.xml +++ b/maven-scm-providers/maven-scm-provider-local/pom.xml @@ -40,6 +40,10 @@ org.codehaus.plexus plexus-utils + + org.codehaus.plexus + plexus-xml + org.slf4j slf4j-api diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/pom.xml b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/pom.xml index cb2f84829..a760f342f 100644 --- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/pom.xml +++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/pom.xml @@ -36,6 +36,10 @@ org.codehaus.plexus plexus-utils + + org.codehaus.plexus + plexus-xml + org.slf4j slf4j-api diff --git a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml index 03a286027..a68b6b1b9 100644 --- a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml +++ b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml @@ -41,6 +41,10 @@ org.codehaus.plexus plexus-utils + + org.codehaus.plexus + plexus-xml + org.slf4j slf4j-api diff --git a/maven-scm-test/pom.xml b/maven-scm-test/pom.xml index c59c7aeba..6b3499390 100644 --- a/maven-scm-test/pom.xml +++ b/maven-scm-test/pom.xml @@ -40,22 +40,15 @@ org.codehaus.plexus plexus-utils - - org.eclipse.sisu - org.eclipse.sisu.plexus - - - org.codehaus.plexus - plexus-classworlds - runtime + plexus-xml - org.codehaus.plexus - plexus-component-annotations - runtime + org.eclipse.sisu + org.eclipse.sisu.plexus + org.apache.maven.scm maven-scm-manager-plexus diff --git a/pom.xml b/pom.xml index 07f98f8ee..613ad8cf7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.apache.maven maven-parent -39 +41 @@ -249,38 +249,17 @@ plexus-classworlds 2.6.0 - -org.codehaus.plexus -plexus-component-annotations -2.1.1 - javax.inject javax.inject 1 - -org.eclipse.sisu -org.eclipse.sisu.plexus -${sisuVersion} - - -org.codehaus.plexus -plexus-component-annotations - - - com.google.inject guice 4.2.3 no_aop - -org.codehaus.plexus -plexus-utils -3.5.1 - org.codehaus.plexus plexus-sec-dispatcher @@ -363,13 +342,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - -false - - @@ -390,7 +362,7 @@ -check-java-1.7-compat +check-java-8-compat check
(maven-scm) branch bugfix/update-to-maven-parent-41 deleted (was 06377e8e5)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/update-to-maven-parent-41 in repository https://gitbox.apache.org/repos/asf/maven-scm.git was 06377e8e5 [SCM-1016] Update maven-parent to 41 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-scm) branch bugfix/update-to-maven-parent-41 updated (5af3aa9f9 -> 06377e8e5)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/update-to-maven-parent-41 in repository https://gitbox.apache.org/repos/asf/maven-scm.git discard 5af3aa9f9 [SCM-1016] Update maven-parent to 41 add 06377e8e5 [SCM-1016] Update maven-parent to 41 This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (5af3aa9f9) \ N -- N -- N refs/heads/bugfix/update-to-maven-parent-41 (06377e8e5) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: maven-scm-providers/maven-scm-provider-local/pom.xml | 4 1 file changed, 4 insertions(+)
(maven-scm) branch bugfix/update-to-maven-parent-41 updated (1de9d5841 -> 5af3aa9f9)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/update-to-maven-parent-41 in repository https://gitbox.apache.org/repos/asf/maven-scm.git discard 1de9d5841 [SCM-1016] Update maven-parent to 41 add 5af3aa9f9 [SCM-1016] Update maven-parent to 41 This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (1de9d5841) \ N -- N -- N refs/heads/bugfix/update-to-maven-parent-41 (5af3aa9f9) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: maven-scm-client/pom.xml| 5 - .../maven-scm-provider-git-commons/pom.xml | 4 .../maven-scm-provider-svn-commons/pom.xml | 4 maven-scm-test/pom.xml | 15 --- pom.xml | 21 - 5 files changed, 12 insertions(+), 37 deletions(-)
(maven-scm) 01/01: [SCM-1016] Update maven-parent to 41
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch bugfix/update-to-maven-parent-41 in repository https://gitbox.apache.org/repos/asf/maven-scm.git commit 1de9d58410c4cf505ecfe9baa9fdb7c3c414c70e Author: Konrad Windszus AuthorDate: Wed Mar 27 18:33:54 2024 +0100 [SCM-1016] Update maven-parent to 41 This fixes build with Java 21 due to using a newer palantir formatter --- pom.xml | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 07f98f8ee..daa5f4dc4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.apache.maven maven-parent -39 +41 @@ -363,13 +363,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - -false - - @@ -390,7 +383,7 @@ -check-java-1.7-compat +check-java-8-compat check
(maven-scm) branch bugfix/update-to-maven-parent-41 created (now 1de9d5841)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/update-to-maven-parent-41 in repository https://gitbox.apache.org/repos/asf/maven-scm.git at 1de9d5841 [SCM-1016] Update maven-parent to 41 This branch includes the following new commits: new 1de9d5841 [SCM-1016] Update maven-parent to 41 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven-scm) branch feature/expose-last-modified-date updated (a35d3c61b -> 6ba25bcb4)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git discard a35d3c61b [SCM-914] Introduce properly typed last modified date add 6ba25bcb4 [SCM-914] Introduce properly typed last modified date This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (a35d3c61b) \ N -- N -- N refs/heads/feature/expose-last-modified-date (6ba25bcb4) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../src/main/java/org/apache/maven/scm/command/info/InfoItem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
(maven-scm) branch feature/expose-last-modified-date updated (c2eec5eb6 -> a35d3c61b)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git omit c2eec5eb6 [SCM-914] Introduce properly typed last modified date add a35d3c61b [SCM-914] Introduce properly typed last modified date This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (c2eec5eb6) \ N -- N -- N refs/heads/feature/expose-last-modified-date (a35d3c61b) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../maven/scm/provider/git/gitexe/command/info/GitInfoCommand.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)
(maven-scm) branch feature/expose-last-modified-date updated (a7cf6e94b -> c2eec5eb6)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/expose-last-modified-date in repository https://gitbox.apache.org/repos/asf/maven-scm.git omit a7cf6e94b [SCM-914] Introduce properly typed last modified date add c2eec5eb6 [SCM-914] Introduce properly typed last modified date This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (a7cf6e94b) \ N -- N -- N refs/heads/feature/expose-last-modified-date (c2eec5eb6) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../apache/maven/scm/command/info/InfoItem.java| 11 ++- .../org/apache/maven/scm/util/FilenameUtils.java | 2 +- .../git/gitexe/command/info/GitInfoConsumer.java | 6 +- .../GitExeInfoCommandTckTest.java} | 13 +-- .../GitInfoCommandTckTest.java}| 6 +- .../scm/provider/git/jgit/command/JGitUtils.java | 95 +++--- .../git/jgit/command/info/JGitInfoCommand.java | 43 ++ .../jgit/command/info/JGitInfoCommandTckTest.java | 19 ++--- .../svn/svnexe/command/info/SvnInfoConsumer.java | 2 +- .../SvnInfoCommandTckTest.java}| 9 +- .../scm/tck/command/info/InfoCommandTckTest.java | 66 +++ 11 files changed, 170 insertions(+), 102 deletions(-) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/{untag/GitExeUntagCommandTckTest.java => info/GitExeInfoCommandTckTest.java} (70%) copy maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gittest/src/main/java/org/apache/maven/scm/provider/git/command/{diff/GitDiffCommandTckTest.java => info/GitInfoCommandTckTest.java} (86%) copy maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java => maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/test/java/org/apache/maven/scm/provider/git/jgit/command/info/JGitInfoCommandTckTest.java (68%) copy maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svntest/src/main/java/org/apache/maven/scm/provider/svn/command/{remove/SvnRemoveCommandTckTest.java => info/SvnInfoCommandTckTest.java} (85%) create mode 100644 maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/info/InfoCommandTckTest.java
(maven-doxia-sitetools) branch feature/configure-with-plexus-configurator updated (adc2018 -> b086a5f)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git discard adc2018 [DOXIASITETOOLS-324] Allow configuration of parsers add b086a5f [DOXIASITETOOLS-324] Allow configuration of parsers This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (adc2018) \ N -- N -- N refs/heads/feature/configure-with-plexus-configurator (b086a5f) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../org/apache/maven/doxia/siterenderer/SiteRenderingContext.java | 8 1 file changed, 4 insertions(+), 4 deletions(-)
(maven-enforcer) branch feature/require-matching-coordinates updated (00d3a0e -> f8430ef)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/require-matching-coordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git discard 00d3a0e [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns add f8430ef [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (00d3a0e) \ N -- N -- N refs/heads/feature/require-matching-coordinates (f8430ef) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../src/it/projects/require-dependency-scope/verify.groovy | 5 ++--- .../src/it/projects/require-matching-coordinates/verify.groovy | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-)
(maven-enforcer) branch feature/require-matching-coordinates updated (e30eb8f -> 00d3a0e)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/require-matching-coordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git discard e30eb8f [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns add 00d3a0e [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (e30eb8f) \ N -- N -- N refs/heads/feature/require-matching-coordinates (00d3a0e) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: enforcer-rules/src/site/apt/index.apt| 2 +- .../src/it/projects/require-dependency-scope/verify.groovy | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
(maven-enforcer) branch feature/require-matching-coordinates created (now e30eb8f)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/require-matching-coordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git at e30eb8f [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns This branch includes the following new commits: new e30eb8f [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven-enforcer) 01/01: [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/require-matching-coordinates in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git commit e30eb8f173164d2ed223065db962eef91dc69db4 Author: Konrad Windszus AuthorDate: Fri Mar 22 20:41:04 2024 +0100 [MENFORCER-500] New rule to enforce that Maven coordinates match given patterns Optionally allows to enforce the module directory name being equal to the module's artifactId. --- .../enforcer/rules/RequireMatchingCoordinates.java | 110 + enforcer-rules/src/site/apt/index.apt | 2 + .../src/site/apt/requireMatchingCoordinates.apt.vm | 75 ++ .../require-matching-coordinates/mod2/pom.xml | 43 .../projects/require-matching-coordinates/pom.xml | 75 ++ .../test-multimodule-mod1/pom.xml | 37 +++ .../require-matching-coordinates/verify.groovy | 23 + 7 files changed, 365 insertions(+) diff --git a/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireMatchingCoordinates.java b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireMatchingCoordinates.java new file mode 100644 index 000..f5aff82 --- /dev/null +++ b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireMatchingCoordinates.java @@ -0,0 +1,110 @@ +/* + * 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.maven.enforcer.rules; + +import javax.inject.Inject; +import javax.inject.Named; + +import java.util.Objects; +import java.util.regex.Pattern; + +import org.apache.maven.enforcer.rule.api.EnforcerRuleException; +import org.apache.maven.project.MavenProject; + +/** + * This rule checks that the Maven coordinates (i.e. the project's {@code groupId} and {@code artifactId}) each match a given pattern. + * @since 3.5.0 + */ +@Named("requireMatchingCoordinates") +public final class RequireMatchingCoordinates extends AbstractStandardEnforcerRule { + +private Pattern groupIdPattern; + +private Pattern artifactIdPattern; + +private boolean moduleNameMustMatchArtifactId; + +private final MavenProject project; + +@Inject +public RequireMatchingCoordinates(MavenProject project) { +this.project = Objects.requireNonNull(project); +} + +@Override +public void execute() throws EnforcerRuleException { +StringBuilder msgBuilder = new StringBuilder(); +if (groupIdPattern != null +&& !groupIdPattern.matcher(project.getGroupId()).matches()) { +msgBuilder +.append("Group ID must match pattern \"") +.append(groupIdPattern) +.append("\" but is \"") +.append(project.getGroupId()) +.append("\""); +} +if (artifactIdPattern != null +&& !artifactIdPattern.matcher(project.getArtifactId()).matches()) { +if (msgBuilder.length() > 0) { +msgBuilder.append(System.lineSeparator()); +} +msgBuilder +.append("Artifact ID must match pattern \"") +.append(artifactIdPattern) +.append("\" but is \"") +.append(project.getArtifactId()) +.append("\""); +} +if (moduleNameMustMatchArtifactId +&& !project.isExecutionRoot() +&& !project.getBasedir().getName().equals(project.getArtifactId())) { +if (msgBuilder.length() > 0) { +msgBuilder.append(System.lineSeparator()); +} +msgBuilder +.append("Module directory name must be equal to its artifact ID \"") +.append(project.getArtifactId()) +.append("\" but is \"") +.append(project.getBasedir().getName()) +.append(
(maven-doxia-sitetools) 01/01: [DOXIASITETOOLS-324] Allow configuration of parsers
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git commit adc20189c7cb7cc890d3aecf0fe05022d5977379 Author: Konrad Windszus AuthorDate: Wed Mar 20 17:07:35 2024 +0100 [DOXIASITETOOLS-324] Allow configuration of parsers Introduce interface ParserConfigurator which can be passed to SiteRenderingContext --- .../doxia/siterenderer/DefaultSiteRenderer.java| 13 ++-- .../doxia/siterenderer/ParserConfigurator.java | 38 ++ .../doxia/siterenderer/SiteRenderingContext.java | 20 3 files changed, 68 insertions(+), 3 deletions(-) diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java index c37562e..cfec91a 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java @@ -320,9 +320,16 @@ public class DefaultSiteRenderer implements Renderer { String resource = doc.getAbsolutePath(); Parser parser = doxia.getParser(docRenderingContext.getParserId()); -// DOXIASITETOOLS-146 don't render comments from source markup -parser.setEmitComments(false); -parser.setEmitAnchorsForIndexableEntries(true); +ParserConfigurator configurator = siteContext.getParserConfigurator(); +boolean isConfigured = false; +if (configurator != null) { +isConfigured = configurator.configure(docRenderingContext.getParserId(), doc.toPath(), parser); +} +if (!isConfigured) { +// DOXIASITETOOLS-146 don't render comments from source markup +parser.setEmitComments(false); +parser.setEmitAnchorsForIndexableEntries(true); +} // TODO: DOXIA-111: the filter used here must be checked generally. if (docRenderingContext.getAttribute("velocity") != null) { diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java new file mode 100644 index 000..4475da7 --- /dev/null +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java @@ -0,0 +1,38 @@ +/* + * 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.maven.doxia.siterenderer; + +import java.nio.file.Path; + +import org.apache.maven.doxia.parser.Parser; + +/** + * Interface which allows to configure a particular {@link Parser} before it is being used. + */ +public interface ParserConfigurator { + +/** + * Configures the given parser, which is afterwards used to parse the source file with the given path. + * @param parserId the parser id + * @param filePath the absolute path of the file to parse + * @param parser the parser to configure + * @return {@code true} if the parser has been configured, otherwise {@code false} + */ +boolean configure(String parserId, Path filePath, Parser parser); +} diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java index 12733d0..73561a3 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java @@ -72,6 +72,8 @@ public class SiteRenderingContext { private File processedContentOutput; +private ParserConfigurator parserConfigurator; + /** * If input documents should be validated before parsing. * By default no validation is performed. @@ -388,4 +390,22 @@ public class Site
(maven-doxia-sitetools) branch feature/configure-with-plexus-configurator updated (891592d -> adc2018)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git omit 891592d [DOXIASITETOOLS-324] Allow configuration of parsers new adc2018 [DOXIASITETOOLS-324] Allow configuration of parsers This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (891592d) \ N -- N -- N refs/heads/feature/configure-with-plexus-configurator (adc2018) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java | 1 - .../java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java| 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
(maven-doxia-sitetools) 01/01: [DOXIASITETOOLS-324] Allow configuration of parsers
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git commit 891592df2c2e6839fce3902f3485e1d2a747395e Author: Konrad Windszus AuthorDate: Wed Mar 20 17:07:35 2024 +0100 [DOXIASITETOOLS-324] Allow configuration of parsers Introduce interface ParserConfigurator which can be passed to SiteRenderingContext --- .../doxia/siterenderer/DefaultSiteRenderer.java| 14 ++-- .../doxia/siterenderer/ParserConfigurator.java | 38 ++ .../doxia/siterenderer/SiteRenderingContext.java | 20 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java index c37562e..8db7382 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java @@ -33,6 +33,7 @@ import java.io.StringWriter; import java.io.Writer; import java.net.URL; import java.net.URLClassLoader; +import java.nio.file.Paths; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -320,9 +321,16 @@ public class DefaultSiteRenderer implements Renderer { String resource = doc.getAbsolutePath(); Parser parser = doxia.getParser(docRenderingContext.getParserId()); -// DOXIASITETOOLS-146 don't render comments from source markup -parser.setEmitComments(false); -parser.setEmitAnchorsForIndexableEntries(true); +ParserConfigurator configurator = siteContext.getParserConfigurator(); +boolean isConfigured = false; +if (configurator != null) { +isConfigured = configurator.configure(docRenderingContext.getParserId(), doc.toPath(), parser); +} +if (!isConfigured) { +// DOXIASITETOOLS-146 don't render comments from source markup +parser.setEmitComments(false); +parser.setEmitAnchorsForIndexableEntries(true); +} // TODO: DOXIA-111: the filter used here must be checked generally. if (docRenderingContext.getAttribute("velocity") != null) { diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java new file mode 100644 index 000..d7ac268 --- /dev/null +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java @@ -0,0 +1,38 @@ +/* + * 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.maven.doxia.siterenderer; + +import java.nio.file.Path; + +import org.apache.maven.doxia.parser.Parser; + +/** + * Interface which allows to configure a particular {@link Parser} before it is being used. + */ +public interface ParserConfigurator { + +/** + * Configures the given parser, which is afterwards used to parse the given source file. + * @param parserId the parser id + * @param filePath the absolute path of the file to parse + * @param parser the parser to configure + * @return {@code true} if the parser has been configured, otherwise {@code false} + */ +boolean configure(String parserId, Path filePath, Parser parser); +} diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java index 12733d0..73561a3 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java @@ -72,6 +72,8 @@ public class SiteRenderingContext { private File processe
(maven-doxia-sitetools) branch feature/configure-with-plexus-configurator updated (0c1d1a9 -> 891592d)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git discard 0c1d1a9 [MSITE-1000] Allow parametrisation of parsers new 891592d [DOXIASITETOOLS-324] Allow configuration of parsers This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (0c1d1a9) \ N -- N -- N refs/heads/feature/configure-with-plexus-configurator (891592d) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes:
(maven-doxia-sitetools) branch feature/configure-with-plexus-configurator created (now 0c1d1a9)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git at 0c1d1a9 [MSITE-1000] Allow parametrisation of parsers This branch includes the following new commits: new 0c1d1a9 [MSITE-1000] Allow parametrisation of parsers The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven-doxia-sitetools) 01/01: [MSITE-1000] Allow parametrisation of parsers
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/configure-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git commit 0c1d1a90ab0c2a09d374dba4dc83c0ee9ee479c8 Author: Konrad Windszus AuthorDate: Wed Mar 20 17:07:35 2024 +0100 [MSITE-1000] Allow parametrisation of parsers Introduce interface ParserConfigurator which can be passed to SiteRenderingContext --- .../doxia/siterenderer/DefaultSiteRenderer.java| 14 ++-- .../doxia/siterenderer/ParserConfigurator.java | 38 ++ .../doxia/siterenderer/SiteRenderingContext.java | 20 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java index c37562e..8db7382 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java @@ -33,6 +33,7 @@ import java.io.StringWriter; import java.io.Writer; import java.net.URL; import java.net.URLClassLoader; +import java.nio.file.Paths; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -320,9 +321,16 @@ public class DefaultSiteRenderer implements Renderer { String resource = doc.getAbsolutePath(); Parser parser = doxia.getParser(docRenderingContext.getParserId()); -// DOXIASITETOOLS-146 don't render comments from source markup -parser.setEmitComments(false); -parser.setEmitAnchorsForIndexableEntries(true); +ParserConfigurator configurator = siteContext.getParserConfigurator(); +boolean isConfigured = false; +if (configurator != null) { +isConfigured = configurator.configure(docRenderingContext.getParserId(), doc.toPath(), parser); +} +if (!isConfigured) { +// DOXIASITETOOLS-146 don't render comments from source markup +parser.setEmitComments(false); +parser.setEmitAnchorsForIndexableEntries(true); +} // TODO: DOXIA-111: the filter used here must be checked generally. if (docRenderingContext.getAttribute("velocity") != null) { diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java new file mode 100644 index 000..d7ac268 --- /dev/null +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ParserConfigurator.java @@ -0,0 +1,38 @@ +/* + * 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.maven.doxia.siterenderer; + +import java.nio.file.Path; + +import org.apache.maven.doxia.parser.Parser; + +/** + * Interface which allows to configure a particular {@link Parser} before it is being used. + */ +public interface ParserConfigurator { + +/** + * Configures the given parser, which is afterwards used to parse the given source file. + * @param parserId the parser id + * @param filePath the absolute path of the file to parse + * @param parser the parser to configure + * @return {@code true} if the parser has been configured, otherwise {@code false} + */ +boolean configure(String parserId, Path filePath, Parser parser); +} diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java index 12733d0..73561a3 100644 --- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java +++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SiteRenderingContext.java @@ -72,6 +72,8 @@ public class SiteRenderingContext { private File processe
(maven-site-plugin) 01/01: [MSITE-1000] Introduce parser configuration parameter
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/configure-parser-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git commit 614a05759cd41ef63ed3c7ce351c49ec89a480a9 Author: Konrad Windszus AuthorDate: Sat Dec 30 12:47:52 2023 +0100 [MSITE-1000] Introduce parser configuration parameter This leverages PlexusConfigurator under the hood --- pom.xml| 2 +- .../site/render/AbstractSiteRenderingMojo.java | 43 +- .../site/render/ParserConfiguratorImpl.java| 156 + .../site/render/PlexusConfigurationUtils.java | 48 +++ .../apache/maven/plugins/site/render/SiteMojo.java | 16 ++- .../apache/maven/plugins/site/run/SiteRunMojo.java | 7 +- 6 files changed, 262 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index b9d095c4..a53174eb 100644 --- a/pom.xml +++ b/pom.xml @@ -199,7 +199,7 @@ under the License. 9.4.53.v20231009 2.0.0-M8 -2.0.0-M16 +2.0.0-M18-SNAPSHOT 3.5.3 1.7.36 diff --git a/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java b/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java index 8906cbc8..2d9049f7 100644 --- a/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java +++ b/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java @@ -37,6 +37,7 @@ import org.apache.maven.doxia.site.MenuItem; import org.apache.maven.doxia.site.SiteModel; import org.apache.maven.doxia.siterenderer.DocumentRenderer; import org.apache.maven.doxia.siterenderer.DocumentRenderingContext; +import org.apache.maven.doxia.siterenderer.ParserConfigurator; import org.apache.maven.doxia.siterenderer.RendererException; import org.apache.maven.doxia.siterenderer.SiteRenderer; import org.apache.maven.doxia.siterenderer.SiteRenderingContext; @@ -57,6 +58,8 @@ import org.apache.maven.reporting.exec.MavenReportExecution; import org.apache.maven.reporting.exec.MavenReportExecutor; import org.apache.maven.reporting.exec.MavenReportExecutorRequest; import org.apache.maven.shared.utils.WriterFactory; +import org.codehaus.plexus.component.repository.exception.ComponentLookupException; +import org.codehaus.plexus.configuration.PlexusConfiguration; import org.codehaus.plexus.util.ReaderFactory; import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; @@ -94,6 +97,37 @@ public abstract class AbstractSiteRenderingMojo extends AbstractSiteDescriptorMo @Parameter private Map attributes; +/** + * Parser configurations (per matching Doxia markup source file path patterns). + * Each configuration item has the following format: + * + * + * parserId + * configurations + * configuration + * patterns + * patternglob:***.md/pattern!-- is either glob or regex syntax with the according prefix -- + * /patterns + * !-- all configurations apart from pattern are directly applied to the underlying parser -- + * emitCommentstrue/emitComments!-- false by default -- + * emitAnchorsForIndexableEntriesfalse/emitAnchorsForIndexableEntries!-- true by default -- + * /configuration + * /configurations + * /parserId + * + * The configuration is only applied if both + * + * the parser id matches the parser used for a specific markup source file and + * one of the given patterns matches the Doxia markup source file path (or no pattern is given at all). + * + * + * The first matching configuration wins (i.e. is applied). + * @since 4.0.0 + * @see java.nio.file.FileSystem#getPathMatcher(String) FileSystem.getPathMatcher(String) for the supported patterns + */ +@Parameter +private Map> parserConfigurations; + /** * Site renderer. */ @@ -269,7 +303,12 @@ public abstract class AbstractSiteRenderingMojo extends AbstractSiteDescriptorMo return reportingPlugins.toArray(new ReportPlugin[0]); } -protected SiteRenderingContext createSiteRenderingContext(Locale locale) +protected ParserConfiguratorImpl createParserConfigurator() throws ComponentLookupException { +return new ParserConfiguratorImpl( +parserConfigurations, mavenSession.getContainer(), mojoExecution.getMojoDescriptor()); +} + +protected SiteRenderingContext createSiteRenderingContext(Locale locale, ParserConfigurator parserConfigurator) throws MojoExecutionException, IOException, MojoFailureException { SiteModel siteModel = prepareSiteModel(locale); Map templateProperties = new HashMap<>(); @@ -329,7 +368,7 @@ public abstract class AbstractSiteRenderingMojo extends AbstractSiteDes
(maven-site-plugin) branch feature/configure-parser-with-plexus-configurator created (now 614a0575)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/configure-parser-with-plexus-configurator in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git at 614a0575 [MSITE-1000] Introduce parser configuration parameter This branch includes the following new commits: new 614a0575 [MSITE-1000] Introduce parser configuration parameter The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven-doxia) branch master updated: [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia.git The following commit(s) were added to refs/heads/master by this push: new 13d14b24 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements 13d14b24 is described below commit 13d14b249672ce20896865546aadb73c87e75db0 Author: Konrad Windszus AuthorDate: Thu Mar 14 18:13:30 2024 +0100 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements --- .../maven/doxia/parser/AbstractXmlParser.java | 9 +- .../maven/doxia/parser/Xhtml1BaseParser.java | 180 .../maven/doxia/parser/Xhtml5BaseParser.java | 312 +++-- .../apache/maven/doxia/module/xdoc/XdocParser.java | 4 +- .../maven/doxia/module/xdoc/XdocParserTest.java| 54 .../maven/doxia/module/xdoc/XdocSinkTest.java | 15 - 6 files changed, 402 insertions(+), 172 deletions(-) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java index 92440b30..d06ee555 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java @@ -379,11 +379,14 @@ public abstract class AbstractXmlParser extends AbstractParser implements XmlMar * method. */ protected void handleUnknown(XmlPullParser parser, Sink sink, int type) { -Object[] required = new Object[] {type}; - SinkEventAttributeSet attribs = getAttributesFromParser(parser); -sink.unknown(parser.getName(), required, attribs); +handleUnknown(parser.getName(), attribs, sink, type); +} + +protected void handleUnknown(String elementName, SinkEventAttributeSet attribs, Sink sink, int type) { +Object[] required = new Object[] {type}; +sink.unknown(elementName, required, attribs); } /** diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/parser/Xhtml1BaseParser.java b/doxia-core/src/main/java/org/apache/maven/doxia/parser/Xhtml1BaseParser.java new file mode 100644 index ..1513608c --- /dev/null +++ b/doxia-core/src/main/java/org/apache/maven/doxia/parser/Xhtml1BaseParser.java @@ -0,0 +1,180 @@ +/* + * 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.maven.doxia.parser; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.function.UnaryOperator; + +import org.apache.maven.doxia.sink.Sink; +import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet; +import org.codehaus.plexus.util.xml.pull.XmlPullParser; + +/** + * Acts as bridge between legacy parsers relying on https://www.w3.org/TR/xhtml1/;>XHTML 1.0 Transitional (based on HTML4) + * and the {@link Xhtml5BaseParser} only supporting (X)HTML5 elements/attributes. + * + * Adds support for elements/attributes which https://html.spec.whatwg.org/#non-conforming-features;>became obsolete in HTML5 but are + * commonly used for XDoc/FML. + * + * @see https://www.w3.org/TR/html5-diff/;>HTML5 Differences from HTML4. + */ +public class Xhtml1BaseParser extends Xhtml5BaseParser { + +private static final class AttributeMapping { +private final String sourceName; +private final String targetName; +private final UnaryOperator valueMapper; +private final MergeSemantics mergeSemantics; + +enum MergeSemantics { +OVERWRITE, +IGNORE, +PREPEND +} + +AttributeMapping(String sourceAttribute, String targetAttribute, MergeSemantics mergeSemantics) { +this(sourceAttribute, targetAttribute, UnaryOperator.identity(), mergeSemantics); +} + +AttributeMapping( +String sourceName, +String targetName, +UnaryOperator valueMapper, +MergeSemantics mergeSemantics) { +super(); +
(maven-doxia) branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml deleted (was 3d8d5805)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git was 3d8d5805 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-doxia) branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml updated (dc294163 -> 3d8d5805)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git discard dc294163 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements add 356a0fe6 [DOXIA-731] Simplify HTML markup emitted from Sink.verbatim (#202) add 3d8d5805 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (dc294163) \ N -- N -- N refs/heads/bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml (3d8d5805) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../maven/doxia/sink/impl/Xhtml5BaseSink.java | 82 +++-- .../maven/doxia/parser/AbstractParserTest.java | 127 - .../maven/doxia/parser/Xhtml5BaseParserTest.java | 12 +- .../maven/doxia/sink/impl/SinkTestDocument.java| 8 +- .../maven/doxia/sink/impl/Xhtml5BaseSinkTest.java | 15 ++- .../maven/doxia/module/apt/AptParserTest.java | 25 +++- .../maven/doxia/module/fml/FmlParserTest.java | 63 +- .../doxia/module/markdown/MarkdownParserTest.java | 36 +- .../apache/maven/doxia/module/xdoc/XdocSink.java | 21 ++-- .../maven/doxia/module/xdoc/XdocParserTest.java| 14 ++- .../doxia/module/xhtml5/Xhtml5ParserTest.java | 14 ++- .../maven/doxia/module/xhtml5/Xhtml5SinkTest.java | 2 +- 12 files changed, 344 insertions(+), 75 deletions(-)
(maven-doxia) branch feature/simplify-verbatim-xhtml-markup deleted (was 06217613)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/simplify-verbatim-xhtml-markup in repository https://gitbox.apache.org/repos/asf/maven-doxia.git was 06217613 clarify comment The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-doxia) branch master updated: [DOXIA-731] Simplify HTML markup emitted from Sink.verbatim (#202)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia.git The following commit(s) were added to refs/heads/master by this push: new 356a0fe6 [DOXIA-731] Simplify HTML markup emitted from Sink.verbatim (#202) 356a0fe6 is described below commit 356a0fe63fe6789f001518455514e513c1a40647 Author: Konrad Windszus AuthorDate: Sat Mar 16 12:33:33 2024 +0100 [DOXIA-731] Simplify HTML markup emitted from Sink.verbatim (#202) Emit either or . Add parser tests for verbatim text/code (for all parsers) --- .../maven/doxia/sink/impl/Xhtml5BaseSink.java | 82 +++-- .../maven/doxia/parser/AbstractParserTest.java | 127 - .../maven/doxia/parser/Xhtml5BaseParserTest.java | 12 +- .../maven/doxia/sink/impl/SinkTestDocument.java| 8 +- .../maven/doxia/sink/impl/Xhtml5BaseSinkTest.java | 15 ++- .../maven/doxia/module/apt/AptParserTest.java | 25 +++- .../maven/doxia/module/fml/FmlParserTest.java | 63 +- .../doxia/module/markdown/MarkdownParserTest.java | 36 +- .../apache/maven/doxia/module/xdoc/XdocSink.java | 21 ++-- .../maven/doxia/module/xdoc/XdocParserTest.java| 14 ++- .../doxia/module/xhtml5/Xhtml5ParserTest.java | 14 ++- .../maven/doxia/module/xhtml5/Xhtml5SinkTest.java | 2 +- 12 files changed, 344 insertions(+), 75 deletions(-) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/Xhtml5BaseSink.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/Xhtml5BaseSink.java index cdb7d7b8..bbe3107e 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/Xhtml5BaseSink.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/Xhtml5BaseSink.java @@ -40,6 +40,7 @@ import org.apache.maven.doxia.markup.HtmlMarkup; import org.apache.maven.doxia.markup.Markup; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributes; +import org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.VerbatimMode; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; @@ -77,8 +78,16 @@ public class Xhtml5BaseSink extends AbstractXmlSink implements HtmlMarkup { /** An indication on if we're inside a paragraph flag. */ private boolean paragraphFlag; -/** An indication on if we're in verbatim mode. */ -private boolean verbatimFlag; +protected enum VerbatimMode { +/** not in verbatim mode */ +OFF, +/** Inside {@code } */ +ON, +/** Inside {@code } */ +ON_WITH_CODE +} +/** An indication on if we're in verbatim mode and if so, surrounded by which tags. */ +private VerbatimMode verbatimMode; /** Stack of alignment int[] of table cells. */ private final LinkedList cellJustifStack; @@ -160,21 +169,28 @@ public class Xhtml5BaseSink extends AbstractXmlSink implements HtmlMarkup { } /** - * Setter for the field verbatimFlag. * - * @param verb a verbatim flag. + * @return the current verbatim mode. + */ +protected VerbatimMode getVerbatimMode() { +return this.verbatimMode; +} + +/** + * Setter for the field verbatimMode. + * + * @param mode a verbatim mode. */ -protected void setVerbatimFlag(boolean verb) { -this.verbatimFlag = verb; +protected void setVerbatimMode(VerbatimMode mode) { +this.verbatimMode = mode; } /** - * isVerbatimFlag. * - * @return the current verbatim flag. + * @return {@code true} if inside verbatim section, {@code false} otherwise */ -protected boolean isVerbatimFlag() { -return this.verbatimFlag; +protected boolean isVerbatim() { +return this.verbatimMode != VerbatimMode.OFF; } /** @@ -232,7 +248,7 @@ public class Xhtml5BaseSink extends AbstractXmlSink implements HtmlMarkup { this.headFlag = false; this.paragraphFlag = false; -this.verbatimFlag = false; +this.verbatimMode = VerbatimMode.OFF; this.evenTableRow = true; this.tableAttributes = null; @@ -825,11 +841,13 @@ public class Xhtml5BaseSink extends AbstractXmlSink implements HtmlMarkup { } /** - * The default class style is verbatim, for source is {@code verbatim source}. + * Depending on whether the decoration attribute is "source" or not, this leads + * to either emitting {@code } or just {@code }. + * No default classes are emitted but the given attributes are always added to the {@code pre} element only. * * {@inheritDoc} - * @see javax.swing.text.html.HTML.Tag#DIV * @see javax.swing.text.html.HTML.Tag#PRE + * @see javax.swing.text.html.HTML.Tag#CODE */
(maven-doxia) branch feature/simplify-verbatim-xhtml-markup updated (55f1695a -> 06217613)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/simplify-verbatim-xhtml-markup in repository https://gitbox.apache.org/repos/asf/maven-doxia.git discard 55f1695a [DOXIA-731] Simplify HTML markup emitted from Sink.verbatim add aa6b907b Bump apache/maven-gh-actions-shared from 3 to 4 add ea3e4953 [DOXIA-732] Don't fail for duplicate anchor names (#203) add 6091eef2 [DOXIA-723] fix mix-up of column and line add 07a069c2 [DOXIA-731] Simplify HTML markup emitted from Sink.verbatim add 06217613 clarify comment This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (55f1695a) \ N -- N -- N refs/heads/feature/simplify-verbatim-xhtml-markup (06217613) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .github/workflows/maven-verify.yml | 2 +- .../java/org/apache/maven/doxia/sink/impl/AbstractSink.java | 2 +- .../java/org/apache/maven/doxia/sink/impl/SinkWrapper.java | 11 +++ .../maven/doxia/sink/impl/UniqueAnchorNamesValidator.java | 13 ++--- .../maven/doxia/module/markdown/MarkdownParserTest.java | 6 +- 5 files changed, 24 insertions(+), 10 deletions(-)
(maven-fluido-skin) branch bugfix/add-code-highlightling-for-all-pre-code-combinations updated (e9c224a -> 0ebfdfe)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/add-code-highlightling-for-all-pre-code-combinations in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git omit e9c224a [MSKINS-245] Add code highlighting class to every combination add d5eef27 [MSKINS-243] Update to Parent 41 (#59) add 0ebfdfe [MSKINS-245] Add code highlighting class to every combination This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (e9c224a) \ N -- N -- N refs/heads/bugfix/add-code-highlightling-for-all-pre-code-combinations (0ebfdfe) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: pom.xml | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-)
(maven-fluido-skin) branch bugfix/add-code-highlightling-for-all-pre-code-combinations updated (e1e9180 -> e9c224a)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/add-code-highlightling-for-all-pre-code-combinations in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git omit e1e9180 MSKINS-1002 Add code highlighting class to every combination add e9c224a [MSKINS-245] Add code highlighting class to every combination This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (e1e9180) \ N -- N -- N refs/heads/bugfix/add-code-highlightling-for-all-pre-code-combinations (e9c224a) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: src/main/resources/css/maven-base.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(maven-doxia) branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml updated (c42e6409 -> dc294163)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git discard c42e6409 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements add dc294163 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (c42e6409) \ N -- N -- N refs/heads/bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml (dc294163) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../maven/doxia/parser/Xhtml1BaseParser.java | 51 +++- .../maven/doxia/module/xdoc/XdocParserTest.java| 54 ++ .../maven/doxia/module/xdoc/XdocSinkTest.java | 15 -- 3 files changed, 82 insertions(+), 38 deletions(-)
(maven-doxia) branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml updated (582065a5 -> c42e6409)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git omit 582065a5 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes add c42e6409 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes/elements This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (582065a5) \ N -- N -- N refs/heads/bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml (c42e6409) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../maven/doxia/parser/Xhtml1BaseParser.java | 18 ++- .../maven/doxia/parser/Xhtml5BaseParser.java | 133 +++-- 2 files changed, 86 insertions(+), 65 deletions(-)
(maven-doxia) branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml updated (fb558620 -> 582065a5)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git omit fb558620 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes add 582065a5 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (fb558620) \ N -- N -- N refs/heads/bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml (582065a5) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../src/main/java/org/apache/maven/doxia/parser/Xhtml1BaseParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
(maven-doxia) branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml updated (6e9d8992 -> fb558620)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git omit 6e9d8992 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes add fb558620 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (6e9d8992) \ N -- N -- N refs/heads/bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml (fb558620) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../maven/doxia/parser/Xhtml1BaseParser.java | 82 +++--- 1 file changed, 72 insertions(+), 10 deletions(-)
(maven-doxia) branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml updated (da2dc30b -> 6e9d8992)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git discard da2dc30b [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes add 6e9d8992 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (da2dc30b) \ N -- N -- N refs/heads/bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml (6e9d8992) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../main/java/org/apache/maven/doxia/parser/Xhtml1BaseParser.java| 5 - 1 file changed, 4 insertions(+), 1 deletion(-)
(maven-doxia) 01/01: [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git commit da2dc30b30ad6c0a449bfdfe97af43f04767a1bf Author: Konrad Windszus AuthorDate: Thu Mar 14 18:13:30 2024 +0100 [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes --- .../maven/doxia/parser/AbstractXmlParser.java | 9 +- .../maven/doxia/parser/Xhtml1BaseParser.java | 94 +++ .../maven/doxia/parser/Xhtml5BaseParser.java | 179 +++-- .../apache/maven/doxia/module/xdoc/XdocParser.java | 4 +- 4 files changed, 193 insertions(+), 93 deletions(-) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java index 92440b30..d06ee555 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java @@ -379,11 +379,14 @@ public abstract class AbstractXmlParser extends AbstractParser implements XmlMar * method. */ protected void handleUnknown(XmlPullParser parser, Sink sink, int type) { -Object[] required = new Object[] {type}; - SinkEventAttributeSet attribs = getAttributesFromParser(parser); -sink.unknown(parser.getName(), required, attribs); +handleUnknown(parser.getName(), attribs, sink, type); +} + +protected void handleUnknown(String elementName, SinkEventAttributeSet attribs, Sink sink, int type) { +Object[] required = new Object[] {type}; +sink.unknown(elementName, required, attribs); } /** diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/parser/Xhtml1BaseParser.java b/doxia-core/src/main/java/org/apache/maven/doxia/parser/Xhtml1BaseParser.java new file mode 100644 index ..e273c011 --- /dev/null +++ b/doxia-core/src/main/java/org/apache/maven/doxia/parser/Xhtml1BaseParser.java @@ -0,0 +1,94 @@ +/* + * 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.maven.doxia.parser; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +import org.apache.maven.doxia.sink.Sink; +import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet; +import org.codehaus.plexus.util.xml.pull.XmlPullParser; + +/** + * Acts as bridge between legacy parsers relying on https://www.w3.org/TR/xhtml1/;>XHTML 1.0 Transitional (based on HTML4.0.1) + * and the {@link Xhtml5BaseParser} only supporting HTML5 elements/attributes. + * + * Adds support for elements/attributes which https://html.spec.whatwg.org/#non-conforming-features;>became obsolete in HTML5 but are + * commonly used for XDoc/FML. + * + * @see https://www.w3.org/TR/html5-diff/;>HTML5 Differences from HTML4. + */ +public class Xhtml1BaseParser extends Xhtml5BaseParser { + +private static final class AttributeMapping { +private final String sourceName; +private final String targetName; +private final Function valueMapper; + +AttributeMapping(String sourceAttribute, String targetAttribute) { +this(sourceAttribute, targetAttribute, Function.identity()); +} + +AttributeMapping(String sourceName, String targetName, Function valueMapper) { +super(); +this.sourceName = sourceName; +this.targetName = targetName; +this.valueMapper = valueMapper; +} + +public String getSourceName() { +return sourceName; +} + +public String getTargetName() { +return targetName; +} + +public Function getValueMapper() { +return valueMapper; +} +} + +/** + * All obsolete attributes in a map with key = element name, value = Entry of two Strings (key being obsolete attribute name, value being replacement) + */ +private static final Map ATTRIBUTE_MAPPING_TABLE = new HashMap<>(); + +static { +ATTRIBUTE_MAPPING_TABLE.
(maven-doxia) branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml created (now da2dc30b)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/restore-xhtml1-parser-capabilities-for-xdoc-fml in repository https://gitbox.apache.org/repos/asf/maven-doxia.git at da2dc30b [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes This branch includes the following new commits: new da2dc30b [DOXIA-734] Restore handling of XHTML 1.0 obsolete attributes The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(maven-doxia) branch master updated: [DOXIA-723] fix mix-up of column and line
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia.git The following commit(s) were added to refs/heads/master by this push: new 6091eef2 [DOXIA-723] fix mix-up of column and line 6091eef2 is described below commit 6091eef2c5c896dbad9c6d5c9b1707a467f0296e Author: Konrad Windszus AuthorDate: Wed Mar 13 12:16:12 2024 +0100 [DOXIA-723] fix mix-up of column and line --- .../src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java index 4adadfc8..fe75a06e 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/AbstractSink.java @@ -459,7 +459,7 @@ public abstract class AbstractSink implements Sink, Markup { buffer.append(", line ").append(locator.getLineNumber()); } if (locator.getColumnNumber() > 0) { -buffer.append(", column ").append(locator.getLineNumber()); +buffer.append(", column ").append(locator.getColumnNumber()); } if (buffer.length() > 0) { buffer.append(": ");
(maven-doxia) branch feature/only-warn-for-duplicate-anchor-names deleted (was 1cd5fbf6)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/only-warn-for-duplicate-anchor-names in repository https://gitbox.apache.org/repos/asf/maven-doxia.git was 1cd5fbf6 fix javadoc The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(maven-doxia) branch master updated: [DOXIA-732] Don't fail for duplicate anchor names (#203)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia.git The following commit(s) were added to refs/heads/master by this push: new ea3e4953 [DOXIA-732] Don't fail for duplicate anchor names (#203) ea3e4953 is described below commit ea3e4953bb849a259af5f006394ab3af19bf90bd Author: Konrad Windszus AuthorDate: Wed Mar 13 10:46:30 2024 +0100 [DOXIA-732] Don't fail for duplicate anchor names (#203) Emit warning with location prefix Pass document locator through SinkWrappers correctly --- .../java/org/apache/maven/doxia/sink/impl/SinkWrapper.java | 11 +++ .../maven/doxia/sink/impl/UniqueAnchorNamesValidator.java | 13 ++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java index 8f582052..fcf5728f 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java @@ -19,6 +19,7 @@ package org.apache.maven.doxia.sink.impl; import org.apache.maven.doxia.parser.Parser; +import org.apache.maven.doxia.sink.Locator; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributes; @@ -526,4 +527,14 @@ public class SinkWrapper extends AbstractSink { public void close() { delegate.close(); } + +@Override +public void setDocumentLocator(Locator locator) { +delegate.setDocumentLocator(locator); +} + +@Override +public Locator getDocumentLocator() { +return delegate.getDocumentLocator(); +} } diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java index eaf8f4a0..90f45ed8 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java @@ -23,12 +23,16 @@ import java.util.Set; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributes; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** - * Validates that each anchor name only appears once per document. Otherwise fails with an {@link IllegalStateException}. + * Validates that each anchor name only appears once per document. Otherwise logs a warning. */ public class UniqueAnchorNamesValidator extends SinkWrapper { +private static final Logger LOGGER = LoggerFactory.getLogger(UniqueAnchorNamesValidator.class); + private final Set usedAnchorNames; public UniqueAnchorNamesValidator(Sink sink) { @@ -41,13 +45,8 @@ public class UniqueAnchorNamesValidator extends SinkWrapper { // assume that other anchor method signature calls this method under the hood in all relevant sink // implementations super.anchor(name, attributes); -enforceUniqueAnchor(name); -} - -private void enforceUniqueAnchor(String name) { if (!usedAnchorNames.add(name)) { -throw new IllegalStateException( -getLocationLogPrefix() + "Anchor name \"" + name + "\" used more than once"); +LOGGER.warn("{}Anchor name \"{}\" used more than once", getLocationLogPrefix(), name); } } }
(maven-doxia) branch bugfix/remove-tweaking-of-line-separator-for-tests updated (fd86451d -> 8909d073)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch bugfix/remove-tweaking-of-line-separator-for-tests in repository https://gitbox.apache.org/repos/asf/maven-doxia.git from fd86451d Do not adjust system property "line.separator" as it otherwise diverges from System.lineSeparator() add 8909d073 some more cleanup No new revisions were added by this update. Summary of changes: .../src/main/java/org/apache/maven/doxia/markup/Markup.java | 4 ++-- .../src/test/java/org/apache/maven/doxia/AbstractModuleTest.java | 8 .../java/org/apache/maven/doxia/sink/impl/AbstractSinkTest.java | 4 ++-- .../java/org/apache/maven/doxia/sink/impl/SinkTestDocument.java | 3 +-- 4 files changed, 5 insertions(+), 14 deletions(-)
(maven-doxia) branch feature/only-warn-for-duplicate-anchor-names updated (f04adfd0 -> 1cd5fbf6)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/only-warn-for-duplicate-anchor-names in repository https://gitbox.apache.org/repos/asf/maven-doxia.git from f04adfd0 inline method add 1cd5fbf6 fix javadoc No new revisions were added by this update. Summary of changes: .../org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(maven-doxia) branch feature/only-warn-for-duplicate-anchor-names updated (7f31e303 -> f04adfd0)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/only-warn-for-duplicate-anchor-names in repository https://gitbox.apache.org/repos/asf/maven-doxia.git discard 7f31e303 inline method add f04adfd0 inline method This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (7f31e303) \ N -- N -- N refs/heads/feature/only-warn-for-duplicate-anchor-names (f04adfd0) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java | 1 - 1 file changed, 1 deletion(-)
(maven-doxia) branch feature/only-warn-for-duplicate-anchor-names updated (f4a8b7d9 -> 7f31e303)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/only-warn-for-duplicate-anchor-names in repository https://gitbox.apache.org/repos/asf/maven-doxia.git from f4a8b7d9 [DOXIA-732] Don't fail for duplicate anchor names add 7f31e303 inline method No new revisions were added by this update. Summary of changes: .../org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)
(maven-doxia) branch feature/only-warn-for-duplicate-anchor-names updated (887bd254 -> f4a8b7d9)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/only-warn-for-duplicate-anchor-names in repository https://gitbox.apache.org/repos/asf/maven-doxia.git discard 887bd254 [DOXIA-732] Don't fail for duplicate anchor names add f4a8b7d9 [DOXIA-732] Don't fail for duplicate anchor names This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (887bd254) \ N -- N -- N refs/heads/feature/only-warn-for-duplicate-anchor-names (f4a8b7d9) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java | 1 - .../org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java | 5 + 2 files changed, 1 insertion(+), 5 deletions(-)
(maven-doxia) 01/01: [DOXIA-732] Don't fail for duplicate anchor names
This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/only-warn-for-duplicate-anchor-names in repository https://gitbox.apache.org/repos/asf/maven-doxia.git commit 887bd2542f2aaad5c4d5e59c0f72f434dc7971ea Author: Konrad Windszus AuthorDate: Tue Mar 12 18:00:22 2024 +0100 [DOXIA-732] Don't fail for duplicate anchor names Emit warning with location prefix Pass document locator through SinkWrappers correctly --- .../java/org/apache/maven/doxia/sink/impl/SinkWrapper.java | 12 .../maven/doxia/sink/impl/UniqueAnchorNamesValidator.java| 10 -- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java index 8f582052..05b28b49 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkWrapper.java @@ -19,6 +19,7 @@ package org.apache.maven.doxia.sink.impl; import org.apache.maven.doxia.parser.Parser; +import org.apache.maven.doxia.sink.Locator; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributes; @@ -526,4 +527,15 @@ public class SinkWrapper extends AbstractSink { public void close() { delegate.close(); } + +@Override +public void setDocumentLocator(Locator locator) { +delegate.setDocumentLocator(locator); +} + +@Override +public Locator getDocumentLocator() { +return delegate.getDocumentLocator(); +} + } diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java index eaf8f4a0..9dcca2e6 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/UniqueAnchorNamesValidator.java @@ -23,12 +23,16 @@ import java.util.Set; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributes; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Validates that each anchor name only appears once per document. Otherwise fails with an {@link IllegalStateException}. */ public class UniqueAnchorNamesValidator extends SinkWrapper { +private static final Logger LOGGER = LoggerFactory.getLogger(UniqueAnchorNamesValidator.class); + private final Set usedAnchorNames; public UniqueAnchorNamesValidator(Sink sink) { @@ -46,8 +50,10 @@ public class UniqueAnchorNamesValidator extends SinkWrapper { private void enforceUniqueAnchor(String name) { if (!usedAnchorNames.add(name)) { -throw new IllegalStateException( -getLocationLogPrefix() + "Anchor name \"" + name + "\" used more than once"); +LOGGER.warn( +"{}Anchor name \"{}\" used more than once", +getLocationLogPrefix(), +name); } } }
(maven-doxia) branch feature/only-warn-for-duplicate-anchor-names created (now 887bd254)
This is an automated email from the ASF dual-hosted git repository. kwin pushed a change to branch feature/only-warn-for-duplicate-anchor-names in repository https://gitbox.apache.org/repos/asf/maven-doxia.git at 887bd254 [DOXIA-732] Don't fail for duplicate anchor names This branch includes the following new commits: new 887bd254 [DOXIA-732] Don't fail for duplicate anchor names The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.