Re: [I] The CJK(Chinese/Japanese/Korean) characters in stderr are displayed as "?" after mvnd 1.0-m6-39 in Windows [maven-mvnd]

2024-02-19 Thread via GitHub


u2bo commented on issue #885:
URL: https://github.com/apache/maven-mvnd/issues/885#issuecomment-1953624591

   have the same problem


-- 
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] exec clean package install command display garbled codes [maven-mvnd]

2024-02-19 Thread via GitHub


u2bo commented on issue #911:
URL: https://github.com/apache/maven-mvnd/issues/911#issuecomment-1953621748

   but I used mvnd-0.7.1 version is normal


-- 
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



[I] exec clean package install command display garbled codes [maven-mvnd]

2024-02-19 Thread via GitHub


u2bo opened a new issue, #911:
URL: https://github.com/apache/maven-mvnd/issues/911

   When I execute the following build command, the console displays garbled 
codes. How can I solve this problem?
   
   Apache Maven Daemon (mvnd) 1.0-m8 windows-amd64 native client 
(0f4bdb6df5e74453d8d558d292789da4e66a7933)
   Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal
   Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
   Maven home: D:\software\maven-mvnd-1.0-m8-m39-windows-amd64\mvn
   Java version: 1.8.0_371, vendor: Oracle Corporation, runtime: C:\Program 
Files\Java\jdk-1.8\jre
   Default locale: zh_CN, platform encoding: GBK
   OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
   
   
"mvnd clean package install '-Dquickly -Dmaven.test.skip=true'" 
   
   
![image](https://github.com/apache/maven-mvnd/assets/5698030/7e79c53a-e6d2-4ac1-8bf7-a7a647c8d6bf)
   


-- 
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



[jira] [Assigned] (MSHADE-462) 3.5.1 not compatible with 3.4.1: The version cannot be empty

2024-02-19 Thread Herve Boutemy (Jira)


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

Herve Boutemy reassigned MSHADE-462:


Assignee: Zhongming Hua  (was: Herve Boutemy)

> 3.5.1 not compatible with 3.4.1: The version cannot be empty
> 
>
> Key: MSHADE-462
> URL: https://issues.apache.org/jira/browse/MSHADE-462
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 3.5.1
> Environment:  Apache Maven 3.8.8 
> (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
> Maven home: /usr/share/apache-maven-3.8.8
> Java version: 17.0.9, vendor: Eclipse Adoptium, runtime: 
> /usr/lib/jvm/temurin-17-jdk-amd64
> Default locale: en, platform encoding: UTF-8
> OS name: "linux", version: "6.2.0-1018-azure", arch: "amd64", family: "unix"
>Reporter: Gary D. Gregory
>Assignee: Zhongming Hua
>Priority: Major
> Fix For: 3.5.2
>
>
> When updating Apache Juneau git master from 3.4.1 to 3.5.1, we get:
> {noformat}
> Error:  Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.1:shade (source-jar) on 
> project juneau-all: Execution source-jar of goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.1:shade failed: For artifact 
> {org.apache.juneau:juneau-marshall:null:jar}: The version cannot be empty. -> 
> [Help 1]
> {noformat}
> See the build failure in the PR https://github.com/apache/juneau/pull/125
>  



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


[jira] [Updated] (MSHADE-469) Cannot generate a jar since switching from 3.4.1 to 3.5.x

2024-02-19 Thread Herve Boutemy (Jira)


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

Herve Boutemy updated MSHADE-469:
-
Fix Version/s: 3.5.2

> Cannot generate a jar since switching from 3.4.1 to 3.5.x
> -
>
> Key: MSHADE-469
> URL: https://issues.apache.org/jira/browse/MSHADE-469
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 3.5.0, 3.5.1
>Reporter: Emmanuel Lécharny
>Assignee: Zhongming Hua
>Priority: Major
> Fix For: 3.5.2
>
>
> Hi!
> I have a working build for the Apache Diretcory LDAP API project that worked 
> pretty well until I tried to switch to maven shade plugin version 3.5.0/3.5.1.
> The error I get is
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
> api-all: Execution default of goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
> {org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be 
> empty. -> [Help 1]
> {noformat}
> The project's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
> The parent's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
> The parent's parent's pom, where the shade plugin version is declared: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]



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


Re: [PR] Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0 [maven-surefire]

2024-02-19 Thread via GitHub


CrazyHZM merged PR #722:
URL: https://github.com/apache/maven-surefire/pull/722


-- 
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] [Resolved] (MSHADE-469) Cannot generate a jar since switching from 3.4.1 to 3.5.x

2024-02-19 Thread Zhongming Hua (Jira)


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

Zhongming Hua resolved MSHADE-469.
--
  Assignee: Zhongming Hua
Resolution: Duplicate

> Cannot generate a jar since switching from 3.4.1 to 3.5.x
> -
>
> Key: MSHADE-469
> URL: https://issues.apache.org/jira/browse/MSHADE-469
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 3.5.0, 3.5.1
>Reporter: Emmanuel Lécharny
>Assignee: Zhongming Hua
>Priority: Major
>
> Hi!
> I have a working build for the Apache Diretcory LDAP API project that worked 
> pretty well until I tried to switch to maven shade plugin version 3.5.0/3.5.1.
> The error I get is
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
> api-all: Execution default of goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
> {org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be 
> empty. -> [Help 1]
> {noformat}
> The project's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
> The parent's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
> The parent's parent's pom, where the shade plugin version is declared: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]



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


[jira] [Commented] (MSHADE-469) Cannot generate a jar since switching from 3.4.1 to 3.5.x

2024-02-19 Thread Zhongming Hua (Jira)


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

Zhongming Hua commented on MSHADE-469:
--

[~elecharny] 

This bug has been fixed in 3.5.2, please wait until 3.5.2 is released to use it.

> Cannot generate a jar since switching from 3.4.1 to 3.5.x
> -
>
> Key: MSHADE-469
> URL: https://issues.apache.org/jira/browse/MSHADE-469
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 3.5.0, 3.5.1
>Reporter: Emmanuel Lécharny
>Priority: Major
>
> Hi!
> I have a working build for the Apache Diretcory LDAP API project that worked 
> pretty well until I tried to switch to maven shade plugin version 3.5.0/3.5.1.
> The error I get is
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
> api-all: Execution default of goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
> {org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be 
> empty. -> [Help 1]
> {noformat}
> The project's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
> The parent's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
> The parent's parent's pom, where the shade plugin version is declared: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]



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


Re: [PR] Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0 [maven-assembly-plugin]

2024-02-19 Thread via GitHub


slawekjaranowski commented on PR #187:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/187#issuecomment-1953138975

   There is a bug in invoker ... when we try to override dependencies version 
   Building classloader in invoker for pre and post script should be verified


-- 
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] (MRESOLVER-456) Fix javadoc warnings

2024-02-19 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak updated MRESOLVER-456:
--
Labels: good-first-issue  (was: )

> Fix javadoc warnings
> 
>
> Key: MRESOLVER-456
> URL: https://issues.apache.org/jira/browse/MRESOLVER-456
> Project: Maven Resolver
>  Issue Type: Task
>  Components: Resolver
>Reporter: Tamas Cservenak
>Priority: Major
>  Labels: good-first-issue
> Fix For: 2.0.0
>
>
> We have some warnings, those need to be fixed.
> Given build-time Java is 21, maybe we just want to migrate all to new Javadoc 
> style? (as many of warnings are missing returns, that basically redundantly 
> doubles the doco)



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


[jira] [Updated] (MRESOLVER-404) New strategy may be needed for Hazelcast named locks

2024-02-19 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak updated MRESOLVER-404:
--
Labels: good-first-issue  (was: )

> New strategy may be needed for Hazelcast named locks
> 
>
> Key: MRESOLVER-404
> URL: https://issues.apache.org/jira/browse/MRESOLVER-404
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Tamas Cservenak
>Priority: Major
>  Labels: good-first-issue
> Fix For: 2.0.0
>
>
> Originally (for today, see below) Hazelcast NamedLock implementation worked 
> like this:
> * on lock acquire, an ISemaphore DO with lock name is created (or just get, 
> if exists), is refCounted
> * on lock release, if refCount shows 0 = uses, ISemaphore was destroyed 
> (releasing HZ cluster resources)
> * if after some time, a new lock acquire happened for same name, ISemaphore 
> DO would get re-created.
> Today, HZ NamedLocks implementation works in following way:
> * there is only one Semaphore provider implementation, the 
> {{DirectHazelcastSemaphoreProvider}} that maps lock name 1:1 onto ISemaphore 
> Distributed Object (DO) name and does not destroys the DO
> Reason for this is historical: originally, named locks precursor code was 
> done for Hazelcast 2/3, that used "unreliable" distributed operations, and 
> recreating previously destroyed DO was possible (at the cost of 
> "unreliability").
> Since Hazelcast 4.x it updated to RAFT consensus algorithm and made things 
> reliable, it was at the cost that DOs once created, then destroyed, could not 
> be recreated anymore. This change was applied to 
> {{DirectHazelcastSemaphoreProvider}} as well, by simply not dropping unused 
> ISemaphores (release semaphore is no-op method).
> But, this has an important consequence: a long running Hazelcast cluster will 
> have more and more ISemaphore DOs (basically as many as many Artifacts all 
> the builds met, that use this cluster to coordinate). Artifacts count 
> existing out there is not infinite, but is large enough -- especially if 
> cluster shared across many different/unrelated builds -- to grow over sane 
> limit.
> So, current recommendation is to have "large enough" dedicated Hazelcast 
> cluster and  use {{semaphore-hazelcast-client}} (that is a "thin client" that 
> connects to cluster), instead of {{semaphore-hazelcast}} (that is "thick 
> client", so puts burden onto JVM process running it as node, hence Maven as 
> well). But even then, regular reboot of cluster may be needed.
> A proper but somewhat complicated solution would be to introduce some sort of 
> indirection: create as many ISemaphore as needed at the moment, and map those 
> onto locks names in use at the moment (and reuse unused semaphores). Problem 
> is, that mapping would need to be distributed as well (so all clients pick 
> them up, or perform new mapping), and this may cause performance penalty. But 
> this could be proved by exhaustive perf testing only.
> The benefit would be obvious: today cluster holds as many ISemaphores as many 
> Artifacts were met by all the builds, that use given cluster since cluster 
> boot. With indirection, the number of DOs would lowered to "maximum 
> concurrently used", so if you have a large build farm, that is able to juggle 
> with 1000 artifacts at given one moment, your cluster would have 1000 
> ISemaphores.
> Still, with proper "segmenting" of the clusters, for example to have them 
> split for "related" job groups, hence, the Artifacts coming thru them would 
> remain somewhat within limited boundaries, or some automation for "cluster 
> regular reboot", or simply just create "huge enough" clusters, may make users 
> benefit of never hitting these issues (cluster OOM). 
> And current code is most probably the fastest solution, hence, I just created 
> this issue to have it documented, but i plan no meritorious work on this 
> topic.



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


[jira] [Commented] (MENFORCER-499) New Rule: Prohibit specific files to be checked in

2024-02-19 Thread Maarten Mulders (Jira)


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

Maarten Mulders commented on MENFORCER-499:
---

I think there is one more alternative: use .gitignore / .hgignore / .bzrignore 
etc. I might be missing something, but what would this rule in Maven Enforcer 
add on top of that, other than failing a build if the rule is violated?

> New Rule: Prohibit specific files to be checked in
> --
>
> Key: MENFORCER-499
> URL: https://issues.apache.org/jira/browse/MENFORCER-499
> Project: Maven Enforcer Plugin
>  Issue Type: New Feature
>  Components: Standard Rules
>Reporter: Benjamin Marwell
>Priority: Major
>
> This is a suggestion for yet another new standard rule.
> "require Files not checked in"
> While there are already rules "require files don't exist" and "require file 
> size", this one would check wether files are actually checked in or added 
> into the current VCS.
> E.g. for each file in the pattern:
> * check if they are added (git, bzr) or checked in (cvs, svn, bzr, git)
> * If so, fail the build.
> configurable options:
> * files (like the other two checks, ant pattern)
> * failOnAdd (git, bzr): true by default, can be set to false. Then the check 
> will only fail if files are currently in a commit.
> * useDefaultExclusions: Read exclusion rules from VCS (git: .gitignore, svn: 
> svn:ignore, etc.). However, files could have been forcibly added in git. So 
> maybe this doesn't make much sense
> * skip
> * ..?
> The idea is to prevent developers from accidentally check in big files (like 
> jar files, zip files) or other binary artifacts. While this could be spotted 
> in a PR, the repo might already be spoiled and enlarged by this size, which 
> is usually not feasible.
> Alternatives:
> * use "files don't exist" and exclude target (may not work for everyone)
> * use a shell script
> * don't implement this rule and leave the task to others.



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


[jira] [Commented] (MRESOLVER-421) Extend NamedLock API to carry more than one name

2024-02-19 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MRESOLVER-421:
--

cstamas commented on code in PR #431:
URL: https://github.com/apache/maven-resolver/pull/431#discussion_r1494941468


##
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/NamedLockFactoryAdapter.java:
##
@@ -201,82 +201,65 @@ public void acquire(Collection 
artifacts, Collection illegalStateExceptions = 
new ArrayList<>();
 for (int attempt = 1; attempt <= attempts; attempt++) {
 LOGGER.trace(
 "Attempt {}: Need {} {} lock(s) for {}", attempt, 
keys.size(), shared ? "read" : "write", keys);
-int acquiredLockCount = 0;
 try {
 if (attempt > 1) {
 Thread.sleep(retryWait);
 }
-for (String key : keys) {
-NamedLock namedLock = namedLockFactory.getLock(key);
-LOGGER.trace("Acquiring {} lock for '{}'", shared ? 
"read" : "write", key);
-
-boolean locked;
-if (shared) {
-locked = namedLock.lockShared(time, timeUnit);
-} else {
-locked = namedLock.lockExclusively(time, timeUnit);
-}
-
-if (!locked) {
-String timeStr = time + " " + timeUnit;
-LOGGER.trace(
-"Failed to acquire {} lock for '{}' in {}",
-shared ? "read" : "write",
-key,
-timeStr);
-
-namedLock.close();
-closeAll();
-illegalStateExceptions.add(new 
IllegalStateException(
-"Attempt " + attempt + ": Could not 
acquire " + (shared ? "read" : "write")
-+ " lock for '" + namedLock.name() 
+ "' in " + timeStr));
-break;
-} else {
-locks.push(namedLock);
-acquiredLockCount++;
-}
+boolean locked;
+if (shared) {
+locked = namedLock.lockShared(time, timeUnit);
+} else {
+locked = namedLock.lockExclusively(time, timeUnit);
+}
+
+if (!locked) {
+String timeStr = time + " " + timeUnit;
+LOGGER.trace(
+"Failed to acquire {} lock for '{}' in {}",
+shared ? "read" : "write",
+namedLock.name(),
+time + " " + timeUnit);
+
+illegalStateExceptions.add(new IllegalStateException(
+"Attempt " + attempt + ": Could not acquire " 
+ (shared ? "read" : "write")
++ " lock for '" + namedLock.name() + 
"' in " + timeStr));

Review Comment:
   Yes, for the message you are right, but for actual _acquire_ all is same 
remains. Will fix the message.





> Extend NamedLock API to carry more than one name
> 
>
> Key: MRESOLVER-421
> URL: https://issues.apache.org/jira/browse/MRESOLVER-421
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 2.0.0
>
>
> Currently NamedLock maps as 1:1 to one "name" (that is artifact or metadata).
> We should change this, and allow 1..N mapping.



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


Re: [PR] [MRESOLVER-421] Extend NamedLock API to make possible 1..n lock to name [maven-resolver]

2024-02-19 Thread via GitHub


cstamas commented on code in PR #431:
URL: https://github.com/apache/maven-resolver/pull/431#discussion_r1494941468


##
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/NamedLockFactoryAdapter.java:
##
@@ -201,82 +201,65 @@ public void acquire(Collection 
artifacts, Collection illegalStateExceptions = 
new ArrayList<>();
 for (int attempt = 1; attempt <= attempts; attempt++) {
 LOGGER.trace(
 "Attempt {}: Need {} {} lock(s) for {}", attempt, 
keys.size(), shared ? "read" : "write", keys);
-int acquiredLockCount = 0;
 try {
 if (attempt > 1) {
 Thread.sleep(retryWait);
 }
-for (String key : keys) {
-NamedLock namedLock = namedLockFactory.getLock(key);
-LOGGER.trace("Acquiring {} lock for '{}'", shared ? 
"read" : "write", key);
-
-boolean locked;
-if (shared) {
-locked = namedLock.lockShared(time, timeUnit);
-} else {
-locked = namedLock.lockExclusively(time, timeUnit);
-}
-
-if (!locked) {
-String timeStr = time + " " + timeUnit;
-LOGGER.trace(
-"Failed to acquire {} lock for '{}' in {}",
-shared ? "read" : "write",
-key,
-timeStr);
-
-namedLock.close();
-closeAll();
-illegalStateExceptions.add(new 
IllegalStateException(
-"Attempt " + attempt + ": Could not 
acquire " + (shared ? "read" : "write")
-+ " lock for '" + namedLock.name() 
+ "' in " + timeStr));
-break;
-} else {
-locks.push(namedLock);
-acquiredLockCount++;
-}
+boolean locked;
+if (shared) {
+locked = namedLock.lockShared(time, timeUnit);
+} else {
+locked = namedLock.lockExclusively(time, timeUnit);
+}
+
+if (!locked) {
+String timeStr = time + " " + timeUnit;
+LOGGER.trace(
+"Failed to acquire {} lock for '{}' in {}",
+shared ? "read" : "write",
+namedLock.name(),
+time + " " + timeUnit);
+
+illegalStateExceptions.add(new IllegalStateException(
+"Attempt " + attempt + ": Could not acquire " 
+ (shared ? "read" : "write")
++ " lock for '" + namedLock.name() + 
"' in " + timeStr));

Review Comment:
   Yes, for the message you are right, but for actual _acquire_ all is same 
remains. Will fix the message.



-- 
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.commons:commons-compress from 1.25.0 to 1.26.0 [maven-surefire]

2024-02-19 Thread via GitHub


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

   Bumps org.apache.commons:commons-compress from 1.25.0 to 1.26.0.
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.commons:commons-compress&package-manager=maven&previous-version=1.25.0&new-version=1.26.0)](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



[jira] [Created] (MENFORCER-499) New Rule: Prohibit specific files to be checked in

2024-02-19 Thread Benjamin Marwell (Jira)
Benjamin Marwell created MENFORCER-499:
--

 Summary: New Rule: Prohibit specific files to be checked in
 Key: MENFORCER-499
 URL: https://issues.apache.org/jira/browse/MENFORCER-499
 Project: Maven Enforcer Plugin
  Issue Type: New Feature
  Components: Standard Rules
Reporter: Benjamin Marwell


This is a suggestion for yet another new standard rule.

"require Files not checked in"

While there are already rules "require files don't exist" and "require file 
size", this one would check wether files are actually checked in or added into 
the current VCS.

E.g. for each file in the pattern:

* check if they are added (git, bzr) or checked in (cvs, svn, bzr, git)
* If so, fail the build.

configurable options:

* files (like the other two checks, ant pattern)
* failOnAdd (git, bzr): true by default, can be set to false. Then the check 
will only fail if files are currently in a commit.
* useDefaultExclusions: Read exclusion rules from VCS (git: .gitignore, svn: 
svn:ignore, etc.). However, files could have been forcibly added in git. So 
maybe this doesn't make much sense
* skip
* ..?

The idea is to prevent developers from accidentally check in big files (like 
jar files, zip files) or other binary artifacts. While this could be spotted in 
a PR, the repo might already be spoiled and enlarged by this size, which is 
usually not feasible.


Alternatives:

* use "files don't exist" and exclude target (may not work for everyone)
* use a shell script
* don't implement this rule and leave the task to others.



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


[jira] [Updated] (MSHADE-469) Cannot generate a jar since switching from 3.4.1 to 3.5.x

2024-02-19 Thread Jira


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

Emmanuel Lécharny updated MSHADE-469:
-
Description: 
Hi!

I have a working build for the Apache Diretcory LDAP API project that worked 
pretty well until I tried to switch to maven shade plugin version 3.5.0/3.5.1.

The error I get is

{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
api-all: Execution default of goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
{org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be empty. 
-> [Help 1]
{noformat}

The project's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
The parent's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
The parent's parent's pom, where the shade plugin version is declared: 
[https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]

  was:
Hi!

I have a working build for the Apache Diretcory LDAP API project that worked 
pretty well until I tried to switched to maven shade plugin version 3.5.0/3.5.1.

The error I get is

{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
api-all: Execution default of goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
{org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be empty. 
-> [Help 1]
{noformat}

The project's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
The parent's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
The parent's parent's pom, where the shade plugin version is declared: 
[https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]


> Cannot generate a jar since switching from 3.4.1 to 3.5.x
> -
>
> Key: MSHADE-469
> URL: https://issues.apache.org/jira/browse/MSHADE-469
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 3.5.0, 3.5.1
>Reporter: Emmanuel Lécharny
>Priority: Major
>
> Hi!
> I have a working build for the Apache Diretcory LDAP API project that worked 
> pretty well until I tried to switch to maven shade plugin version 3.5.0/3.5.1.
> The error I get is
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
> api-all: Execution default of goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
> {org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be 
> empty. -> [Help 1]
> {noformat}
> The project's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
> The parent's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
> The parent's parent's pom, where the shade plugin version is declared: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]



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


[jira] [Updated] (MSHADE-469) Cannot generate a jar since switching from 3.4.1 to 3.5.x

2024-02-19 Thread Michael Osipov (Jira)


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

Michael Osipov updated MSHADE-469:
--
Description: 
Hi!

I have a working build for the Apache Diretcory LDAP API project that worked 
pretty well until I tried to switched to maven shade plugin version 3.5.0/3.5.1.

The error I get is

{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
api-all: Execution default of goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
{org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be empty. 
-> [Help 1]
{noformat}

The project's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
The parent's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
The parent's parent's pom, where the shade plugin version is declared: 
[https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]

  was:
Hi!

I have a working build for the Apache Diretcory LDAP API project that worked 
pretty well until I tried to switched to maven shade plugin version 3.5.0/3.5.1.

The error I get is :

{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
api-all: Execution default of goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
{org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be empty. 
-> [Help 1]
{noformat}

The project's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
The parent's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
The paren'ts parent's pom, where teh shade plugin version is declared: 
[https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]



> Cannot generate a jar since switching from 3.4.1 to 3.5.x
> -
>
> Key: MSHADE-469
> URL: https://issues.apache.org/jira/browse/MSHADE-469
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 3.5.0, 3.5.1
>Reporter: Emmanuel Lécharny
>Priority: Major
>
> Hi!
> I have a working build for the Apache Diretcory LDAP API project that worked 
> pretty well until I tried to switched to maven shade plugin version 
> 3.5.0/3.5.1.
> The error I get is
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
> api-all: Execution default of goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
> {org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be 
> empty. -> [Help 1]
> {noformat}
> The project's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
> The parent's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
> The parent's parent's pom, where the shade plugin version is declared: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]



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


[jira] [Updated] (MSHADE-469) Cannot generate a jar since switching from 3.4.1 to 3.5.x

2024-02-19 Thread Michael Osipov (Jira)


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

Michael Osipov updated MSHADE-469:
--
Description: 
Hi!

I have a working build for the Apache Diretcory LDAP API project that worked 
pretty well until I tried to switched to maven shade plugin version 3.5.0/3.5.1.

The error I get is :

{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
api-all: Execution default of goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
{org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be empty. 
-> [Help 1]
{noformat}

The project's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
The parent's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
The paren'ts parent's pom, where teh shade plugin version is declared: 
[https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]


  was:
Hi!

I have a working build for teh Apache Diretcory LDAP API project that worked 
pretty well until I tried to switched to maven shade plugin version 3.5.0/3.5.1.

The error I get is :

{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
api-all: Execution default of goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
{org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be empty. 
-> [Help 1]
{noformat}

The project's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
The parent's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
The paren'ts parent's pom, where teh shade plugin version is declared: 
[https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]



> Cannot generate a jar since switching from 3.4.1 to 3.5.x
> -
>
> Key: MSHADE-469
> URL: https://issues.apache.org/jira/browse/MSHADE-469
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 3.5.0, 3.5.1
>Reporter: Emmanuel Lécharny
>Priority: Major
>
> Hi!
> I have a working build for the Apache Diretcory LDAP API project that worked 
> pretty well until I tried to switched to maven shade plugin version 
> 3.5.0/3.5.1.
> The error I get is :
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
> api-all: Execution default of goal 
> org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
> {org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be 
> empty. -> [Help 1]
> {noformat}
> The project's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
> The parent's pom: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
> The paren'ts parent's pom, where teh shade plugin version is declared: 
> [https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]



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


[jira] [Created] (MSHADE-469) Cannot generate a jar since switching from 3.4.1 to 3.5.x

2024-02-19 Thread Jira
Emmanuel Lécharny created MSHADE-469:


 Summary: Cannot generate a jar since switching from 3.4.1 to 3.5.x
 Key: MSHADE-469
 URL: https://issues.apache.org/jira/browse/MSHADE-469
 Project: Maven Shade Plugin
  Issue Type: Bug
Affects Versions: 3.5.1, 3.5.0
Reporter: Emmanuel Lécharny


Hi!

I have a working build for teh Apache Diretcory LDAP API project that worked 
pretty well until I tried to switched to maven shade plugin version 3.5.0/3.5.1.

The error I get is :

{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade (default) on project 
api-all: Execution default of goal 
org.apache.maven.plugins:maven-shade-plugin:3.5.0:shade failed: For artifact 
{org.apache.directory.api:api-asn1-api:null:jar}: The version cannot be empty. 
-> [Help 1]
{noformat}

The project's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-all/2.1.6/api-all-2.1.6.pom]
The parent's pom: 
[https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom|https://repo.maven.apache.org/maven2/org/apache/directory/api/api-parent/2.1.6/api-parent-2.1.6.pom]
The paren'ts parent's pom, where teh shade plugin version is declared: 
[https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom|https://repo.maven.apache.org/maven2/org/apache/directory/project/project/48/project-48.pom]




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


[jira] [Commented] (MRESOLVER-301) Resolver should handle signatures in same way as checksums

2024-02-19 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MRESOLVER-301:
--

cstamas opened a new pull request, #432:
URL: https://github.com/apache/maven-resolver/pull/432

   Artifact generators.
   
   ---
   
   https://issues.apache.org/jira/browse/MRESOLVER-301




> Resolver should handle signatures in same way as checksums
> --
>
> Key: MRESOLVER-301
> URL: https://issues.apache.org/jira/browse/MRESOLVER-301
> Project: Maven Resolver
>  Issue Type: New Feature
>  Components: Resolver
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 2.0.0
>
>
> Resolver should handle signatures in same way as checksums: with pluggable 
> providers, with some sane out of the box offer.



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


[jira] [Commented] (MRESOLVER-421) Extend NamedLock API to carry more than one name

2024-02-19 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MRESOLVER-421:
--

michael-o commented on code in PR #431:
URL: https://github.com/apache/maven-resolver/pull/431#discussion_r1494532332


##
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/NamedLockFactoryAdapter.java:
##
@@ -201,82 +201,65 @@ public void acquire(Collection 
artifacts, Collection illegalStateExceptions = 
new ArrayList<>();
 for (int attempt = 1; attempt <= attempts; attempt++) {
 LOGGER.trace(
 "Attempt {}: Need {} {} lock(s) for {}", attempt, 
keys.size(), shared ? "read" : "write", keys);
-int acquiredLockCount = 0;
 try {
 if (attempt > 1) {
 Thread.sleep(retryWait);
 }
-for (String key : keys) {
-NamedLock namedLock = namedLockFactory.getLock(key);
-LOGGER.trace("Acquiring {} lock for '{}'", shared ? 
"read" : "write", key);
-
-boolean locked;
-if (shared) {
-locked = namedLock.lockShared(time, timeUnit);
-} else {
-locked = namedLock.lockExclusively(time, timeUnit);
-}
-
-if (!locked) {
-String timeStr = time + " " + timeUnit;
-LOGGER.trace(
-"Failed to acquire {} lock for '{}' in {}",
-shared ? "read" : "write",
-key,
-timeStr);
-
-namedLock.close();
-closeAll();
-illegalStateExceptions.add(new 
IllegalStateException(
-"Attempt " + attempt + ": Could not 
acquire " + (shared ? "read" : "write")
-+ " lock for '" + namedLock.name() 
+ "' in " + timeStr));
-break;
-} else {
-locks.push(namedLock);
-acquiredLockCount++;
-}
+boolean locked;
+if (shared) {
+locked = namedLock.lockShared(time, timeUnit);
+} else {
+locked = namedLock.lockExclusively(time, timeUnit);
+}
+
+if (!locked) {
+String timeStr = time + " " + timeUnit;
+LOGGER.trace(
+"Failed to acquire {} lock for '{}' in {}",
+shared ? "read" : "write",
+namedLock.name(),
+time + " " + timeUnit);
+
+illegalStateExceptions.add(new IllegalStateException(
+"Attempt " + attempt + ": Could not acquire " 
+ (shared ? "read" : "write")
++ " lock for '" + namedLock.name() + 
"' in " + timeStr));

Review Comment:
   This changes the semantics completely: before it was time per single lock, 
now this time applies to the combination. That looks wrong.



##
maven-resolver-demos/maven-resolver-demo-snippets/src/test/resources/simplelogger.properties:
##
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+org.slf4j.simpleLogger.defaultLogLevel=info
+

Review Comment:
   Is that different from default?



##
maven-resolver-named-locks-ipc/pom.xml:
##
@@ -0,0 +1,113 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  4.0.0
+
+  
+

Re: [PR] [MRESOLVER-421] Extend NamedLock API to make possible 1..n lock to name [maven-resolver]

2024-02-19 Thread via GitHub


michael-o commented on code in PR #431:
URL: https://github.com/apache/maven-resolver/pull/431#discussion_r1494532332


##
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/NamedLockFactoryAdapter.java:
##
@@ -201,82 +201,65 @@ public void acquire(Collection 
artifacts, Collection illegalStateExceptions = 
new ArrayList<>();
 for (int attempt = 1; attempt <= attempts; attempt++) {
 LOGGER.trace(
 "Attempt {}: Need {} {} lock(s) for {}", attempt, 
keys.size(), shared ? "read" : "write", keys);
-int acquiredLockCount = 0;
 try {
 if (attempt > 1) {
 Thread.sleep(retryWait);
 }
-for (String key : keys) {
-NamedLock namedLock = namedLockFactory.getLock(key);
-LOGGER.trace("Acquiring {} lock for '{}'", shared ? 
"read" : "write", key);
-
-boolean locked;
-if (shared) {
-locked = namedLock.lockShared(time, timeUnit);
-} else {
-locked = namedLock.lockExclusively(time, timeUnit);
-}
-
-if (!locked) {
-String timeStr = time + " " + timeUnit;
-LOGGER.trace(
-"Failed to acquire {} lock for '{}' in {}",
-shared ? "read" : "write",
-key,
-timeStr);
-
-namedLock.close();
-closeAll();
-illegalStateExceptions.add(new 
IllegalStateException(
-"Attempt " + attempt + ": Could not 
acquire " + (shared ? "read" : "write")
-+ " lock for '" + namedLock.name() 
+ "' in " + timeStr));
-break;
-} else {
-locks.push(namedLock);
-acquiredLockCount++;
-}
+boolean locked;
+if (shared) {
+locked = namedLock.lockShared(time, timeUnit);
+} else {
+locked = namedLock.lockExclusively(time, timeUnit);
+}
+
+if (!locked) {
+String timeStr = time + " " + timeUnit;
+LOGGER.trace(
+"Failed to acquire {} lock for '{}' in {}",
+shared ? "read" : "write",
+namedLock.name(),
+time + " " + timeUnit);
+
+illegalStateExceptions.add(new IllegalStateException(
+"Attempt " + attempt + ": Could not acquire " 
+ (shared ? "read" : "write")
++ " lock for '" + namedLock.name() + 
"' in " + timeStr));

Review Comment:
   This changes the semantics completely: before it was time per single lock, 
now this time applies to the combination. That looks wrong.



##
maven-resolver-demos/maven-resolver-demo-snippets/src/test/resources/simplelogger.properties:
##
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+org.slf4j.simpleLogger.defaultLogLevel=info
+

Review Comment:
   Is that different from default?



##
maven-resolver-named-locks-ipc/pom.xml:
##
@@ -0,0 +1,113 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  4.0.0
+
+  
+org.apache.maven.resolver
+maven-resolver
+2.0.0-SNAPSHOT
+  
+
+  maven-resolver-named-locks-ipc
+
+  Maven Artifact Resolver Named Locks using IPC
+  A synchronization utility implementation using 
IPC.

Review Comment:
   This should really be a sep

[PR] Bump org.apache.jackrabbit:jackrabbit-webdav from 2.14.4 to 2.21.23 [maven-wagon]

2024-02-19 Thread via GitHub


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

   Bumps 
[org.apache.jackrabbit:jackrabbit-webdav](https://github.com/apache/jackrabbit) 
from 2.14.4 to 2.21.23.
   
   Changelog
   Sourced from https://github.com/apache/jackrabbit/blob/trunk/RELEASE-NOTES.txt";>org.apache.jackrabbit:jackrabbit-webdav's
 changelog.
   
   Changes in Jackrabbit 2.21.23
   Improvement
   [JCR-5011] - Restore SCM information in parent POM
   
   Task
   [JCR-4914] - Update oak-jackrabbit-api.version.implemented in 
trunk to Oak 1.60.0
   [JCR-5012] - set baseline comparisonVersion to latest stable (2.20.14)
   [JCR-5013] - Update commons-io dependency to 2.15.1
   [JCR-5014] - Update tomcat dependency to 9.0.85
   [JCR-5015] - update aws java sdk version to 1.12.635
   [JCR-5016] - standalone-components: remove unused jcr-rmi dependency
   [JCR-5017] - Update spotbugs-maven-plugin to 4.8.2.0
   [JCR-5018] - Bump up minimal Java version to 11
   [JCR-5019] - Update build-helper-maven-plugin to version 3.5.0
   [JCR-5020] - jackrabbit-webapp: deprecate RMI support "for removal"
   [JCR-5021] - jackrabbit-jcr-rmi: deprecate RMI support "for 
removal"
   [JCR-5022] - Update derby dependency to 10.15.2.0
   
   For more detailed information about all the changes in this and other
   Jackrabbit releases, please see the Jackrabbit issue tracker at
   https://issues.apache.org/jira/browse/JCR
   
   Release Contents
   This release consists of a single source archive packaged as a zip file.
   The archive can be unpacked with the jar tool from your JDK installation.
   See the README.txt file for instructions on how to build this release.
   The source archive is accompanied by an SHA512 checksum and a
   PGP signature that you can use to verify the authenticity of your
   download. The public key used for the PGP signature can be found at
   https://www.apache.org/dist/jackrabbit/KEYS";>https://www.apache.org/dist/jackrabbit/KEYS.
   About Apache Jackrabbit
   Apache Jackrabbit is a fully conforming implementation of the Content
   Repository for Java Technology API (JCR). A content repository is a
   hierarchical content store with support for structured and unstructured
   content, full text search, versioning, transactions, observation, and
   more.
   For more information, visit http://jackrabbit.apache.org/";>http://jackrabbit.apache.org/
   
   
   ... (truncated)
   
   
   Commits
   
   https://github.com/apache/jackrabbit/commit/71121aca964a00602bd51e3570f7102bfc5c540d";>71121ac
 [maven-release-plugin] prepare release jackrabbit-2.21.23
   https://github.com/apache/jackrabbit/commit/8744ebb486dda5c34f3595fee5256052c483cec3";>8744ebb
 JCR-5023: Release Jackrabbit 2.21.23 - Candidate Release Notes
   https://github.com/apache/jackrabbit/commit/d32af8943bc2afe91a8730f028fb9b13525bfcbc";>d32af89
 JCR-5022: Update derby dependency to 10.15.2.0 (https://redirect.github.com/apache/jackrabbit/issues/157";>#157)
   https://github.com/apache/jackrabbit/commit/e3a82cf95ebe295fcbd3c5327c52869256d2f764";>e3a82cf
 JCR-4914: Update oak-jackrabbit-api.version.implemented in trunk to Oak 
1.60.0
   https://github.com/apache/jackrabbit/commit/35549bc95195584f66bce7a3d0c985a9db1b6374";>35549bc
 JCR-5021: jackrabbit-jcr-rmi: deprecate RMI support "for 
removal"
   https://github.com/apache/jackrabbit/commit/20405ac058a96442e5c40877e796b08237e496d8";>20405ac
 JCR-5021: jackrabbit-jcr-rmi: deprecate RMI support "for 
removal"
   https://github.com/apache/jackrabbit/commit/5262ba978f122822c1a8ad3c417b7288c9c123b1";>5262ba9
 JCR-5020: jackrabbit-webapp: deprecate RMI support "for removal"
   https://github.com/apache/jackrabbit/commit/a7c3dd471c12668723eb41c43829e4ae189532cf";>a7c3dd4
 JCR-5018: bump up minimal Java version to 11
   https://github.com/apache/jackrabbit/commit/a80549f753cd99e940b340ce496d2157b89034bc";>a80549f
 JCR-5020: jackrabbit-webapp: deprecate RMI support "for removal"
   https://github.com/apache/jackrabbit/commit/baa52ef20f98b257101bc37285c44f399d61a0fd";>baa52ef
 JCR-5018: bump up minimal Java version to 11 (rename variable)
   Additional commits viewable in https://github.com/apache/jackrabbit/compare/jackrabbit-2.14.4...jackrabbit-2.21.23";>compare
 view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.jackrabbit:jackrabbit-webdav&package-manager=maven&previous-version=2.14.4&new-version=2.21.23)](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 Depen