Re: [I] Support --no-fonts option [maven-javadoc-plugin]

2025-05-18 Thread via GitHub


joakime commented on issue #369:
URL: 
https://github.com/apache/maven-javadoc-plugin/issues/369#issuecomment-2888953110

   On large projects, like Eclipse Jetty, a release with JDK23 adds 1.0GB of 
extra content to the repository, simply due to the inclusion of these extra 
fonts.
   
   IMO, if you are publishing the javadoc to a website then the fonts are 
useful, but the -javadoc.jar produced files should not include them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] First iteration: Page about Maven DI [maven-site]

2025-05-18 Thread via GitHub


cstamas commented on code in PR #648:
URL: https://github.com/apache/maven-site/pull/648#discussion_r2094511831


##
content/markdown/maven-di.md:
##
@@ -0,0 +1,322 @@
+
+
+# Maven DI
+
+## What is Maven DI?
+
+Maven DI is the dependency injection framework of Maven, that is introduced in 
Maven 4.
+
+It is the successor for Plexus DI (used in Maven 2) and JSR 330/Eclipse Sisu 
(used in Maven 3) in Maven. 
+It is based on [Google Guice][guice].
+
+
+## How to use Maven DI
+
+When you use Maven DI in Maven plugins or extensions, you want to have the 
dependency to `maven-api-di`, so you can use the `@Inject`, `@Named`, and 
`@Singleton` annotations in your plugins and extensions.

Review Comment:
   Maven DI != Sisu, is completely new and contained in Maven 4 and uses Maven 
specific annotations and index as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Support --no-fonts option [maven-javadoc-plugin]

2025-05-18 Thread via GitHub


olamy commented on issue #369:
URL: 
https://github.com/apache/maven-javadoc-plugin/issues/369#issuecomment-2888967408

   Could be eventually default for javadoc jar for jdk23+


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] First iteration: Page about Maven DI [maven-site]

2025-05-18 Thread via GitHub


cstamas commented on PR #648:
URL: https://github.com/apache/maven-site/pull/648#issuecomment-2888966466

   Folks:
   Maven DI != Sisu, is completely new and contained in Maven 4 and uses Maven 
specific annotations and index as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [SUREFIRE-2298] fix xml output with junit 5 nested classes [maven-surefire]

2025-05-18 Thread via GitHub


pzygielo commented on PR #828:
URL: https://github.com/apache/maven-surefire/pull/828#issuecomment-2888961329

   Hi @olamy 
   
   > you might be able to see progress there 
https://github.com/apache/maven-surefire/pull/828
   
   But... is there any?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Support --no-fonts option [maven-javadoc-plugin]

2025-05-18 Thread via GitHub


joakime commented on issue #369:
URL: 
https://github.com/apache/maven-javadoc-plugin/issues/369#issuecomment-2888969284

   Since the `maven-javadoc-plugin` has different goals.
   I would like to propose that the default is to _not use fonts_ when a `jar` 
goal is used.
   
   * javadoc:jar
   * javadoc:test-jar
   * javadoc:aggregate-jar
   * javadoc:test-aggregate-jar
   
   as for the other goal types, I have no opinion on the default setting.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] link to "Guide to Using Toolchains" broken [maven-site]

2025-05-18 Thread via GitHub


michael-o commented on issue #780:
URL: https://github.com/apache/maven-site/issues/780#issuecomment-244938

   Checking...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (MNG-8731) Use https for xsi:schemaLocation in generated descriptors

2025-05-18 Thread Slawomir Jaranowski (Jira)
Slawomir Jaranowski created MNG-8731:


 Summary: Use https for xsi:schemaLocation in generated descriptors
 Key: MNG-8731
 URL: https://issues.apache.org/jira/browse/MNG-8731
 Project: Maven
  Issue Type: Improvement
Reporter: Slawomir Jaranowski
Assignee: Slawomir Jaranowski
 Fix For: 3.9.10, 4.0.0-rc-4


Like in sites:
 * [https://maven.apache.org/ref/3.9.9/maven-settings/settings.html]
 * 
[https://maven.apache.org/ref/4.0.0-rc-3/api/maven-api-settings/settings.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux opened a new pull request, #2347:
URL: https://github.com/apache/maven/pull/2347

   This is an alternative to pull request #2219 resolving the same issue, but 
with more emphasis that `PathModularizationCache` should not be created in the 
`DefaultDependencyResolverResult` constructor, and that doing so is a temporary 
hack that may be removed in a future version. More specifically:
   
   * Make package-private the `DefaultDependencyResolverResult` constructor 
having a `PathModularizationCache` argument, because the latter is 
package-private.
   * Add a public constructor without the cache argument for codes in other 
packages that need to instantiate `DefaultDependencyResolverResult`  directly.
 * Put a warning in the javadoc saying that this constructor may be removed 
in a future version.
   * Add `PathModularizationCache` private field in 
`DefaultDependencyResolver`. This is partially for performance reasons (see 
below), but also for expressing the intend that the cache has a longer lifetime 
than `DependencyResolverResult`.
   
   ## Rational
   Initializing `PathModularizationCache` inside the `DependencyResolverResult` 
constructor is close to useless, because a cache is useful only when the cached 
values are reused. The way that the `DependencyResolverResult` is coded, the 
same result instance is unlikely to ask the same cached value twice. The cache 
become useful only when many `DependencyResolverResult` are instantiated while 
reusing the same cache.
   
   The "useless" approach is nevertheless used by `DependencyResolverResult`, 
but this is only because I do not yet know how to manage a session-wide cache. 
The current way to create the cache was intended to be temporary.
   
   I'm not sure if it happens often that the same 
`DependencyResolverResultBuilder` is reused for creating more than one 
`DependencyResolverResult`. If not, moving the cache inside 
`DependencyResolverResultBuilder`, as done in this commit, may not bring real 
performance improvement. However, it makes clearer that 
`PathModularizationCache` is expected to have a longer lifetime than 
`DependencyResolverResult`. The discussion in #2219 gives the impression that 
such clarification is worth to do.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Generate pmd.xml, but skip HTML generation [maven-pmd-plugin]

2025-05-18 Thread via GitHub


slawekjaranowski commented on issue #189:
URL: 
https://github.com/apache/maven-pmd-plugin/issues/189#issuecomment-271795

   Mojo classes should be refactored, currently we have, like:
   
   ```java
   @Mojo(name = "check", defaultPhase = LifecyclePhase.VERIFY, threadSafe = 
true)
   @Execute(goal = "pmd")
   public class PmdViolationCheckMojo extends 
AbstractPmdViolationCheckMojo {
   
   ```
   
   Additional mojo execution `@Execute(goal = "pmd")` shuld be removed and Mojo 
should directly use `org.apache.maven.plugins.pmd.exec.PmdExecutor`

   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] link to "Guide to Using Toolchains" broken [maven-site]

2025-05-18 Thread via GitHub


michael-o commented on issue #780:
URL: https://github.com/apache/maven-site/issues/780#issuecomment-294027

   Found it: 
   
`org.apache.maven.doxia.site.inheritance.DefaultSiteModelInheritanceAssembler.relativizeLink(String,
 String)` which calls 
`org.apache.maven.doxia.site.inheritance.URIPathDescriptor.URIPathDescriptor(String,
 String)`. Read the Javadoc. It strips the slash *and* it considers the site 
URL as base, it does not consider the full URL to relativize. It does not even 
consider a scheme-releative path (e..g, `//maven.apache.org`). In my opinion, 
we need to take a look at https://url.spec.whatwg.org/#url-writing and do it 
like browsers do.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] `Could not acquire write lock for…` errors [maven-mvnd]

2025-05-18 Thread via GitHub


kah-ell commented on issue #836:
URL: https://github.com/apache/maven-mvnd/issues/836#issuecomment-2888995039

   Also seems to happen on Linux. Happened while downloading dependencies from 
the command:
   ```  

   clj -Sdeps '{:deps {vlaaad/reveal {:mvn/version "1.3.284"}}}' -X 
vlaaad.reveal/repl
   ```
   
   First few lines of exception:
   ```
   Error building classpath. Could not acquire write lock for 
'artifact:org.openjfx:javafx-web:22-ea+16'
   java.lang.IllegalStateException: Could not acquire write lock for 
'artifact:org.openjfx:javafx-web:22-ea+16'
   at 
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire(NamedLockFactoryAdapter.java:165)
   at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:233)
   at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:212)
   at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:272)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] [MNG-5913] Allow defining aliases for existing server configurations in settings.xml [maven]

2025-05-18 Thread via GitHub


slawekjaranowski opened a new pull request, #2346:
URL: https://github.com/apache/maven/pull/2346

   
   Add the next tag ids to the server in settings.xml
   
   Additional server will be created in memory by SettingsBuilder, so the 
generated configuration should be transparent to other as Settings#getServers() 
will return complete list.
   
   https://issues.apache.org/jira/browse/MNG-5913


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] PathModularizationCache needs to set cache [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2219:
URL: https://github.com/apache/maven/pull/2219#discussion_r2094518296


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency
  * @param exceptions the exceptions that occurred while building the 
dependency graph
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
 public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);
+}
+
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+if (cache == null) {

Review Comment:
   ```suggestion
   if (cache != null) {
   ```
   take happy path.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094538646


##
.pmd/exclude.properties:
##
@@ -0,0 +1,483 @@
+org.apache.maven.AbstractMavenLifecycleParticipant=AbstractClassWithoutAbstractMethod
+org.apache.maven.DefaultArtifactFilterManager=MissingOverride
+org.apache.maven.DefaultMaven=GuardLogStatement
+org.apache.maven.DefaultProjectDependenciesResolver=MissingOverride
+org.apache.maven.MavenArtifactTypeRegistry=MissingOverride
+org.apache.maven.ReactorReader=UselessParentheses,MissingOverride,GuardLogStatement
+org.apache.maven.RepositoryUtils=ForLoopVariableCount
+org.apache.maven.api.ChildrenPointer=MissingOverride
+org.apache.maven.api.DefaultExtensibleEnum=MissingOverride
+org.apache.maven.api.DefaultPathScope=UseEnumCollections
+org.apache.maven.api.DependenciesPointer=MissingOverride
+org.apache.maven.api.DependencyScope=UnnecessaryFullyQualifiedName
+org.apache.maven.api.ExtensibleEnums=AbstractClassWithoutAbstractMethod
+org.apache.maven.api.JavaPathType=UnnecessaryModifier,UnnecessaryFullyQualifiedName
+org.apache.maven.api.Language=ConstantsInInterface
+org.apache.maven.api.MonotonicClock=UnnecessaryFullyQualifiedName
+org.apache.maven.api.Packaging=MissingOverride
+org.apache.maven.api.PhasePointer=MissingOverride
+org.apache.maven.api.ProjectScope=ConstantsInInterface
+org.apache.maven.api.Type=MissingOverride
+org.apache.maven.api.Version=MissingOverride
+org.apache.maven.api.VersionConstraint=MissingOverride
+org.apache.maven.api.VersionRange=MissingOverride
+org.apache.maven.api.cli.mvn.MavenOptions=MissingOverride
+org.apache.maven.api.cli.mvnenc.EncryptOptions=MissingOverride
+org.apache.maven.api.cli.mvnsh.ShellOptions=MissingOverride
+org.apache.maven.api.model.InputLocation=MissingOverride
+org.apache.maven.api.plugin.testing.Foo=UnnecessaryFullyQualifiedName

Review Comment:
   - UnnecessaryFullyQualifiedName
   - https://github.com/user-attachments/assets/ac7e7e25-8539-4529-a689-546d82a2f6ba";
 />
   
   ```
   [INFO] --- pmd:3.26.0:check (maven-pmd-plugin) @ maven-api-core ---
   [WARNING] PMD Failure: org.apache.maven.api.DependencyScope:100 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'DependencyScope': 'values' is already in scope.
   [WARNING] PMD Failure: org.apache.maven.api.JavaPathType:222 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'JavaPathType': 'values' is already in scope.
   [WARNING] PMD Failure: org.apache.maven.api.JavaPathType:262 
Rule:UnnecessaryModifier Priority:3 Unnecessary modifier 'final' on method 
'format': the method is already in a final class.
   [WARNING] PMD Failure: org.apache.maven.api.MonotonicClock:59 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 'Clock': 
'systemUTC' is already in scope.
   [WARNING] PMD Failure: 
org.apache.maven.api.services.ArtifactCoordinatesFactoryRequest:58 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'ArtifactCoordinatesFactoryRequest': 'builder' is already in scope.
   [WARNING] PMD Failure: 
org.apache.maven.api.services.ArtifactCoordinatesFactoryRequest:76 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'ArtifactCoordinatesFactoryRequest': 'builder' is already in scope.
   [WARNING] PMD Failure: 
org.apache.maven.api.services.ArtifactCoordinatesFactoryRequest:89 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'ArtifactCoordinatesFactoryRequest': 'builder' is already in scope.
   [WARNING] PMD Failure: 
org.apache.maven.api.services.ArtifactCoordinatesFactoryRequest:97 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'ArtifactCoordinatesFactoryRequest': 'builder' is already in scope.
   [WARNING] PMD Failure: 
org.apache.maven.api.services.ArtifactFactoryRequest:55 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'ArtifactFactoryRequest': 'builder' is already in scope.
   [WARNING] PMD Failure: 
org.apache.maven.api.services.ArtifactFactoryRequest:72 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'ArtifactFactoryRequest': 'builder' is already in scope.
   [WARNING] PMD Failure: 
org.apache.maven.api.services.DependencyCoordinatesFactoryRequest:62 
Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary qualifier 
'DependencyCoordinatesFactoryRequest': 'builder' is already in scope.
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094591899


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   This constructor was already there before, only implicit (when a Java file 
does not declare any constructor at all). This addition only makes it explicit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094594605


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -97,6 +99,24 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  */
 private final PathModularizationCache cache;
 
+/**
+ * Creates an initially empty result with a temporary cache.
+ * Callers should add path elements by calls to {@link 
#addDependency(Node, Dependency, Predicate, Path)}.
+ *
+ * WARNING: this constructor may be removed in a future Maven 
release.
+ * The reason is because {@code DefaultDependencyResolverResult} needs a 
cache, which should
+ * preferably by session-wide. But we have not yet clarified how such 
caches should be managed.

Review Comment:
   Thanks, fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094594453


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.

Review Comment:
   Thanks, fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094595083


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -97,6 +99,24 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  */
 private final PathModularizationCache cache;
 
+/**
+ * Creates an initially empty result with a temporary cache.
+ * Callers should add path elements by calls to {@link 
#addDependency(Node, Dependency, Predicate, Path)}.
+ *
+ * WARNING: this constructor may be removed in a future Maven 
release.
+ * The reason is because {@code DefaultDependencyResolverResult} needs a 
cache, which should
+ * preferably by session-wide. But we have not yet clarified how such 
caches should be managed.
+ *
+ * @param request the corresponding request
+ * @param exceptions the exceptions that occurred while building the 
dependency graph
+ * @param root the root node of the dependency graph
+ * @param count estimated number of dependencies
+ */
+public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);

Review Comment:
   The `moduleCache()` method is defined in another class. We cannot access 
that method from here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094595800


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -126,7 +141,11 @@ public DependencyResolverResult collect(@Nonnull 
DependencyResolverRequest reque
 final CollectResult result =
 
session.getRepositorySystem().collectDependencies(systemSession, 
collectRequest);
 return new DefaultDependencyResolverResult(
-null, null, result.getExceptions(), 
session.getNode(result.getRoot(), request.getVerbose()), 0);
+null,
+moduleCache(),

Review Comment:
   I'm not sure to understand. Inline the call to `moduleCache()`? This is 
uneasy, as that method does lazy instantiation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094596195


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -107,14 +127,14 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
-public DefaultDependencyResolverResult(
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+this.cache = Objects.requireNonNull(cache);

Review Comment:
   The `moduleCache()` method is defined in another class. We cannot access 
that method from here.
   
   However, this is indeed the kind of code that we would have after we 
clarified how to manage session-wide caches. The `moduleCache()` method would 
be in the class managing those caches. We are just not there yet.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] First iteration: Page about Maven DI [maven-site]

2025-05-18 Thread via GitHub


sparsick commented on PR #648:
URL: https://github.com/apache/maven-site/pull/648#issuecomment-282567

   @gnodet is this okay for the first iteration for a page about Maven DI?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094541182


##
pom.xml:
##
@@ -1170,5 +1193,19 @@ under the License.
 
   
 
+
+  pmd

Review Comment:
   Spot is configured in parent so how to do here? Profile is not working by 
default.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094539384


##
pom.xml:
##
@@ -799,17 +799,39 @@ under the License.
 
   org.apache.maven.plugins
   maven-pmd-plugin

Review Comment:
   its already there, takes 5 seconds to run.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094539384


##
pom.xml:
##
@@ -799,17 +799,39 @@ under the License.
 
   org.apache.maven.plugins
   maven-pmd-plugin

Review Comment:
   its already there, takes only few seconds to run.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC] `rewrite-maven-plugin`: Introduce OpenRewrite by Moderne [maven]

2025-05-18 Thread via GitHub


timtebeek commented on PR #2322:
URL: https://github.com/apache/maven/pull/2322#issuecomment-2889017421

   I've spoken at length with the author linked above at Code Remix Summit last 
week, helped him understand and analyze the changes, and got him set up to 
continue his work. Despite this he came out with a deeply flawed analysis and 
false statements, which unfortunately are being taken at face value.
   
   Figured I'd provide some more context about the changes made from our 
perspective:
   - 
[https://medium.com/@timtebeek/the-openrewrite-community-potluck](https://medium.com/@timtebeek/the-openrewrite-community-potluck-ebf36116e7a6?source=friends_link&sk=7aa496b025118a9a8fd94c7691fb0ed6)
   
   You're all welcome to use and contribute to OpenRewrite for as much as you'd 
like; we see no reason to be hesitant at all, but understand opinions may 
differ. Either way I'll continue to support the Apache Maven project and users 
for as much as I can, as I have when talking to Apache Maven contributors over 
the years, especially with an eye towards changes in the upcoming v4.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094539384


##
pom.xml:
##
@@ -799,17 +799,39 @@ under the License.
 
   org.apache.maven.plugins
   maven-pmd-plugin

Review Comment:
   its already there. It takes 5 seconds so might be justifiable to run for 
local build.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094541415


##
pom.xml:
##
@@ -1170,5 +1193,19 @@ under the License.
 
   
 
+
+  pmd
+  
+true

Review Comment:
   this is not working, why? only giving profile `cis -Ppmd` activates PMD. So 
this switch seems not to work.
   @gnodet 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] First iteration: Page about Maven DI [maven-site]

2025-05-18 Thread via GitHub


gnodet commented on code in PR #648:
URL: https://github.com/apache/maven-site/pull/648#discussion_r2094466616


##
content/markdown/maven-di.md:
##
@@ -0,0 +1,322 @@
+
+
+# Maven DI
+
+## What is Maven DI?
+
+Maven DI is the dependency injection framework of Maven, that is introduced in 
Maven 4.
+
+It is the successor for Plexus DI (used in Maven 2) and JSR 330/Eclipse Sisu 
(used in Maven 3) in Maven. 
+It is based on [Google Guice][guice].

Review Comment:
   Remove as it's not base on anything.



##
content/markdown/maven-di.md:
##
@@ -0,0 +1,322 @@
+
+
+# Maven DI
+
+## What is Maven DI?
+
+Maven DI is the dependency injection framework of Maven, that is introduced in 
Maven 4.
+
+It is the successor for Plexus DI (used in Maven 2) and JSR 330/Eclipse Sisu 
(used in Maven 3) in Maven. 
+It is based on [Google Guice][guice].
+
+
+## How to use Maven DI
+
+When you use Maven DI in Maven plugins or extensions, you want to have the 
dependency to `maven-api-di`, so you can use the 
`@org.apache.maven.api.di.Inject`, `@org.apache.maven.api.di.Named`, and 
`@org.apache.maven.api.di.Singleton` annotations in your plugins and extensions.
+The annotations of Maven DI are similar to JSR 330, but they have different 
package name.
+
+### Implementation Details
+
+TBD (need help)
+
+## How to use Maven DI in plugins
+
+---
+**NOTE**
+
+If your plugin should also run with Maven 3.x, please look at [Maven & 
JSR-330](maven-jsr330).
+Plugins that are using Maven DI are only compatible with Maven 4.
+---
+
+Let's take a look at an example plugin: If you want to look at this example 
project, you can find the code [in Maven Core ITs][maven-di-plugin].
+
+The POM is set up for Maven DI as previously mentioned, with the 
`maven-api-di` dependency
+
+In addition, we add a Maven plugin dependency `maven-api-core` to implement 
the interface `Mojo` and use the Java  Plugin Tools Annotations with associated 
`maven-plugin-plugin` (see [Maven Plugin Tools](/plugin-tools/)).

Review Comment:
   Don't mention Maven Plugin Tools Annotations, as Maven 4 plugins don't 
depend on it anymore.



##
content/markdown/maven-di.md:
##
@@ -0,0 +1,322 @@
+
+
+# Maven DI
+
+## What is Maven DI?
+
+Maven DI is the dependency injection framework of Maven, that is introduced in 
Maven 4.
+
+It is the successor for Plexus DI (used in Maven 2) and JSR 330/Eclipse Sisu 
(used in Maven 3) in Maven. 
+It is based on [Google Guice][guice].
+
+
+## How to use Maven DI
+
+When you use Maven DI in Maven plugins or extensions, you want to have the 
dependency to `maven-api-di`, so you can use the 
`@org.apache.maven.api.di.Inject`, `@org.apache.maven.api.di.Named`, and 
`@org.apache.maven.api.di.Singleton` annotations in your plugins and extensions.
+The annotations of Maven DI are similar to JSR 330, but they have different 
package name.

Review Comment:
   Package is org.apache.maven.api.di



##
content/markdown/maven-di.md:
##
@@ -0,0 +1,322 @@
+
+
+# Maven DI
+
+## What is Maven DI?
+
+Maven DI is the dependency injection framework of Maven, that is introduced in 
Maven 4.
+
+It is the successor for Plexus DI (used in Maven 2) and JSR 330/Eclipse Sisu 
(used in Maven 3) in Maven. 
+It is based on [Google Guice][guice].
+
+
+## How to use Maven DI
+
+When you use Maven DI in Maven plugins or extensions, you want to have the 
dependency to `maven-api-di`, so you can use the 
`@org.apache.maven.api.di.Inject`, `@org.apache.maven.api.di.Named`, and 
`@org.apache.maven.api.di.Singleton` annotations in your plugins and extensions.
+The annotations of Maven DI are similar to JSR 330, but they have different 
package name.
+
+### Implementation Details
+
+TBD (need help)
+
+## How to use Maven DI in plugins
+
+---
+**NOTE**
+
+If your plugin should also run with Maven 3.x, please look at [Maven & 
JSR-330](maven-jsr330).
+Plugins that are using Maven DI are only compatible with Maven 4.
+---
+
+Let's take a look at an example plugin: If you want to look at this example 
project, you can find the code [in Maven Core ITs][maven-di-plugin].
+
+The POM is set up for Maven DI as previously mentioned, with the 
`maven-api-di` dependency
+
+In addition, we add a Maven plugin dependency `maven-api-core` to implement 
the interface `Mojo` and use the Java  Plugin Tools Annotations with associated 
`maven-plugin-plugin` (see [Maven Plugin Tools](/plugin-tools/)).
+
+
+```xml
+
+http://maven.apache.org/POM/4.1.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 
https://maven.apache.org/xsd/maven-4.1.0.xsd";>
+4.1.0
+
+org.apache.maven.its
+
+org.apache.maven.plugins
+mavendi-maven-plugin
+0.0.1-SNAPSHOT
+maven-plugin
+
+mavendi-maven-plugin Maven Plugin
+http://maven.apache.org
+
+
+UTF-8
+17
+4.0.0-beta-5
+4.0.0-beta-1
+
+
+
+
+org.apache.

[jira] [Assigned] (MNG-8711) "Duplicate artifact" in LifecycleDependencyResolver

2025-05-18 Thread Slawomir Jaranowski (Jira)


 [ 
https://issues.apache.org/jira/browse/MNG-8711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Slawomir Jaranowski reassigned MNG-8711:


Assignee: Slawomir Jaranowski

> "Duplicate artifact" in LifecycleDependencyResolver
> ---
>
> Key: MNG-8711
> URL: https://issues.apache.org/jira/browse/MNG-8711
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.9.9
>Reporter: Vasilii Gulevich
>Assignee: Slawomir Jaranowski
>Priority: Major
>  Labels: backport
> Fix For: 3.9.10
>
>
> When building a multimodule project with "--threads=10" argument, following 
> exception happens:
> {code:java}
> java.lang.IllegalStateException: Duplicate artifact resolution result for 
> project org.eclipse.rcptt:ecl:2.6.0-SNAPSHOT
> at 
> org.apache.maven.project.artifact.DefaultProjectArtifactsCache.assertUniqueKey
>  (DefaultProjectArtifactsCache.java:207)
> at org.apache.maven.project.artifact.DefaultProjectArtifactsCache.put 
> (DefaultProjectArtifactsCache.java:196)
> at 
> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies
>  (LifecycleDependencyResolver.java:138)
> at 
> org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved
>  (MojoExecutor.java:368)
> at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
> (MojoExecutor.java:313)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:212)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:174)
> at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
> (MojoExecutor.java:75)
> at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
> (MojoExecutor.java:162)
> at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute 
> (DefaultMojosExecutionStrategy.java:39)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:159)
> at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:105)
> at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject 
> (SmartBuilderImpl.java:206)
> at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run 
> (SmartBuilderImpl.java:71)
> at java.util.concurrent.Executors$RunnableAdapter.call 
> (Executors.java:572)
> at java.util.concurrent.FutureTask.run (FutureTask.java:317)
> at java.util.concurrent.ThreadPoolExecutor.runWorker 
> (ThreadPoolExecutor.java:1144)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run 
> (ThreadPoolExecutor.java:642)
> at java.lang.Thread.run (Thread.java:1583) {code}
> This is already fixed in [https://github.com/apache/maven/pull/1425], but is 
> not backported to 3.9.x.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094606089


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   yes right, thanks. But is in use? Had you compile issues, therefore created 
and sure about usage?
   Might not needed before. Want to make sure.



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   https://github.com/user-attachments/assets/fdf9f541-7403-4380-a4e1-9e92ce4ccd4f";
 />
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094606407


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until clarified where to store 
session-wide caches.
+ *
+ * @see moduleCache()

Review Comment:
   ```suggestion
* @see #moduleCache()
   ```
   https://github.com/user-attachments/assets/bcc5a0dc-9147-4a79-80f7-796d97bba8cb";
 />
   
   cs should fail this build.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094606089


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   yes right, thanks. But is in use? Encounter compile issues, therefore 
created and sure about usage?
   Might not needed before. Want to make sure.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094608101


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**

Review Comment:
   ```suggestion
   
   /**
   ```
   cs can/must fail this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094608333


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -191,18 +210,14 @@ public DependencyResolverResult 
resolve(DependencyResolverRequest request)
 .map(Artifact::toCoordinates)
 .collect(Collectors.toList());
 Predicate filter = request.getPathTypeFilter();
+DefaultDependencyResolverResult resolverResult = new 
DefaultDependencyResolverResult(
+null, moduleCache(), collectorResult.getExceptions(), 
collectorResult.getRoot(), nodes.size());
 if (request.getRequestType() == 
DependencyResolverRequest.RequestType.FLATTEN) {
-DefaultDependencyResolverResult flattenResult = new 
DefaultDependencyResolverResult(

Review Comment:
   this scope was right. this field concern lives only here. Even could 
dedicate whole block.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Bump org.apache.maven.resolver:maven-resolver-api from 2.0.8 to 2.0.9 [maven-install-plugin]

2025-05-18 Thread via GitHub


dependabot[bot] opened a new pull request, #347:
URL: https://github.com/apache/maven-install-plugin/pull/347

   Bumps 
[org.apache.maven.resolver:maven-resolver-api](https://github.com/apache/maven-resolver)
 from 2.0.8 to 2.0.9.
   
   Commits
   
   https://github.com/apache/maven-resolver/commit/13e91652bbebdb33ad3df81d22f568eeb4e66e34";>13e9165
 [maven-release-plugin] prepare release maven-resolver-2.0.9
   https://github.com/apache/maven-resolver/commit/2c2be03e548f2baa8fbb0b1fcd6757bbd49c97f8";>2c2be03
 [MRESOLVER-588] Fix for both supplier (https://redirect.github.com/apache/maven-resolver/issues/724";>#724)
   https://github.com/apache/maven-resolver/commit/1e86daed47323d594096bbce1fddfda415e48bc3";>1e86dae
 [MRESOLVER-701] Support legacy property (https://redirect.github.com/apache/maven-resolver/issues/723";>#723)
   https://github.com/apache/maven-resolver/commit/9c79e753c195baa4cbddc37b6a1d0b2c18e598cb";>9c79e75
 [MRESOLVER-699] Fix release tag (https://redirect.github.com/apache/maven-resolver/issues/722";>#722)
   https://github.com/apache/maven-resolver/commit/380a589410cd3a8a31b41ddfc7bc1694b625b15d";>380a589
 Update file
   https://github.com/apache/maven-resolver/commit/3e68bfe665b78ede47cd2f074ea83f1b19a7a0bc";>3e68bfe
 [MRESOLVER-723] Bump info.picocli:picocli from 4.7.6 to 4.7.7 (https://redirect.github.com/apache/maven-resolver/issues/687";>#687)
   https://github.com/apache/maven-resolver/commit/4a85ac0c5e1765174d845fd063edba610ad92cae";>4a85ac0
 [MRESOLVER-722] Bump testcontainersVersion from 1.20.6 to 1.21.0 (https://redirect.github.com/apache/maven-resolver/issues/688";>#688)
   https://github.com/apache/maven-resolver/commit/1a8bede0a0b907c8c14fb6a56953d42dfb861856";>1a8bede
 [MRESOLVER-721] Bump com.google.code.gson:gson from 2.13.0 to 2.13.1 (https://redirect.github.com/apache/maven-resolver/issues/689";>#689)
   https://github.com/apache/maven-resolver/commit/4921c500be2de580ba8e6e73cf52cf90865fbd59";>4921c50
 [MRESOLVER-720] Add generated file warning headers to velocity templates (https://redirect.github.com/apache/maven-resolver/issues/691";>#691)
   https://github.com/apache/maven-resolver/commit/56da885192f6678f734cb8de48d7ebce70d3cbed";>56da885
 [MRESOLVER-719] Bump org.redisson:redisson from 3.45.1 to 3.46.0 (https://redirect.github.com/apache/maven-resolver/issues/715";>#715)
   Additional commits viewable in https://github.com/apache/maven-resolver/compare/maven-resolver-2.0.8...maven-resolver-2.0.9";>compare
 view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.resolver:maven-resolver-api&package-manager=maven&previous-version=2.0.8&new-version=2.0.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot show  ignore conditions` will show all of 
the ignore conditions of the specified dependency
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Bump resolverVersion from 2.0.8 to 2.0.9 [maven]

2025-05-18 Thread via GitHub


dependabot[bot] opened a new pull request, #2351:
URL: https://github.com/apache/maven/pull/2351

   Bumps `resolverVersion` from 2.0.8 to 2.0.9.
   Updates `org.apache.maven.resolver:maven-resolver-api` from 2.0.8 to 2.0.9
   
   Commits
   
   https://github.com/apache/maven-resolver/commit/13e91652bbebdb33ad3df81d22f568eeb4e66e34";>13e9165
 [maven-release-plugin] prepare release maven-resolver-2.0.9
   https://github.com/apache/maven-resolver/commit/2c2be03e548f2baa8fbb0b1fcd6757bbd49c97f8";>2c2be03
 [MRESOLVER-588] Fix for both supplier (https://redirect.github.com/apache/maven-resolver/issues/724";>#724)
   https://github.com/apache/maven-resolver/commit/1e86daed47323d594096bbce1fddfda415e48bc3";>1e86dae
 [MRESOLVER-701] Support legacy property (https://redirect.github.com/apache/maven-resolver/issues/723";>#723)
   https://github.com/apache/maven-resolver/commit/9c79e753c195baa4cbddc37b6a1d0b2c18e598cb";>9c79e75
 [MRESOLVER-699] Fix release tag (https://redirect.github.com/apache/maven-resolver/issues/722";>#722)
   https://github.com/apache/maven-resolver/commit/380a589410cd3a8a31b41ddfc7bc1694b625b15d";>380a589
 Update file
   https://github.com/apache/maven-resolver/commit/3e68bfe665b78ede47cd2f074ea83f1b19a7a0bc";>3e68bfe
 [MRESOLVER-723] Bump info.picocli:picocli from 4.7.6 to 4.7.7 (https://redirect.github.com/apache/maven-resolver/issues/687";>#687)
   https://github.com/apache/maven-resolver/commit/4a85ac0c5e1765174d845fd063edba610ad92cae";>4a85ac0
 [MRESOLVER-722] Bump testcontainersVersion from 1.20.6 to 1.21.0 (https://redirect.github.com/apache/maven-resolver/issues/688";>#688)
   https://github.com/apache/maven-resolver/commit/1a8bede0a0b907c8c14fb6a56953d42dfb861856";>1a8bede
 [MRESOLVER-721] Bump com.google.code.gson:gson from 2.13.0 to 2.13.1 (https://redirect.github.com/apache/maven-resolver/issues/689";>#689)
   https://github.com/apache/maven-resolver/commit/4921c500be2de580ba8e6e73cf52cf90865fbd59";>4921c50
 [MRESOLVER-720] Add generated file warning headers to velocity templates (https://redirect.github.com/apache/maven-resolver/issues/691";>#691)
   https://github.com/apache/maven-resolver/commit/56da885192f6678f734cb8de48d7ebce70d3cbed";>56da885
 [MRESOLVER-719] Bump org.redisson:redisson from 3.45.1 to 3.46.0 (https://redirect.github.com/apache/maven-resolver/issues/715";>#715)
   Additional commits viewable in https://github.com/apache/maven-resolver/compare/maven-resolver-2.0.8...maven-resolver-2.0.9";>compare
 view
   
   
   
   
   Updates `org.apache.maven.resolver:maven-resolver-spi` from 2.0.8 to 2.0.9
   
   Commits
   
   https://github.com/apache/maven-resolver/commit/13e91652bbebdb33ad3df81d22f568eeb4e66e34";>13e9165
 [maven-release-plugin] prepare release maven-resolver-2.0.9
   https://github.com/apache/maven-resolver/commit/2c2be03e548f2baa8fbb0b1fcd6757bbd49c97f8";>2c2be03
 [MRESOLVER-588] Fix for both supplier (https://redirect.github.com/apache/maven-resolver/issues/724";>#724)
   https://github.com/apache/maven-resolver/commit/1e86daed47323d594096bbce1fddfda415e48bc3";>1e86dae
 [MRESOLVER-701] Support legacy property (https://redirect.github.com/apache/maven-resolver/issues/723";>#723)
   https://github.com/apache/maven-resolver/commit/9c79e753c195baa4cbddc37b6a1d0b2c18e598cb";>9c79e75
 [MRESOLVER-699] Fix release tag (https://redirect.github.com/apache/maven-resolver/issues/722";>#722)
   https://github.com/apache/maven-resolver/commit/380a589410cd3a8a31b41ddfc7bc1694b625b15d";>380a589
 Update file
   https://github.com/apache/maven-resolver/commit/3e68bfe665b78ede47cd2f074ea83f1b19a7a0bc";>3e68bfe
 [MRESOLVER-723] Bump info.picocli:picocli from 4.7.6 to 4.7.7 (https://redirect.github.com/apache/maven-resolver/issues/687";>#687)
   https://github.com/apache/maven-resolver/commit/4a85ac0c5e1765174d845fd063edba610ad92cae";>4a85ac0
 [MRESOLVER-722] Bump testcontainersVersion from 1.20.6 to 1.21.0 (https://redirect.github.com/apache/maven-resolver/issues/688";>#688)
   https://github.com/apache/maven-resolver/commit/1a8bede0a0b907c8c14fb6a56953d42dfb861856";>1a8bede
 [MRESOLVER-721] Bump com.google.code.gson:gson from 2.13.0 to 2.13.1 (https://redirect.github.com/apache/maven-resolver/issues/689";>#689)
   https://github.com/apache/maven-resolver/commit/4921c500be2de580ba8e6e73cf52cf90865fbd59";>4921c50
 [MRESOLVER-720] Add generated file warning headers to velocity templates (https://redirect.github.com/apache/maven-resolver/issues/691";>#691)
   https://github.com/apache/maven-resolver/commit/56da885192f6678f734cb8de48d7ebce70d3cbed";>56da885
 [MRESOLVER-719] Bump org.redisson:redisson from 3.45.1 to 3.46.0 (https://redirect.github.com/apache/maven-resolver/issues/715";>#715)
   Additional commits viewable in https://github.com/apache/maven-resolver/compare/maven-resolver-2.0.8...maven-resolver-2.0.9";>compare
 view
   
   
   
   
   Updates `org.apache.maven.resolver:maven-resolver-impl` from 1.8.1 to 2.0.9
   
   Release notes
   Sourced from https://git

[PR] Bump org.xmlunit:xmlunit-core from 2.10.0 to 2.10.1 [maven-release]

2025-05-18 Thread via GitHub


dependabot[bot] opened a new pull request, #242:
URL: https://github.com/apache/maven-release/pull/242

   Bumps [org.xmlunit:xmlunit-core](https://github.com/xmlunit/xmlunit) from 
2.10.0 to 2.10.1.
   
   Release notes
   Sourced from https://github.com/xmlunit/xmlunit/releases";>org.xmlunit:xmlunit-core's 
releases.
   
   XMLUnit for Java 2.10.1
   
   
   placeholders can now also be used inside of the local part of 
xsi:type attributes.
   PR https://redirect.github.com/xmlunit/xmlunit/pull/293";>#293
   
   
   PlaceholderDifferenceEvaluator would cause ClassCastException for 
documents with
   differences in xsi:type attributes.
   Issue https://redirect.github.com/xmlunit/xmlunit/issues/276";>#276
   
   
   updated a bunch of Maven plugins, in particular we now create CylcloneDX 
files using
   version 1.6 of the schema.
   PR https://redirect.github.com/xmlunit/xmlunit/pull/292";>#292
   
   
   updated bytebuddy dependency of xmlunit-assertj to 2.12.23 in order
   to support Java 17 properly
   
   
   Migrated form TraciCI to CircleCI
   Issue https://redirect.github.com/xmlunit/xmlunit/pull/289";>#289
   
   
   Migrated to Sonatype's Central Portal
   Issue https://redirect.github.com/xmlunit/xmlunit/issues/287";>#287
   
   
   added a new BOM artifact xmlunit-bom
   Issue https://redirect.github.com/xmlunit/xmlunit/issues/268";>#269
   
   
   Comparison has earned a new convenience constructor.
   PR https://redirect.github.com/xmlunit/xmlunit/pull/280";>#280 by
   https://github.com/hiufung-kwok";>@​hiufung-kwok
   
   
   Input.from now detects Reader arguments and 
uses fromReader.
   PR https://redirect.github.com/xmlunit/xmlunit/pull/281";>#281 by
   https://github.com/SThomasP";>@​SThomasP
   
   
   
   
   
   Changelog
   Sourced from https://github.com/xmlunit/xmlunit/blob/main/RELEASE_NOTES.md";>org.xmlunit:xmlunit-core's
 changelog.
   
   XMLUnit for Java 2.10.1 - /Released 2025-05-19/
   
   
   placeholders can now also be used inside of the local part of 
xsi:type attributes.
   PR https://redirect.github.com/xmlunit/xmlunit/pull/293";>#293
   
   
   PlaceholderDifferenceEvaluator would cause ClassCastException for 
documents with
   differences in xsi:type attributes.
   Issue https://redirect.github.com/xmlunit/xmlunit/issues/276";>#276
   
   
   updated a bunch of Maven plugins, in particular we now create CylcloneDX 
files using
   version 1.6 of the schema.
   PR https://redirect.github.com/xmlunit/xmlunit/pull/292";>#292
   
   
   updated bytebuddy dependency of xmlunit-assertj to 2.12.23 in order
   to support Java 17 properly
   
   
   Migrated form TravisCI to CircleCI
   Issue https://redirect.github.com/xmlunit/xmlunit/pull/289";>#289
   
   
   Migrated to Sonatype's Central Portal
   Issue https://redirect.github.com/xmlunit/xmlunit/issues/287";>#287
   
   
   added a new BOM artifact xmlunit-bom
   Issue https://redirect.github.com/xmlunit/xmlunit/issues/268";>#269
   
   
   Comparison has earned a new convenience constructor.
   PR https://redirect.github.com/xmlunit/xmlunit/pull/280";>#280 by
   https://github.com/hiufung-kwok";>@​hiufung-kwok
   
   
   Input.from now detects Reader arguments and 
uses fromReader.
   PR https://redirect.github.com/xmlunit/xmlunit/pull/281";>#281 by
   https://github.com/SThomasP";>@​SThomasP
   
   
   
   
   
   Commits
   
   https://github.com/xmlunit/xmlunit/commit/ec8c388c4870c8abc288c6c91cec9e853ea1b3cc";>ec8c388
 prepare 2.10.1 release
   https://github.com/xmlunit/xmlunit/commit/7967a324c0c6e2a704e0502005a932b793d30fbb";>7967a32
 Merge pull request https://redirect.github.com/xmlunit/xmlunit/issues/293";>#293 from 
xmlunit/make-placeholders-deal-with-xsi-type
   https://github.com/xmlunit/xmlunit/commit/7c2d8b377ef9d6a018350a4bc1f4fcb689c0d478";>7c2d8b3
 cover case of different QName namespaces
   https://github.com/xmlunit/xmlunit/commit/6d35d0c254a8f9f6f7af6606665ba8ffbea3b171";>6d35d0c
 allow limited use of placeholders inside xsi:type attributes.
   https://github.com/xmlunit/xmlunit/commit/d06eeeb32f260ab495e426153d09b4bc29ebd024";>d06eeeb
 ensure PlaceholderDifferenceEvaluator survives differences in xsi:type 
attrib...
   https://github.com/xmlunit/xmlunit/commit/f72dde79d15112eea166c94618ac63bd7fc1899b";>f72dde7
 Merge pull request https://redirect.github.com/xmlunit/xmlunit/issues/292";>#292 from 
xmlunit/update-plugins
   https://github.com/xmlunit/xmlunit/commit/81767817499978057fbd9d37a3704823c3cebdb6";>8176781
 ensure BOM is signed and SBOMs get published
   https://github.com/xmlunit/xmlunit/commit/2423d861f7538c60638a8224aa926e08bfd09f93";>2423d86
 update a few maven plugins
   https://github.com/xmlunit/xmlunit/commit/7fa1bd6e618bafeae588d1b3c00cde72bb5cb21f";>7fa1bd6
 Merge pull request https://redirect.github.com/xmlunit/xmlunit/issues/291";>#291 from 
xmlunit/extend-circle-ci
   https://github.com/xmlunit/xmlunit/commit/88004a8f44e3cd3ef719a1b1d7cf38bc7b54d7bd";>88004a8
 record bytebuddy

Re: [I] Using Google Java Conventions XML Config causes failure [maven-checkstyle-plugin]

2025-05-18 Thread via GitHub


schl3sch commented on issue #176:
URL: 
https://github.com/apache/maven-checkstyle-plugin/issues/176#issuecomment-2889599041

   Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Using Google Java Conventions XML Config causes failure [maven-checkstyle-plugin]

2025-05-18 Thread via GitHub


schl3sch closed issue #176: Using Google Java Conventions XML Config causes 
failure
URL: https://github.com/apache/maven-checkstyle-plugin/issues/176


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MNG-5913) Allow to define aliases for existing server configurations in settings.xml

2025-05-18 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-5913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952455#comment-17952455
 ] 

Slawomir Jaranowski commented on MNG-5913:
--

{quote}
3.9.10 has already so many tickets and this is a big one I'd move it to 3.9.11.
{quote}
 
You are right that we have many changes for 3.9.10, for me this one will be 
very useful.
I'm ready to take a risk also for it, even  we have many other changes

I will ask about testing 3.9.10-SNAPSHOT on mailing list, we will see how 
feedback will be

In the worst case we release 3.9.11 with fixes 

> Allow to define aliases for existing server configurations in settings.xml
> --
>
> Key: MNG-5913
> URL: https://issues.apache.org/jira/browse/MNG-5913
> Project: Maven
>  Issue Type: Improvement
>  Components: Artifacts and Repositories, Deployment, Documentation:  
> General, Settings
>Affects Versions: 3.3.3
>Reporter: Stanislav Spiridonov
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.9.10, 4.0.0-rc-4
>
>
> Now the repository (and other server related tags!!!) linked with 
> corresponding server configuration by ID tag. For the complex project it 
> produce tens of similar servers->server records in settings.xm
> The best explanation of the issue is on  
> http://stackoverflow.com/questions/15011250/maven-meaning-of-repository-id
> The possible solution is define aliase for existing server configuration 
> instead of duplicate it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (MNG-5913) Allow to define aliases for existing server configurations in settings.xml

2025-05-18 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-5913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952456#comment-17952456
 ] 

Michael Osipov edited comment on MNG-5913 at 5/18/25 3:21 PM:
--

I am fine with that. I prefer reliability/stability over features.


was (Author: michael-o):
I am fine with that. I prefer reliability over features.

> Allow to define aliases for existing server configurations in settings.xml
> --
>
> Key: MNG-5913
> URL: https://issues.apache.org/jira/browse/MNG-5913
> Project: Maven
>  Issue Type: Improvement
>  Components: Artifacts and Repositories, Deployment, Documentation:  
> General, Settings
>Affects Versions: 3.3.3
>Reporter: Stanislav Spiridonov
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.9.10, 4.0.0-rc-4
>
>
> Now the repository (and other server related tags!!!) linked with 
> corresponding server configuration by ID tag. For the complex project it 
> produce tens of similar servers->server records in settings.xm
> The best explanation of the issue is on  
> http://stackoverflow.com/questions/15011250/maven-meaning-of-repository-id
> The possible solution is define aliase for existing server configuration 
> instead of duplicate it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-5913) Allow to define aliases for existing server configurations in settings.xml

2025-05-18 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-5913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952456#comment-17952456
 ] 

Michael Osipov commented on MNG-5913:
-

I am fine with that. I prefer reliability over features.

> Allow to define aliases for existing server configurations in settings.xml
> --
>
> Key: MNG-5913
> URL: https://issues.apache.org/jira/browse/MNG-5913
> Project: Maven
>  Issue Type: Improvement
>  Components: Artifacts and Repositories, Deployment, Documentation:  
> General, Settings
>Affects Versions: 3.3.3
>Reporter: Stanislav Spiridonov
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.9.10, 4.0.0-rc-4
>
>
> Now the repository (and other server related tags!!!) linked with 
> corresponding server configuration by ID tag. For the complex project it 
> produce tens of similar servers->server records in settings.xm
> The best explanation of the issue is on  
> http://stackoverflow.com/questions/15011250/maven-meaning-of-repository-id
> The possible solution is define aliase for existing server configuration 
> instead of duplicate it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] [MNG-8696] PathModularizationCache needs to set cache [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2219:
URL: https://github.com/apache/maven/pull/2219#discussion_r2094518296


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency
  * @param exceptions the exceptions that occurred while building the 
dependency graph
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
 public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);
+}
+
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+if (cache == null) {

Review Comment:
   ```suggestion
   if (cache != null) {
   ```



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency
  * @param exceptions the exceptions that occurred while building the 
dependency graph
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
 public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);
+}
+
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+if (cache == null) {
+this.cache = new PathModularizationCache();
+} else {
+this.cache = cache;
+}

Review Comment:
   ```suggestion
   }
   ```
   one concern.



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency
  * @param exceptions the exceptions that occurred while building the 
dependency graph
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
 public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);
+}
+
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+if (cache == null) {
+this.cache = new PathModularizationCache();

Review Comment:
   ```suggestion
   this.cache = cache;
   ```
   might consider init on declaration to give cohesion; default - making first 
things first.



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency

Review Comment:
   `private final PathModularizationCache cache = new 
PathModularizationCache();` L:98
   
   - 
https://www.reddit.com/r/learnjava/comments/ozgtxm/is_initializing_variables_at_their_declaration/
   - 
https://softwareengineering.stackexchange.com/questions/379039/what-is-the-best-practice-for-initializing-variables-outside-or-inside-of-the-c
   - 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go 

Re: [PR] [MNG-8696] PathModularizationCache needs to set cache [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2219:
URL: https://github.com/apache/maven/pull/2219#discussion_r2094518296


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency
  * @param exceptions the exceptions that occurred while building the 
dependency graph
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
 public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);
+}
+
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+if (cache == null) {

Review Comment:
   ```suggestion
   if (cache != null) {
   ```
   give happy path



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] make fields of DefaultSettingsBuilder final [maven]

2025-05-18 Thread via GitHub


Pankraz76 closed pull request #2339: make fields of DefaultSettingsBuilder final
URL: https://github.com/apache/maven/pull/2339


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Fix for Java 24 w/ upcoming new Eclipse Sisu [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2311:
URL: https://github.com/apache/maven/pull/2311#discussion_r2094517485


##
impl/maven-executor/src/main/java/org/apache/maven/cling/executor/internal/ToolboxTool.java:
##
@@ -142,7 +142,7 @@ private String validateOutput(boolean shave, 
ByteArrayOutputStream stdout, ByteA
 }
 // sanity checks: stderr has any OR result is empty string (no method 
should emit empty string)
 if (stderr.size() > 0 || result.trim().isEmpty()) {
-throw new ExecutorException(
+System.err.println(

Review Comment:
   do we have logger for this? using system directly would cause spotbugs 
violations. We having this code pattern all over, so its justiciable, still 
questionable as bigger picture.
   
   
https://stackoverflow.com/questions/8601831/do-not-use-system-out-println-in-server-side-code
   
   Why cannot we throw anymore, please? Of course we dont want to lose the 
information. As we having error we can not tread, how and why continue? 
   Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Fix for Java 24 w/ upcoming new Eclipse Sisu [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2311:
URL: https://github.com/apache/maven/pull/2311#discussion_r2094517485


##
impl/maven-executor/src/main/java/org/apache/maven/cling/executor/internal/ToolboxTool.java:
##
@@ -142,7 +142,7 @@ private String validateOutput(boolean shave, 
ByteArrayOutputStream stdout, ByteA
 }
 // sanity checks: stderr has any OR result is empty string (no method 
should emit empty string)
 if (stderr.size() > 0 || result.trim().isEmpty()) {
-throw new ExecutorException(
+System.err.println(

Review Comment:
   do we have logger for this? using system directly would cause spotbugs 
violations. We having this code the pattern a lot so its a bigger thing kind of.
   
   
https://stackoverflow.com/questions/8601831/do-not-use-system-out-println-in-server-side-code#:~:text=71-,System.,until%20the%20println%20has%20finished.
   
   Why cannot we throw anymore, please? Of course we dont want to lose the 
information. As we having error we can not tread, how and why continue? 
   Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] PathModularizationCache needs to set cache [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2219:
URL: https://github.com/apache/maven/pull/2219#discussion_r2094518198


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency
  * @param exceptions the exceptions that occurred while building the 
dependency graph
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
 public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);
+}
+
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+if (cache == null) {
+this.cache = new PathModularizationCache();

Review Comment:
   could init on declaration to give context for default trading coupling for 
cohesion. This case is then implied default making use for only dedicated 
second if.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] extract common functionality of DefaultPluginXmlFactory [maven]

2025-05-18 Thread via GitHub


gnodet commented on code in PR #2326:
URL: https://github.com/apache/maven/pull/2326#discussion_r2094547990


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultPluginXmlFactory.java:
##
@@ -38,65 +37,63 @@
 import org.apache.maven.plugin.descriptor.io.PluginDescriptorStaxReader;
 import org.apache.maven.plugin.descriptor.io.PluginDescriptorStaxWriter;
 
-import static org.apache.maven.impl.ImplUtils.nonNull;
 import static org.apache.maven.impl.StaxLocation.getLocation;
 import static org.apache.maven.impl.StaxLocation.getMessage;
 
 @Named
 @Singleton
 public class DefaultPluginXmlFactory implements PluginXmlFactory {
+
 @Override
 public PluginDescriptor read(@Nonnull XmlReaderRequest request) throws 
XmlReaderException {
-nonNull(request, "request");
-Path path = request.getPath();
-URL url = request.getURL();
-Reader reader = request.getReader();
-InputStream inputStream = request.getInputStream();
-if (path == null && url == null && reader == null && inputStream == 
null) {
-throw new IllegalArgumentException("path, url, reader or 
inputStream must be non null");
-}
+return read(request, setAddDefaultEntities(request, new 
PluginDescriptorStaxReader()));
+}
+
+@Override
+public void write(XmlWriterRequest request) throws 
XmlWriterException {

Review Comment:
   Agreed, but in that case, the PR is off-topic and maybe the point is to 
rename the interfaces.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Updated] (MNG-5913) Allow to define aliases for existing server configurations in settings.xml

2025-05-18 Thread Slawomir Jaranowski (Jira)


 [ 
https://issues.apache.org/jira/browse/MNG-5913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Slawomir Jaranowski updated MNG-5913:
-
Fix Version/s: 3.9.10
   4.0.0-rc-4

> Allow to define aliases for existing server configurations in settings.xml
> --
>
> Key: MNG-5913
> URL: https://issues.apache.org/jira/browse/MNG-5913
> Project: Maven
>  Issue Type: Improvement
>  Components: Artifacts and Repositories, Deployment, Documentation:  
> General, Settings
>Affects Versions: 3.3.3
>Reporter: Stanislav Spiridonov
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.9.10, 4.0.0-rc-4
>
>
> Now the repository (and other server related tags!!!) linked with 
> corresponding server configuration by ID tag. For the complex project it 
> produce tens of similar servers->server records in settings.xm
> The best explanation of the issue is on  
> http://stackoverflow.com/questions/15011250/maven-meaning-of-repository-id
> The possible solution is define aliase for existing server configuration 
> instead of duplicate it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (MNG-8711) "Duplicate artifact" in LifecycleDependencyResolver

2025-05-18 Thread Vasilii Gulevich (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-8711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17948209#comment-17948209
 ] 

Vasilii Gulevich edited comment on MNG-8711 at 5/18/25 2:50 PM:


To ensure that the problem is indeed fixed, I came up with a following test (to 
be pasted in 
impl/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolverTest.java):
{code:java}
@Test
void testResolutionWithoutFiltering() throws Exception {
MavenSession session = createMavenSession(
new 
File("src/test/projects/lifecycle-dependency-resolver/pom.xml"), new 
Properties(), true);
Collection scopesToCollect = null;
Collection scopesToResolve = 
Collections.singletonList("compile");
boolean aggregating = false;
for (MavenProject reactorProject : session.getProjects()) {
reactorProject.setArtifactFilter(artifact -> true);
resolver.resolveProjectDependencies(
reactorProject, scopesToCollect, scopesToResolve, session, 
aggregating, Collections.emptySet()); // unexpectedly throws
}
}
{code}
Notice that last argument is empty, just like it would be in 
org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoDescriptor,
 MavenSession, DependencyContext)

The test fails with:
{code:java}
[ERROR] 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolverTest.testResolutionWithoutFiltering
 -- Time elapsed: 0.032 s <<< ERROR!
org.apache.maven.lifecycle.LifecycleExecutionException: 
Failed to execute goal on project mng6300-war: Could not resolve dependencies 
for project org.apache.maven.its.mng6300:mng6300-war:war:1.0
dependency: org.apache.maven.its.mng6300:mng6300-lib:jar:1.0 (compile)
Could not find artifact 
org.apache.maven.its.mng6300:mng6300-lib:jar:1.0 in central 
(file:///Users/vasiligulevich/git/maven/impl/maven-core/src/test/remote-repo/)

at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:279)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectArtifacts(LifecycleDependencyResolver.java:208)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:128)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolverTest.testResolutionWithoutFiltering(LifecycleDependencyResolverTest.java:148)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not 
resolve dependencies for project 
org.apache.maven.its.mng6300:mng6300-war:war:1.0
dependency: org.apache.maven.its.mng6300:mng6300-lib:jar:1.0 (compile)
Could not find artifact 
org.apache.maven.its.mng6300:mng6300-lib:jar:1.0 in central 
(file:///Users/vasiligulevich/git/maven/impl/maven-core/src/test/remote-repo/)

at 
org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:191)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:260)
... 6 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The 
following artifacts could not be resolved: 
org.apache.maven.its.mng6300:mng6300-lib:jar:1.0 (absent): Could not find 
artifac
t org.apache.maven.its.mng6300:mng6300-lib:jar:1.0 in central 
(file:///Users/vasiligulevich/git/maven/impl/maven-core/src/test/remote-repo/)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:312)
at 
org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:186)
... 7 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The 
following artifacts could not be resolved: 
org.apache.maven.its.mng6300:mng6300-lib:jar:1.0 (absent): Could not find 
artifact 
org.apache.maven.its.mng6300:mng6300-lib:jar:1.0 in central 
(file:///Users/vasiligulevich/git/maven/impl/maven-core/src/test/remote-repo/)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:424)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:201)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:299)
... 8 more
Suppressed: org.eclipse.aether.resolution.ArtifactResolutionException: 
Failed to resolve artifact org.apache.maven.its.mng6300:mng6300-lib:jar:1.

[jira] [Commented] (MNG-8186) Introduce flag for warning when an aggregator mojo is locking other mojo executions

2025-05-18 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-8186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952452#comment-17952452
 ] 

Slawomir Jaranowski commented on MNG-8186:
--

As mentioned in linked issue it affects 4.x and 3.9.x - so should be allos done 
for 4.x.

I moved to candidate for such versions, If someone will willing work on it let 
use know.

> Introduce flag for warning when an aggregator mojo is locking other mojo 
> executions
> ---
>
> Key: MNG-8186
> URL: https://issues.apache.org/jira/browse/MNG-8186
> Project: Maven
>  Issue Type: New Feature
>Affects Versions: 3.9.8
>Reporter: Piotr Zygielo
>Priority: Minor
> Fix For: 3.9.10
>
>
> https://issues.apache.org/jira/browse/MNG-7476?focusedCommentId=17867695&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17867695
> bq. This should not affect the build.  And there's currently no way to avoid 
> it.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (MNG-8186) Introduce flag for warning when an aggregator mojo is locking other mojo executions

2025-05-18 Thread Slawomir Jaranowski (Jira)


 [ 
https://issues.apache.org/jira/browse/MNG-8186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Slawomir Jaranowski updated MNG-8186:
-
Fix Version/s: 3.9.x-candidate
   4.0.x-candidate
   (was: 3.9.10)

> Introduce flag for warning when an aggregator mojo is locking other mojo 
> executions
> ---
>
> Key: MNG-8186
> URL: https://issues.apache.org/jira/browse/MNG-8186
> Project: Maven
>  Issue Type: New Feature
>Affects Versions: 3.9.8
>Reporter: Piotr Zygielo
>Priority: Minor
> Fix For: 3.9.x-candidate, 4.0.x-candidate
>
>
> https://issues.apache.org/jira/browse/MNG-7476?focusedCommentId=17867695&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17867695
> bq. This should not affect the build.  And there's currently no way to avoid 
> it.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] [POC] `rewrite-maven-plugin`: Introduce OpenRewrite by Moderne [maven]

2025-05-18 Thread via GitHub


elharo commented on PR #2322:
URL: https://github.com/apache/maven/pull/2322#issuecomment-2889040705

   This is nothing new and nothing I haven't heard before. This same thing
   happened with MongoDB and with other projects. A proprietary closed license
   wasn't the right response then and it isn't now. The correct response is to
   license under GPL or perhaps AGPL. The Apache license was explicitly
   designed to allow big corporations to build businesses and products around
   open source tech without contributing back to the community.
   
   On Sun, May 18, 2025 at 2:20 PM Tim te Beek ***@***.***>
   wrote:
   
   > *timtebeek* left a comment (apache/maven#2322)
   > 
   >
   > I've spoken at length with the author linked above at Code Remix Summit
   > last week, helped him understand and analyze the changes, and got him set
   > up to continue his work. Despite this he came out with a deeply flawed
   > analysis and false statements, which unfortunately are being taken at face
   > value.
   >
   > Figured I'd provide some more context about the changes made from our
   > perspective:
   >
   >- ***@***.***/the-openrewrite-community-potluck
   >
***@***.***/the-openrewrite-community-potluck-ebf36116e7a6?source=friends_link&sk=7aa496b025118a9a8fd94c7691fb0ed6>
   >
   > You're all welcome to use and contribute to OpenRewrite for as much as
   > you'd like; we see no reason to be hesitant at all, but understand opinions
   > may differ. Either way I'll continue to support the Apache Maven project
   > and users for as much as I can, as I have when talking to Apache Maven
   > contributors over the years, especially with an eye towards changes in the
   > upcoming v4.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > , or
   > unsubscribe
   > 

   > .
   > You are receiving this because you commented.Message ID:
   > ***@***.***>
   >
   
   
   -- 
   Elliotte Rusty Harold
   ***@***.***
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MNG-5913) Allow to define aliases for existing server configurations in settings.xml

2025-05-18 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-5913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952453#comment-17952453
 ] 

Michael Osipov commented on MNG-5913:
-

3.9.10 has already so many tickets and this is a big one I'd move it to 3.9.11.

> Allow to define aliases for existing server configurations in settings.xml
> --
>
> Key: MNG-5913
> URL: https://issues.apache.org/jira/browse/MNG-5913
> Project: Maven
>  Issue Type: Improvement
>  Components: Artifacts and Repositories, Deployment, Documentation:  
> General, Settings
>Affects Versions: 3.3.3
>Reporter: Stanislav Spiridonov
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.9.10, 4.0.0-rc-4
>
>
> Now the repository (and other server related tags!!!) linked with 
> corresponding server configuration by ID tag. For the complex project it 
> produce tens of similar servers->server records in settings.xm
> The best explanation of the issue is on  
> http://stackoverflow.com/questions/15011250/maven-meaning-of-repository-id
> The possible solution is define aliase for existing server configuration 
> instead of duplicate it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[I] Support Checkstyle 10.22.0 [maven-checkstyle-plugin]

2025-05-18 Thread via GitHub


BaumiCoder opened a new issue, #177:
URL: https://github.com/apache/maven-checkstyle-plugin/issues/177

   ### New feature, improvement proposal
   
   There were breaking changes in CheckStyle 10.22.0. From the [Release 
nodes](https://checkstyle.org/releasenotes.html#Release_10.22.0):
   
   > Breaking backward compatibility:
   > -  JavadocVariable: new property 'accessModifiers' as substitution of 
'scope' and 'excludeScope' . Author: Konstantinos Koutsilis 
[#9280](https://github.com/checkstyle/checkstyle/issues/9280)
   > - Change default or IllegalIdentifierName. Author: SteLeo1602 
[#15499](https://github.com/checkstyle/checkstyle/issues/15499)
   
   Please adjust the plugin to these changes. Epically the first one can be 
very confusing when using different CheckStyle tools (e.g., the maven plugin 
and the IntelliJ Plugin) on the newest version. Each one another format in the 
checkstyle.xml.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Fix for Java 24 w/ upcoming new Eclipse Sisu [maven]

2025-05-18 Thread via GitHub


cstamas commented on code in PR #2311:
URL: https://github.com/apache/maven/pull/2311#discussion_r2094613265


##
impl/maven-executor/src/main/java/org/apache/maven/cling/executor/internal/ToolboxTool.java:
##
@@ -142,7 +142,7 @@ private String validateOutput(boolean shave, 
ByteArrayOutputStream stdout, ByteA
 }
 // sanity checks: stderr has any OR result is empty string (no method 
should emit empty string)
 if (stderr.size() > 0 || result.trim().isEmpty()) {
-throw new ExecutorException(
+System.err.println(

Review Comment:
   We cannot throw, as this code (whole `maven-executor`) purpose is to execute 
Maven (embedded in JVM, or forked as in forked child process) _real Maven mvn 
command_ in IT-like scenarios (this very code is used in Maven ITs). This 
codebase supports Maven 3 and Maven 4 transparently. The goal of PR is to 
"prepare it for Java 24".
   
   All existing Maven versions released so far (including Maven 4 rc releases) 
**emit warning on Java 24**, and there is nothing to be done here (the MNG-8399 
and/or alike). Hence, to make this code work on Java 24 AND be able to use 
current releases (ie. 3.9.9 or 4-rc-3), it cannot throw anymore, as err logging 
is part of "normal operation" on those Maven versions on Java 24. Or in other 
words, if we'd throw here (as before), we would not be able to run Maven 3.9.9 
and 4-rc-3 and older Maven versions using Java 24, only "fixed" Maven 3.9.10 
and upcoming 4-rc-4, and that would narrow the capabilities of this module too 
much.
   
   The point of this PR is to prepare codebase be able to run on Java 24 as is, 
and this throw was one of the obstacles preventing it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [RSPEC-S1068] Remove `unused` private fields [maven]

2025-05-18 Thread via GitHub


Pankraz76 closed pull request #2317: [RSPEC-S1068] Remove `unused` private 
fields
URL: https://github.com/apache/maven/pull/2317


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] UnnecessaryFullyQualifiedName [maven]

2025-05-18 Thread via GitHub


Pankraz76 opened a new pull request, #2348:
URL: https://github.com/apache/maven/pull/2348

   - 
https://pmd.github.io/pmd/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname
   - https://github.com/apache/maven/pull/2331


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Parameter 'request' is never used [maven]

2025-05-18 Thread via GitHub


Pankraz76 closed pull request #2338: Parameter 'request' is never used
URL: https://github.com/apache/maven/pull/2338


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094614884


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   I think that it is instantiated via reflection, as the class is annotated 
with `@Named` and `@Singleton` from the `org.apache.maven.api.di` package.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094616118


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until clarified where to store 
session-wide caches.
+ *
+ * @see moduleCache()

Review Comment:
   Side note: no need for CheckStyle, as `javac` can do this verification 
itself with the `-Xdoclint` option. It is not enabled in Maven maybe for 
historical reasons. Or maybe because we want to be able to use a `@see`  tag to 
another module without causing build failure. The latter is the kind of problem 
that "multi-modules project" resolves. But this is for another day, maybe far 
in the future.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094616566


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -191,18 +210,14 @@ public DependencyResolverResult 
resolve(DependencyResolverRequest request)
 .map(Artifact::toCoordinates)
 .collect(Collectors.toList());
 Predicate filter = request.getPathTypeFilter();
+DefaultDependencyResolverResult resolverResult = new 
DefaultDependencyResolverResult(
+null, moduleCache(), collectorResult.getExceptions(), 
collectorResult.getRoot(), nodes.size());
 if (request.getRequestType() == 
DependencyResolverRequest.RequestType.FLATTEN) {
-DefaultDependencyResolverResult flattenResult = new 
DefaultDependencyResolverResult(

Review Comment:
   The change was for removing code duplication. The exact same code was inside 
the two branches of the `if … else` statement, with only different variable 
names.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094617028


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until clarified where to store 
session-wide caches.
+ *
+ * @see moduleCache()

Review Comment:
   Javadoc link fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094617144


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094620239


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -68,6 +68,22 @@
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
 
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until clarified where to store 
session-wide caches.
+ *
+ * @see #moduleCache()
+ */
+private PathModularizationCache moduleCache;

Review Comment:
   except of static this is the same outcome.
   ```suggestion
   private final static PathModularizationCache MODULE_CACHE = new 
PathModularizationCache();
   ```



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -226,6 +242,19 @@ public DependencyResolverResult 
resolve(DependencyResolverRequest request)
 }
 }
 
+/**
+ * {@return the cache of information about the modules contained in a path 
element}.
+ *
+ * TODO: This method should not be in this class, because the 
cache should be global to the session.
+ * This method exists here only temporarily, until clarified where to 
store session-wide caches.
+ */
+private PathModularizationCache moduleCache() {
+if (moduleCache == null) {
+moduleCache = new PathModularizationCache();
+}
+return moduleCache;
+}
+

Review Comment:
   ```suggestion
   ```
   making field final is the same result. static would change to all classes 
change same cache. If no collision risk then might be possible.



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -126,7 +141,11 @@ public DependencyResolverResult collect(@Nonnull 
DependencyResolverRequest reque
 final CollectResult result =
 
session.getRepositorySystem().collectDependencies(systemSession, 
collectRequest);
 return new DefaultDependencyResolverResult(
-null, null, result.getExceptions(), 
session.getNode(result.getRoot(), request.getVerbose()), 0);
+null,
+moduleCache(),

Review Comment:
   sorry wrong assumption. This is called every time as this the only return 
therefore default.



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -68,6 +68,22 @@
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
 
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.

Review Comment:
   ```suggestion
   ```
   imho no, return case will always call.
   
   https://github.com/user-attachments/assets/bfd2b62e-0a7a-4f86-b40a-25c1ca5489bf";
 />
   



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -191,18 +210,14 @@ public DependencyResolverResult 
resolve(DependencyResolverRequest request)
 .map(Artifact::toCoordinates)
 .collect(Collectors.toList());
 Predicate filter = request.getPathTypeFilter();
+DefaultDependencyResolverResult resolverResult = new 
DefaultDependencyResolverResult(
+null, moduleCache(), collectorResult.getExceptions(), 
collectorResult.getRoot(), nodes.size());
 if (request.getRequestType() == 
DependencyResolverRequest.RequestType.FLATTEN) {
-DefaultDependencyResolverResult flattenResult = new 
DefaultDependencyResolverResult(

Review Comment:
   yes see. 
   
   Common part can be extracted from 'if' 
   
   its same obtain the warning:
   
   https://github.com/user-attachments/assets/85af7265-c672-40d2-856e-bda91dcc4dc1";
 />
   
   
   ```java
   @Override
   public DependencyResolverResult resolve(DependencyResolverRequest 
request)
   throws DependencyResolverException, ArtifactResolverException {
   InternalSession session =
   InternalSession.from(nonNull(request, 
"request").getSession());
   try {
   DependencyResolverResult collectorResult = collect(request);
   DependencyResolverResult result = collectorResult;
   List repositories = request.getRepositories() 
!= null
   ? request.getRepositories()
   : request.getProject().isPresent()
   ? session.getService(ProjectManager.class)
   .getRemoteProjectRepositories

Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094624610


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   > test
   
   delete, rebuild, pass. 
   
   It was done there before and it is without we having to make up whats 
already there. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094619188


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   then will see on IT test latest. or does clean install locally cover this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094622088


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   im confused. this is new making explicit whats implicit by language default.
   This is the first constructor introduced for no **compiler** reason given.
   
   https://github.com/user-attachments/assets/1fa93833-6252-41d6-aeb9-5f95edfa59d1";
 />
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094622078


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   The IT already passed with this change (explicit public constructor). To be 
sure, we could test with a breakpoint in the debugger. But I don't think that 
it is necessary. There is no other constructor and this class is instantiated 
somewhere for sure since `maven-compiler-plugin` uses it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094622088


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   im confused. this is new making explicit whats implicit. 
   This is the first constructor introduced for no **compiler** reason given.
   
   https://github.com/user-attachments/assets/1fa93833-6252-41d6-aeb9-5f95edfa59d1";
 />
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] UnnecessaryParentheses [maven]

2025-05-18 Thread via GitHub


Pankraz76 opened a new pull request, #2349:
URL: https://github.com/apache/maven/pull/2349

   - 
https://pmd.github.io/pmd/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname
   - https://github.com/apache/maven/pull/2331
   
   - UselessParentheses (37)
   - https://github.com/user-attachments/assets/43d31e3d-39c3-459b-91b2-bcb322742b24";
 />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] UnnecessaryFullyQualifiedName [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2348:
URL: https://github.com/apache/maven/pull/2348#discussion_r2094628533


##
src/graph/ReactorGraph.java:
##
@@ -31,7 +31,6 @@
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Paths;
-import java.util.*;

Review Comment:
   undo



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC] `rewrite-maven-plugin`: Introduce OpenRewrite by Moderne [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on PR #2322:
URL: https://github.com/apache/maven/pull/2322#issuecomment-2889223225

   @gastaldi I think we talked about using rewrite. FYI: consider license. What 
do you say about it, as quarkus leverages rewrite?
   
   Please enlighten us about Quarkus perspective on this. Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC] `rewrite-maven-plugin`: Introduce OpenRewrite by Moderne [maven]

2025-05-18 Thread via GitHub


gastaldi commented on PR #2322:
URL: https://github.com/apache/maven/pull/2322#issuecomment-2889224264

   > Please enlighten us about Quarkus perspective on this. Thanks.
   
   @gsmet may know more about this subject
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Unused assignment [maven]

2025-05-18 Thread via GitHub


Pankraz76 opened a new pull request, #2350:
URL: https://github.com/apache/maven/pull/2350

   - 
https://pmd.github.io/pmd/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname
   - https://github.com/apache/maven/pull/2331
   
   - UnusedAssignment
   https://github.com/user-attachments/assets/e299ca40-40dc-470f-aff1-792b7bfb3413";
 />
   
   https://github.com/user-attachments/assets/18441a8d-79cd-4c93-aed1-d76103575889";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094636980


##
.pmd/exclude.properties:
##
@@ -0,0 +1,483 @@
+org.apache.maven.AbstractMavenLifecycleParticipant=AbstractClassWithoutAbstractMethod
+org.apache.maven.DefaultArtifactFilterManager=MissingOverride
+org.apache.maven.DefaultMaven=GuardLogStatement
+org.apache.maven.DefaultProjectDependenciesResolver=MissingOverride
+org.apache.maven.MavenArtifactTypeRegistry=MissingOverride
+org.apache.maven.ReactorReader=UselessParentheses,MissingOverride,GuardLogStatement
+org.apache.maven.RepositoryUtils=ForLoopVariableCount
+org.apache.maven.api.ChildrenPointer=MissingOverride
+org.apache.maven.api.DefaultExtensibleEnum=MissingOverride
+org.apache.maven.api.DefaultPathScope=UseEnumCollections
+org.apache.maven.api.DependenciesPointer=MissingOverride
+org.apache.maven.api.DependencyScope=UnnecessaryFullyQualifiedName
+org.apache.maven.api.ExtensibleEnums=AbstractClassWithoutAbstractMethod
+org.apache.maven.api.JavaPathType=UnnecessaryModifier,UnnecessaryFullyQualifiedName
+org.apache.maven.api.Language=ConstantsInInterface
+org.apache.maven.api.MonotonicClock=UnnecessaryFullyQualifiedName
+org.apache.maven.api.Packaging=MissingOverride
+org.apache.maven.api.PhasePointer=MissingOverride
+org.apache.maven.api.ProjectScope=ConstantsInInterface
+org.apache.maven.api.Type=MissingOverride
+org.apache.maven.api.Version=MissingOverride
+org.apache.maven.api.VersionConstraint=MissingOverride
+org.apache.maven.api.VersionRange=MissingOverride
+org.apache.maven.api.cli.mvn.MavenOptions=MissingOverride
+org.apache.maven.api.cli.mvnenc.EncryptOptions=MissingOverride
+org.apache.maven.api.cli.mvnsh.ShellOptions=MissingOverride
+org.apache.maven.api.model.InputLocation=MissingOverride
+org.apache.maven.api.plugin.testing.Foo=UnnecessaryFullyQualifiedName
+org.apache.maven.api.plugin.testing.MojoExtension=CollapsibleIfStatements,UseVarargs
+org.apache.maven.api.plugin.testing.stubs.PluginStub=MissingOverride
+org.apache.maven.api.plugin.testing.stubs.RepositorySystemSupplier=LooseCoupling
+org.apache.maven.api.plugin.testing.stubs.SessionMock=TooManyStaticImports
+org.apache.maven.api.plugin.testing.stubs.SessionStub=LooseCoupling
+org.apache.maven.api.services.ArtifactCoordinatesFactoryRequest=UnnecessaryFullyQualifiedName
+org.apache.maven.api.services.ArtifactFactoryRequest=UnnecessaryFullyQualifiedName
+org.apache.maven.api.services.BaseRequest=MissingOverride
+org.apache.maven.api.services.DefaultArtifactFactoryRequestArtifact=MissingOverride
+org.apache.maven.api.services.DefaultDependencyCoordinatesFactoryRequest=MissingOverride
+org.apache.maven.api.services.DependencyCoordinatesFactoryRequest=UnnecessaryFullyQualifiedName
+org.apache.maven.api.services.MessageBuilder=UseVarargs
+org.apache.maven.api.services.ModelBuilderResult=MissingOverride
+org.apache.maven.api.services.xml.DefaultXmlReaderRequest=MissingOverride
+org.apache.maven.api.spi.PropertyContributor=LooseCoupling
+org.apache.maven.api.xml.Impl=UnusedAssignment,AvoidReassigningParameters
+org.apache.maven.artifact.ArtifactStatus=MissingOverride
+org.apache.maven.artifact.ArtifactUtils=UnnecessaryFullyQualifiedName
+org.apache.maven.artifact.DefaultArtifact=UselessParentheses,AvoidReassigningParameters,LiteralsFirstInComparisons
+org.apache.maven.artifact.InvalidArtifactRTException=MissingOverride
+org.apache.maven.artifact.deployer.DefaultArtifactDeployer=EmptyControlStatement,MissingOverride
+org.apache.maven.artifact.factory.DefaultArtifactFactory=MissingOverride
+org.apache.maven.artifact.handler.manager.DefaultArtifactHandlerManager=CollapsibleIfStatements,LooseCoupling
+org.apache.maven.artifact.handler.manager.LegacyArtifactHandlerManager=CollapsibleIfStatements
+org.apache.maven.artifact.installer.DefaultArtifactInstaller=EmptyControlStatement,MissingOverride
+org.apache.maven.artifact.manager.DefaultWagonManager=MissingOverride,AvoidReassigningLoopVariables,GuardLogStatement,AvoidReassigningParameters
+org.apache.maven.artifact.metadata.AbstractArtifactMetadata=UnnecessaryFullyQualifiedName
+org.apache.maven.artifact.metadata.ArtifactMetadataSource=MissingOverride
+org.apache.maven.artifact.repository.ArtifactMetadataAdapter=MissingOverride
+org.apache.maven.artifact.repository.ArtifactRepositoryAdapter=MissingOverride
+org.apache.maven.artifact.repository.ArtifactRepositoryPolicy=UnnecessaryFullyQualifiedName,AvoidReassigningParameters
+org.apache.maven.artifact.repository.DefaultArtifactRepository=UnusedFormalParameter,AvoidReassigningParameters,MissingOverride
+org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory=MissingOverride,PreserveStackTrace
+org.apache.maven.artifact.repository.DefaultRepositoryRequest=MissingOverride
+org.apache.maven.artifact.repository.LegacyLocalRepositoryManager=AvoidReassigningParameters,MissingOverride
+org.apache.maven.artifact.repository.MavenArtifactRepository=MissingOverride,

Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094538646


##
.pmd/exclude.properties:
##
@@ -0,0 +1,483 @@
+org.apache.maven.AbstractMavenLifecycleParticipant=AbstractClassWithoutAbstractMethod
+org.apache.maven.DefaultArtifactFilterManager=MissingOverride
+org.apache.maven.DefaultMaven=GuardLogStatement
+org.apache.maven.DefaultProjectDependenciesResolver=MissingOverride
+org.apache.maven.MavenArtifactTypeRegistry=MissingOverride
+org.apache.maven.ReactorReader=UselessParentheses,MissingOverride,GuardLogStatement
+org.apache.maven.RepositoryUtils=ForLoopVariableCount
+org.apache.maven.api.ChildrenPointer=MissingOverride
+org.apache.maven.api.DefaultExtensibleEnum=MissingOverride
+org.apache.maven.api.DefaultPathScope=UseEnumCollections
+org.apache.maven.api.DependenciesPointer=MissingOverride
+org.apache.maven.api.DependencyScope=UnnecessaryFullyQualifiedName
+org.apache.maven.api.ExtensibleEnums=AbstractClassWithoutAbstractMethod
+org.apache.maven.api.JavaPathType=UnnecessaryModifier,UnnecessaryFullyQualifiedName
+org.apache.maven.api.Language=ConstantsInInterface
+org.apache.maven.api.MonotonicClock=UnnecessaryFullyQualifiedName
+org.apache.maven.api.Packaging=MissingOverride
+org.apache.maven.api.PhasePointer=MissingOverride
+org.apache.maven.api.ProjectScope=ConstantsInInterface
+org.apache.maven.api.Type=MissingOverride
+org.apache.maven.api.Version=MissingOverride
+org.apache.maven.api.VersionConstraint=MissingOverride
+org.apache.maven.api.VersionRange=MissingOverride
+org.apache.maven.api.cli.mvn.MavenOptions=MissingOverride
+org.apache.maven.api.cli.mvnenc.EncryptOptions=MissingOverride
+org.apache.maven.api.cli.mvnsh.ShellOptions=MissingOverride
+org.apache.maven.api.model.InputLocation=MissingOverride
+org.apache.maven.api.plugin.testing.Foo=UnnecessaryFullyQualifiedName

Review Comment:
   - https://github.com/apache/maven/pull/2348



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [POC-FIX-PMD] `maven-pmd-plugin`: reactivate `PMD` - Best Practices [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2331:
URL: https://github.com/apache/maven/pull/2331#discussion_r2094636770


##
.pmd/exclude.properties:
##
@@ -0,0 +1,483 @@
+org.apache.maven.AbstractMavenLifecycleParticipant=AbstractClassWithoutAbstractMethod
+org.apache.maven.DefaultArtifactFilterManager=MissingOverride
+org.apache.maven.DefaultMaven=GuardLogStatement
+org.apache.maven.DefaultProjectDependenciesResolver=MissingOverride
+org.apache.maven.MavenArtifactTypeRegistry=MissingOverride
+org.apache.maven.ReactorReader=UselessParentheses,MissingOverride,GuardLogStatement
+org.apache.maven.RepositoryUtils=ForLoopVariableCount
+org.apache.maven.api.ChildrenPointer=MissingOverride
+org.apache.maven.api.DefaultExtensibleEnum=MissingOverride
+org.apache.maven.api.DefaultPathScope=UseEnumCollections
+org.apache.maven.api.DependenciesPointer=MissingOverride
+org.apache.maven.api.DependencyScope=UnnecessaryFullyQualifiedName
+org.apache.maven.api.ExtensibleEnums=AbstractClassWithoutAbstractMethod
+org.apache.maven.api.JavaPathType=UnnecessaryModifier,UnnecessaryFullyQualifiedName
+org.apache.maven.api.Language=ConstantsInInterface
+org.apache.maven.api.MonotonicClock=UnnecessaryFullyQualifiedName
+org.apache.maven.api.Packaging=MissingOverride
+org.apache.maven.api.PhasePointer=MissingOverride
+org.apache.maven.api.ProjectScope=ConstantsInInterface
+org.apache.maven.api.Type=MissingOverride
+org.apache.maven.api.Version=MissingOverride
+org.apache.maven.api.VersionConstraint=MissingOverride
+org.apache.maven.api.VersionRange=MissingOverride
+org.apache.maven.api.cli.mvn.MavenOptions=MissingOverride
+org.apache.maven.api.cli.mvnenc.EncryptOptions=MissingOverride
+org.apache.maven.api.cli.mvnsh.ShellOptions=MissingOverride
+org.apache.maven.api.model.InputLocation=MissingOverride
+org.apache.maven.api.plugin.testing.Foo=UnnecessaryFullyQualifiedName
+org.apache.maven.api.plugin.testing.MojoExtension=CollapsibleIfStatements,UseVarargs
+org.apache.maven.api.plugin.testing.stubs.PluginStub=MissingOverride
+org.apache.maven.api.plugin.testing.stubs.RepositorySystemSupplier=LooseCoupling
+org.apache.maven.api.plugin.testing.stubs.SessionMock=TooManyStaticImports
+org.apache.maven.api.plugin.testing.stubs.SessionStub=LooseCoupling
+org.apache.maven.api.services.ArtifactCoordinatesFactoryRequest=UnnecessaryFullyQualifiedName
+org.apache.maven.api.services.ArtifactFactoryRequest=UnnecessaryFullyQualifiedName
+org.apache.maven.api.services.BaseRequest=MissingOverride
+org.apache.maven.api.services.DefaultArtifactFactoryRequestArtifact=MissingOverride
+org.apache.maven.api.services.DefaultDependencyCoordinatesFactoryRequest=MissingOverride
+org.apache.maven.api.services.DependencyCoordinatesFactoryRequest=UnnecessaryFullyQualifiedName
+org.apache.maven.api.services.MessageBuilder=UseVarargs
+org.apache.maven.api.services.ModelBuilderResult=MissingOverride
+org.apache.maven.api.services.xml.DefaultXmlReaderRequest=MissingOverride
+org.apache.maven.api.spi.PropertyContributor=LooseCoupling
+org.apache.maven.api.xml.Impl=UnusedAssignment,AvoidReassigningParameters

Review Comment:
   - https://github.com/apache/maven/pull/2350



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [SUREFIRE-2298] fix xml output with junit 5 nested classes [maven-surefire]

2025-05-18 Thread via GitHub


olamy commented on PR #828:
URL: https://github.com/apache/maven-surefire/pull/828#issuecomment-2889266625

   > Hi @olamy
   > 
   > > you might be able to see progress there #828
   > 
   > But... is there any?
   
   yup sorry been busy with other stuff.
   
   I'm thinking of possible quick fix which is something more dynamic here 
https://github.com/apache/maven-surefire/pull/815/files#diff-38e379eb63d7dcd2deb45902b4a494517e4ce54c29913bcf74e7d9243ebb7011R2077
   
   Switching this flag may fix the current issue
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8731] Use https for xsi:schemaLocation in generated descriptors [maven]

2025-05-18 Thread via GitHub


slawekjaranowski merged PR #2341:
URL: https://github.com/apache/maven/pull/2341


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] First iteration: Page about Maven DI [maven-site]

2025-05-18 Thread via GitHub


olamy commented on code in PR #648:
URL: https://github.com/apache/maven-site/pull/648#discussion_r2094459552


##
content/markdown/maven-di.md:
##
@@ -0,0 +1,322 @@
+
+
+# Maven DI
+
+## What is Maven DI?
+
+Maven DI is the dependency injection framework of Maven, that is introduced in 
Maven 4.
+
+It is the successor for Plexus DI (used in Maven 2) and JSR 330/Eclipse Sisu 
(used in Maven 3) in Maven. 
+It is based on [Google Guice][guice].
+
+
+## How to use Maven DI
+
+When you use Maven DI in Maven plugins or extensions, you want to have the 
dependency to `maven-api-di`, so you can use the `@Inject`, `@Named`, and 
`@Singleton` annotations in your plugins and extensions.

Review Comment:
   Maybe better to document the exact package for annotations such `@Inject` 
javax or jakarta? Are both possible? (not sure for which Guice it is possible)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] First iteration: Page about Maven DI [maven-site]

2025-05-18 Thread via GitHub


sparsick commented on code in PR #648:
URL: https://github.com/apache/maven-site/pull/648#discussion_r2094522215


##
content/markdown/maven-di.md:
##
@@ -0,0 +1,322 @@
+
+
+# Maven DI
+
+## What is Maven DI?
+
+Maven DI is the dependency injection framework of Maven, that is introduced in 
Maven 4.
+
+It is the successor for Plexus DI (used in Maven 2) and JSR 330/Eclipse Sisu 
(used in Maven 3) in Maven. 
+It is based on [Google Guice][guice].
+
+
+## How to use Maven DI
+
+When you use Maven DI in Maven plugins or extensions, you want to have the 
dependency to `maven-api-di`, so you can use the `@Inject`, `@Named`, and 
`@Singleton` annotations in your plugins and extensions.

Review Comment:
   Thanks for the feedback.
   
I add the whole package name and a sentence to make clear that they are new 
annotations.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] PathModularizationCache needs to set cache [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on code in PR #2219:
URL: https://github.com/apache/maven/pull/2219#discussion_r2094581944


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency

Review Comment:
   In the particular case of this issue, creating the cache at the location 
where the field is defined is the opposite of the intend, because it makes the 
`PathModularizationCache` lifetime strongly coupled with the 
`DefaultDependencyResolverResult` lifetime. Such coupling makes 
`PathModularizationCache` close to useless. It was done that way in the 
previous version of this class only as a workaround for the fact that I didn't 
knew where to store a session-wide cache, but that workaround was intended to 
be temporary.
   
   More details in a next comment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] PathModularizationCache needs to set cache [maven]

2025-05-18 Thread via GitHub


desruisseaux commented on PR #2219:
URL: https://github.com/apache/maven/pull/2219#issuecomment-2889112320

   I think that the `DefaultDependencyResolverResult` constructor is creating 
some confusion. I created a new pull request that I propose as an alternative 
to this one: #2347. For seeing the purpose, there is two design constraints to 
consider:
   
   * In order to be useful, `PathModularizationCache` needs to live longer than 
`DefaultDependencyResolverResult`. Any change that makes the lifetime of those 
two objects strongly coupled make the cache close to useless.
   * At the time I wrote these classes, I didn't know how session-wide caches 
should be managed in Maven (I still haven't investigated). Therefore, 
`PathModularizationCache` was instantiated together with 
`DefaultDependencyResolverResult` *as a temporary workaround, until we learn 
more about how session-wide caches are managed in Maven.*
   
   The pull #2347 tries to address the same issue as this pull request, but in 
a way that makes more apparent that `DefaultDependencyResolverResult` and 
`PathModularizationCache` lifetimes are distinct in principle, and that the 
current coupling may be temporary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] PathModularizationCache needs to set cache [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2219:
URL: https://github.com/apache/maven/pull/2219#discussion_r2094518427


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency
  * @param exceptions the exceptions that occurred while building the 
dependency graph
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
 public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);
+}
+
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+if (cache == null) {
+this.cache = new PathModularizationCache();

Review Comment:
   ```suggestion
   this.cache = cache;
   ```
   might consider init on declaration to give cohesion; default - making first 
things first.



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency
  * @param exceptions the exceptions that occurred while building the 
dependency graph
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
 public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);
+}
+
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-this.cache = cache;
+if (cache == null) {
+this.cache = new PathModularizationCache();
+} else {
+this.cache = cache;
+}

Review Comment:
   ```suggestion
   }
   ```
   one concern.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] PathModularizationCache needs to set cache [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2219:
URL: https://github.com/apache/maven/pull/2219#discussion_r2094586682


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -102,19 +102,27 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * to {@link #addDependency(Node, Dependency, Predicate, Path)}.
  *
  * @param request the corresponding request
- * @param cache cache of module information about each dependency

Review Comment:
   my suggest would not compile. im sorry.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [MNG-8696] Hide the cache from DefaultDependencyResolverResult constructor [maven]

2025-05-18 Thread via GitHub


Pankraz76 commented on code in PR #2347:
URL: https://github.com/apache/maven/pull/2347#discussion_r2094587418


##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.
+ *
+ * @see moduleCache()
+ */
+private PathModularizationCache moduleCache;
+
+/**
+ * Creates an initially empty resolver.
+ */
+public DefaultDependencyResolver() {}

Review Comment:
   who need this? will create very fragile object.



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -97,6 +99,24 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  */
 private final PathModularizationCache cache;
 
+/**
+ * Creates an initially empty result with a temporary cache.
+ * Callers should add path elements by calls to {@link 
#addDependency(Node, Dependency, Predicate, Path)}.
+ *
+ * WARNING: this constructor may be removed in a future Maven 
release.
+ * The reason is because {@code DefaultDependencyResolverResult} needs a 
cache, which should
+ * preferably by session-wide. But we have not yet clarified how such 
caches should be managed.
+ *
+ * @param request the corresponding request
+ * @param exceptions the exceptions that occurred while building the 
dependency graph
+ * @param root the root node of the dependency graph
+ * @param count estimated number of dependencies
+ */
+public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);

Review Comment:
   yes this gives dedication and option.



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java:
##
@@ -67,6 +67,21 @@
 @Named
 @Singleton
 public class DefaultDependencyResolver implements DependencyResolver {
+/**
+ * Cache of information about the modules contained in a path element.
+ * This cache is created when first needed. It may be never created.
+ *
+ * TODO: This field should not be in this class, because the 
cache should be global to the session.
+ * This field exists here only temporarily, until we clarified where to 
store session-wide caches.

Review Comment:
   ```suggestion
* This field exists here only temporarily, until clarified where to 
store session-wide caches.
   ```



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -97,6 +99,24 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  */
 private final PathModularizationCache cache;
 
+/**
+ * Creates an initially empty result with a temporary cache.
+ * Callers should add path elements by calls to {@link 
#addDependency(Node, Dependency, Predicate, Path)}.
+ *
+ * WARNING: this constructor may be removed in a future Maven 
release.
+ * The reason is because {@code DefaultDependencyResolverResult} needs a 
cache, which should
+ * preferably by session-wide. But we have not yet clarified how such 
caches should be managed.
+ *
+ * @param request the corresponding request
+ * @param exceptions the exceptions that occurred while building the 
dependency graph
+ * @param root the root node of the dependency graph
+ * @param count estimated number of dependencies
+ */
+public DefaultDependencyResolverResult(
+DependencyResolverRequest request, List exceptions, 
Node root, int count) {
+this(request, new PathModularizationCache(), exceptions, root, count);

Review Comment:
   ```suggestion
   this(request, moduleCache(), exceptions, root, count);
   ```



##
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java:
##
@@ -107,14 +127,14 @@ public class DefaultDependencyResolverResult implements 
DependencyResolverResult
  * @param root the root node of the dependency graph
  * @param count estimated number of dependencies
  */
-public DefaultDependencyResolverResult(
+DefaultDependencyResolverResult(
 DependencyResolverRequest request,
 PathModularizationCache cache,
 List exceptions,
 Node root,
 int count) {
 this.request = request;
-th