[jira] [Created] (MCOMPILER-574) ‎AbstractCompilerMojo::execute should propagate exception cause

2024-02-03 Thread Alexander Kriegisch (Jira)
Alexander Kriegisch created MCOMPILER-574:
-

 Summary: ‎AbstractCompilerMojo::execute should propagate exception 
cause
 Key: MCOMPILER-574
 URL: https://issues.apache.org/jira/browse/MCOMPILER-574
 Project: Maven Compiler Plugin
  Issue Type: Improvement
Affects Versions: 3.12.1
Reporter: Alexander Kriegisch


[In 
{{‎AbstractCompilerMojo::execute}}|https://github.com/apache/maven-compiler-plugin/blob/c08b0fda5445a2a3f495a3d6524d80c82fc9d5e6/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java#L680-L684],
 errors caught from the compiler manager are swallowed, instead a new 
{{MojoExecutionException}} is thrown. This renders debugging root causes for 
problems with compiler DI scanning, injection and instantiation virtually 
impossible.

The caught exception should be passed on as a cause for the new exception.

[~laeubi], see our discussion 
[here|https://github.com/codehaus-plexus/plexus-compiler/pull/361#discussion_r1477027270].



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


[jira] [Commented] (MCOMPILER-574) ‎AbstractCompilerMojo::execute should propagate exception cause

2024-02-03 Thread Jira


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

Christoph Läubrich commented on MCOMPILER-574:
--

(y) exceptions should always carry the cause if they convert from one type to 
another! 

> ‎AbstractCompilerMojo::execute should propagate exception cause
> ---
>
> Key: MCOMPILER-574
> URL: https://issues.apache.org/jira/browse/MCOMPILER-574
> Project: Maven Compiler Plugin
>  Issue Type: Improvement
>Affects Versions: 3.12.1
>Reporter: Alexander Kriegisch
>Priority: Major
>
> [In 
> {{‎AbstractCompilerMojo::execute}}|https://github.com/apache/maven-compiler-plugin/blob/c08b0fda5445a2a3f495a3d6524d80c82fc9d5e6/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java#L680-L684],
>  errors caught from the compiler manager are swallowed, instead a new 
> {{MojoExecutionException}} is thrown. This renders debugging root causes for 
> problems with compiler DI scanning, injection and instantiation virtually 
> impossible.
> The caught exception should be passed on as a cause for the new exception.
> [~laeubi], see our discussion 
> [here|https://github.com/codehaus-plexus/plexus-compiler/pull/361#discussion_r1477027270].



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


Re: [PR] Support using an SSH private key as auth mechanism [maven-scm-publish-plugin]

2024-02-03 Thread via GitHub


kwin commented on PR #18:
URL: 
https://github.com/apache/maven-scm-publish-plugin/pull/18#issuecomment-1925258517

   This would implicitly be solved via #29.


-- 
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] [MWRAPPER-123] hash string char-by-char for AIX's ksh implementation [maven-wrapper]

2024-02-03 Thread via GitHub


bmarwell commented on PR #117:
URL: https://github.com/apache/maven-wrapper/pull/117#issuecomment-1925303195

   > > ```
   > > # echo 'T="abcde"; echo "${T#?}"' | bash
   > > bcde
   > > 
   > > # echo 'T="abcde"; echo "${T%${T#?}}"' | bash
   > > a
   > > ```
   > 
   > I thought about test on AIX with ksh ...
   
   ```
   # echo 'T="abcde"; echo "${T#?}"' | ksh
   bcde
   
   echo 'T="abcde"; echo "${T%${T#?}}"' | ksh
   a
   ```
   
   I think I know what you have in mind...


-- 
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] (MWRAPPER-123) only-mvnw fails on AIX' ksh implementation

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


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

ASF GitHub Bot commented on MWRAPPER-123:
-

bmarwell commented on PR #117:
URL: https://github.com/apache/maven-wrapper/pull/117#issuecomment-1925303195

   > > ```
   > > # echo 'T="abcde"; echo "${T#?}"' | bash
   > > bcde
   > > 
   > > # echo 'T="abcde"; echo "${T%${T#?}}"' | bash
   > > a
   > > ```
   > 
   > I thought about test on AIX with ksh ...
   
   ```
   # echo 'T="abcde"; echo "${T#?}"' | ksh
   bcde
   
   echo 'T="abcde"; echo "${T%${T#?}}"' | ksh
   a
   ```
   
   I think I know what you have in mind...




> only-mvnw fails on AIX' ksh implementation
> --
>
> Key: MWRAPPER-123
> URL: https://issues.apache.org/jira/browse/MWRAPPER-123
> Project: Maven Wrapper
>  Issue Type: Bug
>Affects Versions: 3.1.1
>Reporter: Benjamin Marwell
>Priority: Urgent
>
> the script {{only-mvnw}} contains this snippet in a line to calculate a hash:
> {code:bash}
> printf %d "'$str"
> {code}
> The idea is to convert {{$str}} to a number, where {{'}} has a special 
> meaning for {{%d}} conversion. However, there are two problems with it:
> 1. It does not work on ksh on AIX (because this conversion is not posix 
> compliant), so the script will not run on AIX.
> 2. It will only use the first letter, which is alway {{h}} (from the string 
> always being a valid URI).
> For now, replace it with the ASCII constant 104 (ASCII value of h). The 
> intended behaviour can be restored in another PR if feasible.



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


Re: [PR] [MWRAPPER-123] hash string char-by-char for AIX's ksh implementation [maven-wrapper]

2024-02-03 Thread via GitHub


bmarwell commented on PR #117:
URL: https://github.com/apache/maven-wrapper/pull/117#issuecomment-1925305248

   I think we can replace this
   
   ```
 # strings start with index 1
 idx=1
   
 # lt: skip line break at end
 while [ $idx -lt "$length" ]; do
   char=$( printf "%s" "$str" | cut -c $idx )
   h=$(( ( h * 31 + $(LC_CTYPE=C printf %d "'$char") ) % 4294967296 ))
   idx=$(( idx + 1 ))
 done
   ``` 
   
   with this:
   
   ```
 while [ "$str" != "" ]; do
   char="${str%${str#?}}"
   h=$(( ( h * 31 + $(LC_CTYPE=C printf %d "'$char") ) % 4294967296 ))
   str="${T#?}"
 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



[jira] [Commented] (MWRAPPER-123) only-mvnw fails on AIX' ksh implementation

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


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

ASF GitHub Bot commented on MWRAPPER-123:
-

bmarwell commented on PR #117:
URL: https://github.com/apache/maven-wrapper/pull/117#issuecomment-1925305248

   I think we can replace this
   
   ```
 # strings start with index 1
 idx=1
   
 # lt: skip line break at end
 while [ $idx -lt "$length" ]; do
   char=$( printf "%s" "$str" | cut -c $idx )
   h=$(( ( h * 31 + $(LC_CTYPE=C printf %d "'$char") ) % 4294967296 ))
   idx=$(( idx + 1 ))
 done
   ``` 
   
   with this:
   
   ```
 while [ "$str" != "" ]; do
   char="${str%${str#?}}"
   h=$(( ( h * 31 + $(LC_CTYPE=C printf %d "'$char") ) % 4294967296 ))
   str="${T#?}"
 done
   ```




> only-mvnw fails on AIX' ksh implementation
> --
>
> Key: MWRAPPER-123
> URL: https://issues.apache.org/jira/browse/MWRAPPER-123
> Project: Maven Wrapper
>  Issue Type: Bug
>Affects Versions: 3.1.1
>Reporter: Benjamin Marwell
>Priority: Urgent
>
> the script {{only-mvnw}} contains this snippet in a line to calculate a hash:
> {code:bash}
> printf %d "'$str"
> {code}
> The idea is to convert {{$str}} to a number, where {{'}} has a special 
> meaning for {{%d}} conversion. However, there are two problems with it:
> 1. It does not work on ksh on AIX (because this conversion is not posix 
> compliant), so the script will not run on AIX.
> 2. It will only use the first letter, which is alway {{h}} (from the string 
> always being a valid URI).
> For now, replace it with the ASCII constant 104 (ASCII value of h). The 
> intended behaviour can be restored in another PR if feasible.



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


Re: [PR] [MNG-8026] Maven drives regarding scopes [maven]

2024-02-03 Thread via GitHub


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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.

Review Comment:
   Maybe explain the different between "empty" and "none"?



-- 
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-8026) Maven should define from ground up scopes used with Resolver

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


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

ASF GitHub Bot commented on MNG-8026:
-

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.

Review Comment:
   Maybe explain the different between "empty" and "none"?





> Maven should define from ground up scopes used with Resolver
> 
>
> Key: MNG-8026
> URL: https://issues.apache.org/jira/browse/MNG-8026
> Project: Maven
>  Issue Type: Task
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-13
>
>
> See MRESOLVER-471, it is actually role of Maven (as a resolver consumer 
> project) to define all these things:
>  * supported scopes
>  * transformations of scopes to build path scopes
>  * fine tune conflict resolution and related things (in session)



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


Re: [PR] [MNG-8026] Maven drives regarding scopes [maven]

2024-02-03 Thread via GitHub


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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.

Review Comment:
   I presume that we mean "compile, test and runtime"? (for clarifying the 
difference with `COMPILE_ONLY`).



-- 
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-8026) Maven should define from ground up scopes used with Resolver

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


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

ASF GitHub Bot commented on MNG-8026:
-

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.

Review Comment:
   I presume that we mean "compile, test and runtime"? (for clarifying the 
difference with `COMPILE_ONLY`).





> Maven should define from ground up scopes used with Resolver
> 
>
> Key: MNG-8026
> URL: https://issues.apache.org/jira/browse/MNG-8026
> Project: Maven
>  Issue Type: Task
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-13
>
>
> See MRESOLVER-471, it is actually role of Maven (as a resolver consumer 
> project) to define all these things:
>  * supported scopes
>  * transformations of scopes to build path scopes
>  * fine tune conflict resolution and related things (in session)



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


Re: [PR] [MNG-8026] Maven drives regarding scopes [maven]

2024-02-03 Thread via GitHub


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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.
+ */
+COMPILE("compile", true),
+
+/**
+ * Runtime.
+ */
+RUNTIME("runtime", true),
+
+/**
+ * Provided.
+ */
+PROVIDED("provided", false),
+
+/**
+ * Test compile only.
+ */
+TEST_ONLY("test-only", false),
+
+/**
+ * Test.

Review Comment:
   I presume that we mean "test compilation and execution"?



-- 
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-8026] Maven drives regarding scopes [maven]

2024-02-03 Thread via GitHub


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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.

Review Comment:
   We saw that "empty" is present in old codebase (3.x), maybe will go away, 
but we left it here just to be on safe side until we clear up things. 
   
   The "none" on the other hand is clearly defined IMHO: merely added just to 
affect the reactor sorting.



-- 
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-8026) Maven should define from ground up scopes used with Resolver

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


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

ASF GitHub Bot commented on MNG-8026:
-

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.
+ */
+COMPILE("compile", true),
+
+/**
+ * Runtime.
+ */
+RUNTIME("runtime", true),
+
+/**
+ * Provided.
+ */
+PROVIDED("provided", false),
+
+/**
+ * Test compile only.
+ */
+TEST_ONLY("test-only", false),
+
+/**
+ * Test.

Review Comment:
   I presume that we mean "test compilation and execution"?





> Maven should define from ground up scopes used with Resolver
> 
>
> Key: MNG-8026
> URL: https://issues.apache.org/jira/browse/MNG-8026
> Project: Maven
>  Issue Type: Task
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-13
>
>
> See MRESOLVER-471, it is actually role of Maven (as a resolver consumer 
> project) to define all these things:
>  * supported scopes
>  * transformations of scopes to build path scopes
>  * fine tune conflict resolution and related things (in session)



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


[jira] [Commented] (MNG-8026) Maven should define from ground up scopes used with Resolver

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


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

ASF GitHub Bot commented on MNG-8026:
-

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.

Review Comment:
   We saw that "empty" is present in old codebase (3.x), maybe will go away, 
but we left it here just to be on safe side until we clear up things. 
   
   The "none" on the other hand is clearly defined IMHO: merely added just to 
affect the reactor sorting.





> Maven should define from ground up scopes used with Resolver
> 
>
> Key: MNG-8026
> URL: https://issues.apache.org/jira/browse/MNG-8026
> Project: Maven
>  Issue Type: Task
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-13
>
>
> See MRESOLVER-471, it is actually role of Maven (as a resolver consumer 
> project) to define all these things:
>  * supported scopes
>  * transformations of scopes to build path scopes
>  * fine tune conflict resolution and related things (in session)



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


Re: [PR] [MNG-8026] Maven drives regarding scopes [maven]

2024-02-03 Thread via GitHub


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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.

Review Comment:
   Yes



##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.
+ */
+COMPILE("compile", true),
+
+/**
+ * Runtime.
+ */
+RUNTIME("runtime", true),
+
+/**
+ * Provided.
+ */
+PROVIDED("provided", false),
+
+/**
+ * Test compile only.
+ */
+TEST_ONLY("test-only", false),
+
+/**
+ * Test.

Review Comment:
   Yes



-- 
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-8026) Maven should define from ground up scopes used with Resolver

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


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

ASF GitHub Bot commented on MNG-8026:
-

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.

Review Comment:
   Yes



##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.
+ */
+COMPILE("compile", true),
+
+/**
+ * Runtime.
+ */
+RUNTIME("runtime", true),
+
+/**
+ * Provided.
+ */
+PROVIDED("provided", false),
+
+/**
+ * Test compile only.
+ */
+TEST_ONLY("test-only", false),
+
+/**
+ * Test.

Review Comment:
   Yes





> Maven should define from ground up scopes used with Resolver
> 
>
> Key: MNG-8026
> URL: https://issues.apache.org/jira/browse/MNG-8026
> Project: Maven
>  Issue Type: Task
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-13
>
>
> 

Re: [PR] [MNG-8026] Maven drives regarding scopes [maven]

2024-02-03 Thread via GitHub


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


##
api/maven-api-core/src/main/java/org/apache/maven/api/ExtensibleEnum.java:
##
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ */
+public interface ExtensibleEnum {

Review Comment:
   Just for information: the International Organization for Standardization 
(ISO) uses the `CodeList` term for extensible enumerations, at least in the ISO 
19xxx series of international standards (geospatial information). But I did not 
verified if `CodeList` was consistently used in all other standards 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



[jira] [Commented] (MNG-8026) Maven should define from ground up scopes used with Resolver

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


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

ASF GitHub Bot commented on MNG-8026:
-

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/ExtensibleEnum.java:
##
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ */
+public interface ExtensibleEnum {

Review Comment:
   Just for information: the International Organization for Standardization 
(ISO) uses the `CodeList` term for extensible enumerations, at least in the ISO 
19xxx series of international standards (geospatial information). But I did not 
verified if `CodeList` was consistently used in all other standards as well.





> Maven should define from ground up scopes used with Resolver
> 
>
> Key: MNG-8026
> URL: https://issues.apache.org/jira/browse/MNG-8026
> Project: Maven
>  Issue Type: Task
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-13
>
>
> See MRESOLVER-471, it is actually role of Maven (as a resolver consumer 
> project) to define all these things:
>  * supported scopes
>  * transformations of scopes to build path scopes
>  * fine tune conflict resolution and related things (in session)



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


Re: [PR] [MNG-8026] Maven drives regarding scopes [maven]

2024-02-03 Thread via GitHub


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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.

Review Comment:
   I think it would be worth to edit the javadoc accordingly (same for `TEST`).



-- 
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-8026) Maven should define from ground up scopes used with Resolver

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


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

ASF GitHub Bot commented on MNG-8026:
-

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyScope.java:
##
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * Dependency scope.
+ * 
+ * Implementation must have {@code equals()} and {@code hashCode()} 
implemented, so implementations of this interface
+ * can be used as keys.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public enum DependencyScope {
+
+/**
+ * None. Allows you to declare dependencies (for example to alter reactor 
build order) but in reality dependencies
+ * in this scope are not part of any build path scope.
+ */
+NONE("none", false),
+
+/**
+ * Empty scope.
+ */
+EMPTY("", false),
+
+/**
+ * Compile only.
+ */
+COMPILE_ONLY("compile-only", false),
+
+/**
+ * Compile.

Review Comment:
   I think it would be worth to edit the javadoc accordingly (same for `TEST`).





> Maven should define from ground up scopes used with Resolver
> 
>
> Key: MNG-8026
> URL: https://issues.apache.org/jira/browse/MNG-8026
> Project: Maven
>  Issue Type: Task
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-13
>
>
> See MRESOLVER-471, it is actually role of Maven (as a resolver consumer 
> project) to define all these things:
>  * supported scopes
>  * transformations of scopes to build path scopes
>  * fine tune conflict resolution and related things (in session)



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


Re: [PR] [MNG-8015] Control the type of path where each dependency can be placed [maven]

2024-02-03 Thread via GitHub


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

   Thanks, it look good to me. I will try to add a few JUnit tests today or 
tomorrow.


-- 
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-8015) Control the type of path where each dependency can be placed

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


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

ASF GitHub Bot commented on MNG-8015:
-

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

   Thanks, it look good to me. I will try to add a few JUnit tests today or 
tomorrow.




> Control the type of path where each dependency can be placed
> 
>
> Key: MNG-8015
> URL: https://issues.apache.org/jira/browse/MNG-8015
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 4.0.0-alpha-12
>Reporter: Martin Desruisseaux
>Priority: Major
>
> Make possible to declare where each dependency can be placed: on the 
> module-path, class-path, agent path, doclet path, taglet path, annotation 
> processing path, _etc._ The proposed improvement consists in adding a new 
> {{PATH_TYPES}} property that can be associated to dependencies. The property 
> value is an array of {{PathType}}, a new enumeration-like class with values 
> such as {{CLASSES}}, {{MODULES}}, {{DOCLET}}, _etc._ Contrarily to real Java 
> enumerations, this enumeration-like class is extensible: plugins can add 
> their own enumeration values. This is required at least for the 
> {{--patch-module}} option, where a new {{PathType}} enumeration value need to 
> be created for each module to patch.
> Users can control indirectly the {{PathType}} of a dependency by specifying 
> the dependency type. Note that there is no direct mapping between the 
> dependency type and where the dependency will be placed, but only an indirect 
> mapping caused by the fact that using a dependency type implies implicit 
> values of some properties such as classifier, and (with this proposal) path 
> types:
>  * {{jar}} implies {{PathType.CLASSES}} and {{PathType.MODULES}}.
>  * {{modular-jar}} implies {{PathType.MODULES}} only.
>  * {{classpath-jar}} implies {{PathType.CLASSES}} only.
>  * _etc._
> When a plugin requests the paths of dependencies, the plugin specifies the 
> types of path it is interested in. For example, a Java compiler plugin can 
> specify that it is interested in {{PathType.CLASSES}} and 
> {{PathType.MODULES}}, but not {{PathType.DOCLET}}. If a dependency declared 
> that it can be placed on the class-path or the doclet-path, only the 
> class-path is left after intersection with plugin's request. This is 
> important for the next step.
> If, after all filtering such as above paragraph are applied, a dependency has 
> only one {{PathType}} left, then there is no ambiguity and we are done. 
> Combined with above-cited dependency types like {{modular-jar}} or 
> {{classpath-jar}}, this rule allows users to control where the dependency 
> will be placed. But if there are two or more {{PathType}} left after 
> filtering, then a choice needs to be done. For example if there are both 
> {{PathType.CLASSES}} and {{PathType.MODULES}} (which may happen when 
> {{jar}} is used), then an heuristic rule similar to Maven 3 can 
> be applied: check if a {{module-info.class}} file or an {{Automatic-Name}} 
> manifest attribute is present, and base the decision on that.
> This proposal aims to fix MNG-7855.



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


[jira] [Commented] (SUREFIRE-1744) Enable system-out for successfuly passed tests as well

2024-02-03 Thread Michael Osipov (Jira)


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

Michael Osipov commented on SUREFIRE-1744:
--

[~zabetak], do you solve your problem someone needs to engage with me: 
https://github.com/apache/maven-surefire/pull/670#issuecomment-1868376997

> Enable system-out for successfuly passed tests as well
> --
>
> Key: SUREFIRE-1744
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1744
> Project: Maven Surefire
>  Issue Type: New Feature
>  Components: Maven Surefire Plugin
>Reporter: Klevis Ramo
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 3.0.0-M5
>
> Attachments: image-2020-01-09-16-03-07-261.png, 
> image-2020-01-09-16-04-11-142.png
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> *Situation*
> Currently logs during tests execution are exported to *.xml report only for 
> failed tests.
> The xsd schema also implies the 
> same(surefire-test-report-3.0.xsd,legacy-surefire-test-report.xsd) , 
> *system-out* elment is always a child of 
> failure,rerunFailure,flakyFailure,rerunError or flakyError element.
> Some part of the code(*createOutErrElements adds the system-out*) :
> {code:java}
> StatelessXmlReporter
>  
> private void serializeTestClassWithoutRerun( OutputStream outputStream, 
> OutputStreamWriter fw, XMLWriter ppw,
>  List 
> methodEntries )
> {
> for ( WrappedReportEntry methodEntry : methodEntries )
> {
> startTestElement( ppw, methodEntry );
> if ( methodEntry.getReportEntryType() != SUCCESS )
> {
> getTestProblems( fw, ppw, methodEntry, trimStackTrace, 
> outputStream,
> methodEntry.getReportEntryType().getXmlTag(), false );
> createOutErrElements( fw, ppw, methodEntry, outputStream );
> }
> ppw.endElement();
> }
> }{code}
> *Problem*
> Because logs are not exported for successfully tests there is no way(outside 
> IDE or complete log) one could nicely explore what a particular test is 
> doing. This is hurting also the documentation part of a test.Imagine those 
> tests are used as end to end tests and business analysts would like to review 
> through CI tools like jenkins.
>  
> *Possible Solution*
> Enable maven sure fire plugin to export logs to system-out also for 
> succefully passed tests through an optional parameter leaving the default 
> behaviour as it is right now(only failed tests have outputs exported). This 
> means of course also enchancing the xsd to support system-out to different 
> parent rather then only failed ones.
>  
> Since it happens I am also a developer I can of course help with the feature 
> implementation if you find this something that makes sense.
>  
>  



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


[PR] (doc) Add new value accepted by `-proc:` option [maven-compiler-plugin]

2024-02-03 Thread via GitHub


pzygielo opened a new pull request, #222:
URL: https://github.com/apache/maven-compiler-plugin/pull/222

   Without explicit `-proc`, `javac` complains about its future:
   
   ```
   [INFO] Compiling 5 source files with javac [debug release 17] to 
target/test-classes
   [INFO] Annotation processing is enabled because one or more processors were 
found
 on the class path. A future release of javac may disable annotation 
processing
 unless at least one processor is specified by name (-processor), or a 
search
 path is specified (--processor-path, --processor-module-path), or 
annotation
 processing is enabled explicitly (-proc:only, -proc:full).
 Use -Xlint:-options to suppress this message.
 Use -proc:none to disable annotation processing.
   ```
   
   Current parameter's javadoc suggests that only `only` and `none` are 
allowed. This parameter however is not validated by m-compiler-p. This is also 
not validated by plexus-compiler.
   
   -
   
- [x] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   


-- 
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] (doc) Add new value accepted by `-proc:` option [maven-compiler-plugin]

2024-02-03 Thread via GitHub


pzygielo closed pull request #222: (doc) Add new value accepted by `-proc:` 
option
URL: https://github.com/apache/maven-compiler-plugin/pull/222


-- 
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] (doc) Add new value accepted by `-proc:` option [maven-compiler-plugin]

2024-02-03 Thread via GitHub


pzygielo commented on PR #222:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/222#issuecomment-1925419455

   Duplicate of
   - #200


-- 
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] [DOXIA-728] Support blockquotes in MarkdownSink [maven-doxia]

2024-02-03 Thread via GitHub


michael-o commented on code in PR #198:
URL: https://github.com/apache/maven-doxia/pull/198#discussion_r1477108496


##
doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownMarkup.java:
##
@@ -77,11 +77,11 @@ public interface MarkdownMarkup extends TextMarkup {
 /** Syntax for the link start: "](" */
 String LINK_START_2_MARKUP = "](";
 
-/** Syntax for the ordered list item: '1.' */
-String LIST_ORDERED_ITEM_START_MARKUP = "1.";
+/** Syntax for the ordered list item: '1. ' */
+String LIST_ORDERED_ITEM_START_MARKUP = "1. ";
 
-/** Syntax for the unordered list item: "-" */
-String LIST_UNORDERED_ITEM_START_MARKUP = "-";
+/** Syntax for the unordered list item: "- " */
+String LIST_UNORDERED_ITEM_START_MARKUP = "- ";

Review Comment:
   This is rather a fix, right?



-- 
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] (DOXIA-728) MarkdownSink: Support blockquotes

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


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

ASF GitHub Bot commented on DOXIA-728:
--

michael-o commented on code in PR #198:
URL: https://github.com/apache/maven-doxia/pull/198#discussion_r1477108496


##
doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownMarkup.java:
##
@@ -77,11 +77,11 @@ public interface MarkdownMarkup extends TextMarkup {
 /** Syntax for the link start: "](" */
 String LINK_START_2_MARKUP = "](";
 
-/** Syntax for the ordered list item: '1.' */
-String LIST_ORDERED_ITEM_START_MARKUP = "1.";
+/** Syntax for the ordered list item: '1. ' */
+String LIST_ORDERED_ITEM_START_MARKUP = "1. ";
 
-/** Syntax for the unordered list item: "-" */
-String LIST_UNORDERED_ITEM_START_MARKUP = "-";
+/** Syntax for the unordered list item: "- " */
+String LIST_UNORDERED_ITEM_START_MARKUP = "- ";

Review Comment:
   This is rather a fix, right?





> MarkdownSink: Support blockquotes
> -
>
> Key: DOXIA-728
> URL: https://issues.apache.org/jira/browse/DOXIA-728
> Project: Maven Doxia
>  Issue Type: Improvement
>Affects Versions: 2.0.0-M9
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>




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


Re: [PR] [DOXIA-728] Support blockquotes in MarkdownSink [maven-doxia]

2024-02-03 Thread via GitHub


kwin commented on code in PR #198:
URL: https://github.com/apache/maven-doxia/pull/198#discussion_r1477109186


##
doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownMarkup.java:
##
@@ -77,11 +77,11 @@ public interface MarkdownMarkup extends TextMarkup {
 /** Syntax for the link start: "](" */
 String LINK_START_2_MARKUP = "](";
 
-/** Syntax for the ordered list item: '1.' */
-String LIST_ORDERED_ITEM_START_MARKUP = "1.";
+/** Syntax for the ordered list item: '1. ' */
+String LIST_ORDERED_ITEM_START_MARKUP = "1. ";
 
-/** Syntax for the unordered list item: "-" */
-String LIST_UNORDERED_ITEM_START_MARKUP = "-";
+/** Syntax for the unordered list item: "- " */
+String LIST_UNORDERED_ITEM_START_MARKUP = "- ";

Review Comment:
   Previously this was combined each time with a space, but it never occurs 
without it, so it makes sense to include the space in the constant.



-- 
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] (DOXIA-728) MarkdownSink: Support blockquotes

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


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

ASF GitHub Bot commented on DOXIA-728:
--

kwin commented on code in PR #198:
URL: https://github.com/apache/maven-doxia/pull/198#discussion_r1477109186


##
doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownMarkup.java:
##
@@ -77,11 +77,11 @@ public interface MarkdownMarkup extends TextMarkup {
 /** Syntax for the link start: "](" */
 String LINK_START_2_MARKUP = "](";
 
-/** Syntax for the ordered list item: '1.' */
-String LIST_ORDERED_ITEM_START_MARKUP = "1.";
+/** Syntax for the ordered list item: '1. ' */
+String LIST_ORDERED_ITEM_START_MARKUP = "1. ";
 
-/** Syntax for the unordered list item: "-" */
-String LIST_UNORDERED_ITEM_START_MARKUP = "-";
+/** Syntax for the unordered list item: "- " */
+String LIST_UNORDERED_ITEM_START_MARKUP = "- ";

Review Comment:
   Previously this was combined each time with a space, but it never occurs 
without it, so it makes sense to include the space in the constant.





> MarkdownSink: Support blockquotes
> -
>
> Key: DOXIA-728
> URL: https://issues.apache.org/jira/browse/DOXIA-728
> Project: Maven Doxia
>  Issue Type: Improvement
>Affects Versions: 2.0.0-M9
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>




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


Re: [PR] [DOXIA-728] Support blockquotes in MarkdownSink [maven-doxia]

2024-02-03 Thread via GitHub


kwin commented on PR #198:
URL: https://github.com/apache/maven-doxia/pull/198#issuecomment-1925421037

   There is currently an issue on Windows I still need to investigate.


-- 
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] (DOXIA-728) MarkdownSink: Support blockquotes

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


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

ASF GitHub Bot commented on DOXIA-728:
--

kwin commented on PR #198:
URL: https://github.com/apache/maven-doxia/pull/198#issuecomment-1925421037

   There is currently an issue on Windows I still need to investigate.




> MarkdownSink: Support blockquotes
> -
>
> Key: DOXIA-728
> URL: https://issues.apache.org/jira/browse/DOXIA-728
> Project: Maven Doxia
>  Issue Type: Improvement
>Affects Versions: 2.0.0-M9
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>




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


Re: [PR] [DOXIA-728] Support blockquotes in MarkdownSink [maven-doxia]

2024-02-03 Thread via GitHub


michael-o commented on code in PR #198:
URL: https://github.com/apache/maven-doxia/pull/198#discussion_r1477109763


##
doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownMarkup.java:
##
@@ -77,11 +77,11 @@ public interface MarkdownMarkup extends TextMarkup {
 /** Syntax for the link start: "](" */
 String LINK_START_2_MARKUP = "](";
 
-/** Syntax for the ordered list item: '1.' */
-String LIST_ORDERED_ITEM_START_MARKUP = "1.";
+/** Syntax for the ordered list item: '1. ' */
+String LIST_ORDERED_ITEM_START_MARKUP = "1. ";
 
-/** Syntax for the unordered list item: "-" */
-String LIST_UNORDERED_ITEM_START_MARKUP = "-";
+/** Syntax for the unordered list item: "- " */
+String LIST_UNORDERED_ITEM_START_MARKUP = "- ";

Review Comment:
   Makes sense.



-- 
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] (DOXIA-728) MarkdownSink: Support blockquotes

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


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

ASF GitHub Bot commented on DOXIA-728:
--

michael-o commented on code in PR #198:
URL: https://github.com/apache/maven-doxia/pull/198#discussion_r1477109763


##
doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownMarkup.java:
##
@@ -77,11 +77,11 @@ public interface MarkdownMarkup extends TextMarkup {
 /** Syntax for the link start: "](" */
 String LINK_START_2_MARKUP = "](";
 
-/** Syntax for the ordered list item: '1.' */
-String LIST_ORDERED_ITEM_START_MARKUP = "1.";
+/** Syntax for the ordered list item: '1. ' */
+String LIST_ORDERED_ITEM_START_MARKUP = "1. ";
 
-/** Syntax for the unordered list item: "-" */
-String LIST_UNORDERED_ITEM_START_MARKUP = "-";
+/** Syntax for the unordered list item: "- " */
+String LIST_UNORDERED_ITEM_START_MARKUP = "- ";

Review Comment:
   Makes sense.





> MarkdownSink: Support blockquotes
> -
>
> Key: DOXIA-728
> URL: https://issues.apache.org/jira/browse/DOXIA-728
> Project: Maven Doxia
>  Issue Type: Improvement
>Affects Versions: 2.0.0-M9
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>




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


[PR] Various updates [maven-resolver]

2024-02-03 Thread via GitHub


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

   Issues TBD


-- 
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] (MSITE-1002) Maven Site 4 will break code highlight of site generated by Markdown

2024-02-03 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MSITE-1002:
---

[~kwin], this is a Markdown-related issue: Do you want to take a look at it? I 
can confirm that the issue is correct.

> Maven Site 4 will break code highlight of site generated by Markdown
> 
>
> Key: MSITE-1002
> URL: https://issues.apache.org/jira/browse/MSITE-1002
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: doxia integration
>Affects Versions: 4.0.0-M13
>Reporter: Xavi Lee
>Priority: Major
> Attachments: maven-site-3.png, maven-site-4.png
>
>
> repro repo https://github.com/awxiaoxian2020/code-render-bug
> master branch is Maven Site 3 with Fluido skin 1
> v4 branch is Maven Site 4 with Fluido skin 2.
> Open their respective `target/site/test.html` files in local to see the 
> rendered result.



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


Re: [PR] [DOXIASITETOOLS-324] Allow configuration of Doxia parser [maven-doxia-sitetools]

2024-02-03 Thread via GitHub


michael-o commented on PR #126:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/126#issuecomment-1925434563

   @kwin Can you take care of the failing tests? I want to complete the review 
this month.


-- 
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] (DOXIASITETOOLS-324) Allow configuration of parser (per markup source path pattern)

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


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

ASF GitHub Bot commented on DOXIASITETOOLS-324:
---

michael-o commented on PR #126:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/126#issuecomment-1925434563

   @kwin Can you take care of the failing tests? I want to complete the review 
this month.




> Allow configuration of parser (per markup source path pattern)
> --
>
> Key: DOXIASITETOOLS-324
> URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-324
> Project: Maven Doxia Sitetools
>  Issue Type: New Feature
>  Components: Site renderer
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: 2.0.0-M17
>
>
> Currently the Doxia parsers being used for the Doxia markup sources have a 
> fix configuration 
> (https://github.com/apache/maven-doxia-sitetools/blob/dacaa552c1b8e89eed84db0f43b6b0a72be91d0c/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java#L324).
> It would be beneficial to allow to dynamically configure the parsers (based 
> on a matching markup source path pattern)



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


[jira] [Updated] (DOXIASITETOOLS-324) Allow configuration of parser per markup

2024-02-03 Thread Michael Osipov (Jira)


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

Michael Osipov updated DOXIASITETOOLS-324:
--
Summary: Allow configuration of parser per markup  (was: Allow 
configuration of parser (per markup source path pattern))

> Allow configuration of parser per markup
> 
>
> Key: DOXIASITETOOLS-324
> URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-324
> Project: Maven Doxia Sitetools
>  Issue Type: New Feature
>  Components: Site renderer
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: 2.0.0-M17
>
>
> Currently the Doxia parsers being used for the Doxia markup sources have a 
> fix configuration 
> (https://github.com/apache/maven-doxia-sitetools/blob/dacaa552c1b8e89eed84db0f43b6b0a72be91d0c/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java#L324).
> It would be beneficial to allow to dynamically configure the parsers (based 
> on a matching markup source path pattern)



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


[jira] [Commented] (MSITE-1002) Maven Site 4 will break code highlight of site generated by Markdown

2024-02-03 Thread Jeremy Landis (Jira)


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

Jeremy Landis commented on MSITE-1002:
--

Also see [https://github.com/mybatis/parent/issues/600.]  A work around was 
found that fixes it which may help resolve the issue.  Seems this issue 
happened a number of years ago so possibly some renaming of stuff but haven't 
found exactly where yet inside doxia.

> Maven Site 4 will break code highlight of site generated by Markdown
> 
>
> Key: MSITE-1002
> URL: https://issues.apache.org/jira/browse/MSITE-1002
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: doxia integration
>Affects Versions: 4.0.0-M13
>Reporter: Xavi Lee
>Priority: Major
> Attachments: maven-site-3.png, maven-site-4.png
>
>
> repro repo https://github.com/awxiaoxian2020/code-render-bug
> master branch is Maven Site 3 with Fluido skin 1
> v4 branch is Maven Site 4 with Fluido skin 2.
> Open their respective `target/site/test.html` files in local to see the 
> rendered result.



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


[jira] [Comment Edited] (MSITE-1002) Maven Site 4 will break code highlight of site generated by Markdown

2024-02-03 Thread Michael Osipov (Jira)


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

Michael Osipov edited comment on MSITE-1002 at 2/3/24 9:36 PM:
---

Also see [https://github.com/mybatis/parent/issues/600].  A work around was 
found that fixes it which may help resolve the issue.  Seems this issue 
happened a number of years ago so possibly some renaming of stuff but haven't 
found exactly where yet inside doxia.


was (Author: hazendaz):
Also see [https://github.com/mybatis/parent/issues/600.]  A work around was 
found that fixes it which may help resolve the issue.  Seems this issue 
happened a number of years ago so possibly some renaming of stuff but haven't 
found exactly where yet inside doxia.

> Maven Site 4 will break code highlight of site generated by Markdown
> 
>
> Key: MSITE-1002
> URL: https://issues.apache.org/jira/browse/MSITE-1002
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: doxia integration
>Affects Versions: 4.0.0-M13
>Reporter: Xavi Lee
>Priority: Major
> Attachments: maven-site-3.png, maven-site-4.png
>
>
> repro repo https://github.com/awxiaoxian2020/code-render-bug
> master branch is Maven Site 3 with Fluido skin 1
> v4 branch is Maven Site 4 with Fluido skin 2.
> Open their respective `target/site/test.html` files in local to see the 
> rendered result.



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


[jira] [Commented] (MSITE-1002) Maven Site 4 will break code highlight of site generated by Markdown

2024-02-03 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MSITE-1002:
---

[~hazendaz], thanks for sharing. I guess going down version by version might 
help to tackle the issue.

> Maven Site 4 will break code highlight of site generated by Markdown
> 
>
> Key: MSITE-1002
> URL: https://issues.apache.org/jira/browse/MSITE-1002
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: doxia integration
>Affects Versions: 4.0.0-M13
>Reporter: Xavi Lee
>Priority: Major
> Attachments: maven-site-3.png, maven-site-4.png
>
>
> repro repo https://github.com/awxiaoxian2020/code-render-bug
> master branch is Maven Site 3 with Fluido skin 1
> v4 branch is Maven Site 4 with Fluido skin 2.
> Open their respective `target/site/test.html` files in local to see the 
> rendered result.



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


Re: [PR] [MBUILDCACHE-80] - Fix for incremental builds with a higher goal than the highest cached goal is rebuilding the full project from scratch [maven-build-cache-extension]

2024-02-03 Thread via GitHub


olamy merged PR #128:
URL: https://github.com/apache/maven-build-cache-extension/pull/128


-- 
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] (MBUILDCACHE-80) Incremental builds with a higher goal than the highest cached goal is rebuilding the full project from scratch

2024-02-03 Thread Olivier Lamy (Jira)


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

Olivier Lamy updated MBUILDCACHE-80:

Fix Version/s: 1.2.0

> Incremental builds with a higher goal than the highest cached goal is 
> rebuilding the full project from scratch
> --
>
> Key: MBUILDCACHE-80
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-80
> Project: Maven Build Cache Extension
>  Issue Type: Bug
>Affects Versions: 1.0.1, 1.1.0, 1.2.0
> Environment: Apache Maven 3.9.6 
> (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
> Maven home: C:\Users\sdkman\candidates\maven\current
> Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: 
> C:\Users\sdkman\candidates\java\current
> Default locale: en_US, platform encoding: UTF8
> OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
>Reporter: Igor Dianov
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.2.0
>
>
> We are trying to use the Maven build cache extension on a large multi-module 
> project with ~180 modules by caching builds in the CI workflows to be able to 
> reuse artifacts in the build cache between main and feature branches. The 
> final build artifacts (i.e. jar, sources, apidocs) are used to build 
> application Docker images and publish Maven modules into Nexus repository 
> during deploy phase for releases.
> *Expected Behavior*
> When executing a build for a higher goal then the currently highest cached 
> goal, the build extension should skip cached mojo executions, restore the 
> cached artifacts (i.e. jar, javadocs, sources) into the project build 
> directory and run remaining mojo executions for the increment, i.e. javadocs, 
> sources, Docker images between verify -> deploy incremental build. After 
> successful completion, the build cache info should be updated to record the 
> new highest cached goal with incremental mojo executions and artifacts.
> *Current Behavior*
> When executing a build for a higher goal (i.e. deploy) then the currently 
> highest cached goal (i.e. verify), the extension skips cached executions and 
> runs mojos between cached and current goals while missing to restore cached 
> final artifacts into the project build directory. After that, it runs the 
> full build again from the begining to rebuild the artifacts and save build 
> cache. Instead of reducing the build time by reusing already packaged 
> artifacts and executions, it almost doubles the time to re-run the deploy for 
> release from scratch. It also causes the Maven source plugin (3.3.0) to fail 
> due to a duplicate sources artifact error, causing the deploy build to fail.
> *Possible Solution*
> It should be possible to restore cached artifacts into project build 
> directory while avoiding to re-run full build again after restoring already 
> cached mojo executions.
> *Steps to Reproduce*
> 1. Run *mvn clean package -DprojectVersion=1.1.0* from the 
> *tests/java/projects/build-extensions* directory.
> {code:java}
> [INFO] Scanning for projects...
> [INFO] Loading cache configuration from 
> C:\Users\git\igdianov\maven-build-cache-extension\src\test\projects\build-extension\.mvn\maven-build-cache-config.xml
> [INFO] Using XX hash algorithm for cache
> [INFO] 
> [INFO] ---{-}< org.apache.maven.caching.test.simple:simple 
> >{-}
> [INFO] Building simple 0.0.1-SNAPSHOT
> [INFO] from pom.xml
> [INFO] ---{-}[ jar 
> ]{-}
> [INFO] 
> [INFO] — clean:3.2.0:clean (default-clean) @ simple —
> [INFO] Going to calculate checksum for project 
> [groupId=org.apache.maven.caching.test.simple, artifactId=simple]
> [INFO] Scanning plugins configurations to find input files. Probing is 
> enabled, values will be checked for presence in file system
> [INFO] Found 1 input files. Project dir processing: 12, plugins: 3 millis
> [INFO] Project inputs calculated in 30 ms. XX checksum [8e6f2406cb760579] 
> calculated in 15 ms.
> [INFO] Attempting to restore project 
> org.apache.maven.caching.test.simple:simple from build cache
> [INFO] Local build was not found by checksum 8e6f2406cb760579 for 
> org.apache.maven.caching.test.simple:simple
> [INFO]
> [INFO] — resources:3.3.1:resources (default-resources) @ simple —
> [WARNING] Using platform encoding (UTF8 actually) to copy filtered resources, 
> i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory 
> C:\Users\git\igdianov\maven-build-cache-extension\src\test\projects\build-extension\src\main\resources
> [INFO]
> [INFO] — compiler:3.11.0:compile (default-compile) @ simple —
> [INFO] Changes detected - recompiling the module! :source
> [WARNING] File encoding has not been set, usin

[jira] [Commented] (MBUILDCACHE-80) Incremental builds with a higher goal than the highest cached goal is rebuilding the full project from scratch

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


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

ASF GitHub Bot commented on MBUILDCACHE-80:
---

olamy merged PR #128:
URL: https://github.com/apache/maven-build-cache-extension/pull/128




> Incremental builds with a higher goal than the highest cached goal is 
> rebuilding the full project from scratch
> --
>
> Key: MBUILDCACHE-80
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-80
> Project: Maven Build Cache Extension
>  Issue Type: Bug
>Affects Versions: 1.0.1, 1.1.0, 1.2.0
> Environment: Apache Maven 3.9.6 
> (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
> Maven home: C:\Users\sdkman\candidates\maven\current
> Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: 
> C:\Users\sdkman\candidates\java\current
> Default locale: en_US, platform encoding: UTF8
> OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
>Reporter: Igor Dianov
>Assignee: Olivier Lamy
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.2.0
>
>
> We are trying to use the Maven build cache extension on a large multi-module 
> project with ~180 modules by caching builds in the CI workflows to be able to 
> reuse artifacts in the build cache between main and feature branches. The 
> final build artifacts (i.e. jar, sources, apidocs) are used to build 
> application Docker images and publish Maven modules into Nexus repository 
> during deploy phase for releases.
> *Expected Behavior*
> When executing a build for a higher goal then the currently highest cached 
> goal, the build extension should skip cached mojo executions, restore the 
> cached artifacts (i.e. jar, javadocs, sources) into the project build 
> directory and run remaining mojo executions for the increment, i.e. javadocs, 
> sources, Docker images between verify -> deploy incremental build. After 
> successful completion, the build cache info should be updated to record the 
> new highest cached goal with incremental mojo executions and artifacts.
> *Current Behavior*
> When executing a build for a higher goal (i.e. deploy) then the currently 
> highest cached goal (i.e. verify), the extension skips cached executions and 
> runs mojos between cached and current goals while missing to restore cached 
> final artifacts into the project build directory. After that, it runs the 
> full build again from the begining to rebuild the artifacts and save build 
> cache. Instead of reducing the build time by reusing already packaged 
> artifacts and executions, it almost doubles the time to re-run the deploy for 
> release from scratch. It also causes the Maven source plugin (3.3.0) to fail 
> due to a duplicate sources artifact error, causing the deploy build to fail.
> *Possible Solution*
> It should be possible to restore cached artifacts into project build 
> directory while avoiding to re-run full build again after restoring already 
> cached mojo executions.
> *Steps to Reproduce*
> 1. Run *mvn clean package -DprojectVersion=1.1.0* from the 
> *tests/java/projects/build-extensions* directory.
> {code:java}
> [INFO] Scanning for projects...
> [INFO] Loading cache configuration from 
> C:\Users\git\igdianov\maven-build-cache-extension\src\test\projects\build-extension\.mvn\maven-build-cache-config.xml
> [INFO] Using XX hash algorithm for cache
> [INFO] 
> [INFO] ---{-}< org.apache.maven.caching.test.simple:simple 
> >{-}
> [INFO] Building simple 0.0.1-SNAPSHOT
> [INFO] from pom.xml
> [INFO] ---{-}[ jar 
> ]{-}
> [INFO] 
> [INFO] — clean:3.2.0:clean (default-clean) @ simple —
> [INFO] Going to calculate checksum for project 
> [groupId=org.apache.maven.caching.test.simple, artifactId=simple]
> [INFO] Scanning plugins configurations to find input files. Probing is 
> enabled, values will be checked for presence in file system
> [INFO] Found 1 input files. Project dir processing: 12, plugins: 3 millis
> [INFO] Project inputs calculated in 30 ms. XX checksum [8e6f2406cb760579] 
> calculated in 15 ms.
> [INFO] Attempting to restore project 
> org.apache.maven.caching.test.simple:simple from build cache
> [INFO] Local build was not found by checksum 8e6f2406cb760579 for 
> org.apache.maven.caching.test.simple:simple
> [INFO]
> [INFO] — resources:3.3.1:resources (default-resources) @ simple —
> [WARNING] Using platform encoding (UTF8 actually) to copy filtered resources, 
> i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory 
> C:\Users\git\igdianov\maven-build-cache-extension\src\test\projects\build-extension\src\main\resources
> [INFO]
> [INF

[jira] [Closed] (MBUILDCACHE-80) Incremental builds with a higher goal than the highest cached goal is rebuilding the full project from scratch

2024-02-03 Thread Olivier Lamy (Jira)


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

Olivier Lamy closed MBUILDCACHE-80.
---
Resolution: Fixed

> Incremental builds with a higher goal than the highest cached goal is 
> rebuilding the full project from scratch
> --
>
> Key: MBUILDCACHE-80
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-80
> Project: Maven Build Cache Extension
>  Issue Type: Bug
>Affects Versions: 1.0.1, 1.1.0, 1.2.0
> Environment: Apache Maven 3.9.6 
> (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
> Maven home: C:\Users\sdkman\candidates\maven\current
> Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: 
> C:\Users\sdkman\candidates\java\current
> Default locale: en_US, platform encoding: UTF8
> OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
>Reporter: Igor Dianov
>Assignee: Olivier Lamy
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.2.0
>
>
> We are trying to use the Maven build cache extension on a large multi-module 
> project with ~180 modules by caching builds in the CI workflows to be able to 
> reuse artifacts in the build cache between main and feature branches. The 
> final build artifacts (i.e. jar, sources, apidocs) are used to build 
> application Docker images and publish Maven modules into Nexus repository 
> during deploy phase for releases.
> *Expected Behavior*
> When executing a build for a higher goal then the currently highest cached 
> goal, the build extension should skip cached mojo executions, restore the 
> cached artifacts (i.e. jar, javadocs, sources) into the project build 
> directory and run remaining mojo executions for the increment, i.e. javadocs, 
> sources, Docker images between verify -> deploy incremental build. After 
> successful completion, the build cache info should be updated to record the 
> new highest cached goal with incremental mojo executions and artifacts.
> *Current Behavior*
> When executing a build for a higher goal (i.e. deploy) then the currently 
> highest cached goal (i.e. verify), the extension skips cached executions and 
> runs mojos between cached and current goals while missing to restore cached 
> final artifacts into the project build directory. After that, it runs the 
> full build again from the begining to rebuild the artifacts and save build 
> cache. Instead of reducing the build time by reusing already packaged 
> artifacts and executions, it almost doubles the time to re-run the deploy for 
> release from scratch. It also causes the Maven source plugin (3.3.0) to fail 
> due to a duplicate sources artifact error, causing the deploy build to fail.
> *Possible Solution*
> It should be possible to restore cached artifacts into project build 
> directory while avoiding to re-run full build again after restoring already 
> cached mojo executions.
> *Steps to Reproduce*
> 1. Run *mvn clean package -DprojectVersion=1.1.0* from the 
> *tests/java/projects/build-extensions* directory.
> {code:java}
> [INFO] Scanning for projects...
> [INFO] Loading cache configuration from 
> C:\Users\git\igdianov\maven-build-cache-extension\src\test\projects\build-extension\.mvn\maven-build-cache-config.xml
> [INFO] Using XX hash algorithm for cache
> [INFO] 
> [INFO] ---{-}< org.apache.maven.caching.test.simple:simple 
> >{-}
> [INFO] Building simple 0.0.1-SNAPSHOT
> [INFO] from pom.xml
> [INFO] ---{-}[ jar 
> ]{-}
> [INFO] 
> [INFO] — clean:3.2.0:clean (default-clean) @ simple —
> [INFO] Going to calculate checksum for project 
> [groupId=org.apache.maven.caching.test.simple, artifactId=simple]
> [INFO] Scanning plugins configurations to find input files. Probing is 
> enabled, values will be checked for presence in file system
> [INFO] Found 1 input files. Project dir processing: 12, plugins: 3 millis
> [INFO] Project inputs calculated in 30 ms. XX checksum [8e6f2406cb760579] 
> calculated in 15 ms.
> [INFO] Attempting to restore project 
> org.apache.maven.caching.test.simple:simple from build cache
> [INFO] Local build was not found by checksum 8e6f2406cb760579 for 
> org.apache.maven.caching.test.simple:simple
> [INFO]
> [INFO] — resources:3.3.1:resources (default-resources) @ simple —
> [WARNING] Using platform encoding (UTF8 actually) to copy filtered resources, 
> i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory 
> C:\Users\git\igdianov\maven-build-cache-extension\src\test\projects\build-extension\src\main\resources
> [INFO]
> [INFO] — compiler:3.11.0:compile (default-compile) @ simple —
> [INFO] Changes detected - recompiling the module! :source
> [WARNING] File 

[jira] [Assigned] (MBUILDCACHE-80) Incremental builds with a higher goal than the highest cached goal is rebuilding the full project from scratch

2024-02-03 Thread Olivier Lamy (Jira)


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

Olivier Lamy reassigned MBUILDCACHE-80:
---

Assignee: Olivier Lamy

> Incremental builds with a higher goal than the highest cached goal is 
> rebuilding the full project from scratch
> --
>
> Key: MBUILDCACHE-80
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-80
> Project: Maven Build Cache Extension
>  Issue Type: Bug
>Affects Versions: 1.0.1, 1.1.0, 1.2.0
> Environment: Apache Maven 3.9.6 
> (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
> Maven home: C:\Users\sdkman\candidates\maven\current
> Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: 
> C:\Users\sdkman\candidates\java\current
> Default locale: en_US, platform encoding: UTF8
> OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
>Reporter: Igor Dianov
>Assignee: Olivier Lamy
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.2.0
>
>
> We are trying to use the Maven build cache extension on a large multi-module 
> project with ~180 modules by caching builds in the CI workflows to be able to 
> reuse artifacts in the build cache between main and feature branches. The 
> final build artifacts (i.e. jar, sources, apidocs) are used to build 
> application Docker images and publish Maven modules into Nexus repository 
> during deploy phase for releases.
> *Expected Behavior*
> When executing a build for a higher goal then the currently highest cached 
> goal, the build extension should skip cached mojo executions, restore the 
> cached artifacts (i.e. jar, javadocs, sources) into the project build 
> directory and run remaining mojo executions for the increment, i.e. javadocs, 
> sources, Docker images between verify -> deploy incremental build. After 
> successful completion, the build cache info should be updated to record the 
> new highest cached goal with incremental mojo executions and artifacts.
> *Current Behavior*
> When executing a build for a higher goal (i.e. deploy) then the currently 
> highest cached goal (i.e. verify), the extension skips cached executions and 
> runs mojos between cached and current goals while missing to restore cached 
> final artifacts into the project build directory. After that, it runs the 
> full build again from the begining to rebuild the artifacts and save build 
> cache. Instead of reducing the build time by reusing already packaged 
> artifacts and executions, it almost doubles the time to re-run the deploy for 
> release from scratch. It also causes the Maven source plugin (3.3.0) to fail 
> due to a duplicate sources artifact error, causing the deploy build to fail.
> *Possible Solution*
> It should be possible to restore cached artifacts into project build 
> directory while avoiding to re-run full build again after restoring already 
> cached mojo executions.
> *Steps to Reproduce*
> 1. Run *mvn clean package -DprojectVersion=1.1.0* from the 
> *tests/java/projects/build-extensions* directory.
> {code:java}
> [INFO] Scanning for projects...
> [INFO] Loading cache configuration from 
> C:\Users\git\igdianov\maven-build-cache-extension\src\test\projects\build-extension\.mvn\maven-build-cache-config.xml
> [INFO] Using XX hash algorithm for cache
> [INFO] 
> [INFO] ---{-}< org.apache.maven.caching.test.simple:simple 
> >{-}
> [INFO] Building simple 0.0.1-SNAPSHOT
> [INFO] from pom.xml
> [INFO] ---{-}[ jar 
> ]{-}
> [INFO] 
> [INFO] — clean:3.2.0:clean (default-clean) @ simple —
> [INFO] Going to calculate checksum for project 
> [groupId=org.apache.maven.caching.test.simple, artifactId=simple]
> [INFO] Scanning plugins configurations to find input files. Probing is 
> enabled, values will be checked for presence in file system
> [INFO] Found 1 input files. Project dir processing: 12, plugins: 3 millis
> [INFO] Project inputs calculated in 30 ms. XX checksum [8e6f2406cb760579] 
> calculated in 15 ms.
> [INFO] Attempting to restore project 
> org.apache.maven.caching.test.simple:simple from build cache
> [INFO] Local build was not found by checksum 8e6f2406cb760579 for 
> org.apache.maven.caching.test.simple:simple
> [INFO]
> [INFO] — resources:3.3.1:resources (default-resources) @ simple —
> [WARNING] Using platform encoding (UTF8 actually) to copy filtered resources, 
> i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory 
> C:\Users\git\igdianov\maven-build-cache-extension\src\test\projects\build-extension\src\main\resources
> [INFO]
> [INFO] — compiler:3.11.0:compile (default-compile) @ simple —
> [INFO] Changes detected - recompiling the module! :source
> [

[jira] [Closed] (MBUILDCACHE-79) MBUILDCACHE-67 broke the partial restore process

2024-02-03 Thread Olivier Lamy (Jira)


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

Olivier Lamy closed MBUILDCACHE-79.
---
Fix Version/s: 1.2.0
 Assignee: Olivier Lamy
   Resolution: Fixed

> MBUILDCACHE-67 broke the partial restore process
> 
>
> Key: MBUILDCACHE-79
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-79
> Project: Maven Build Cache Extension
>  Issue Type: Bug
>  Components: remote build cache
>Affects Versions: 1.1.0
>Reporter: Amir Hadadi
>Assignee: Olivier Lamy
>Priority: Critical
> Fix For: 1.2.0
>
>
> In MBUILDCACHE-67 a bug was introduced in 
> BuildCacheMojosExecutionStrategy#execute. Due to the bug, after a partial 
> restore from cache all executions that were restored are executed for the 
> second time.
> The bug was introduced by changing:
>  
> {code:java}
> boolean restorable = result.isSuccess() || result.isPartialSuccess();
> boolean restored = result.isSuccess(); // if partially restored need to save 
> increment
> if (restorable) {
>   restored &= restoreProject(result, mojoExecutions, mojoExecutionRunner, 
> cacheConfig);
> } else {
>  for (MojoExecution mojoExecution : mojoExecutions) {{code}
> to:
>  
> {code:java}
> boolean restorable = result.isSuccess() || result.isPartialSuccess();
> boolean restored = result.isSuccess(); // if partially restored need to save 
> increment
> if (restorable) {
> CacheRestorationStatus cacheRestorationStatus =
> restoreProject(result, mojoExecutions, mojoExecutionRunner, cacheConfig);
> restored &= CacheRestorationStatus.SUCCESS == cacheRestorationStatus;
> executeExtraCleanPhaseIfNeeded(cacheRestorationStatus, cleanPhase, 
> mojoExecutionRunner);
> }
> if (!restored) {
> ...{code}
>  
> Since partially restored builds have 
> {code:java}
> restored == false{code}
> The 
> {code:java}
> if (!restored){code}
>  block is always executed, rerunning all the plugins (including the restored 
> ones).



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