You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "cstamas (via GitHub)" <gi...@apache.org> on 2024/11/20 14:22:52 UTC
[PR] Introduce proto session [maven]
cstamas opened a new pull request, #1929:
URL: https://github.com/apache/maven/pull/1929
And make use of it in CLIng. Also, move from "late" Resolver session factory to "early" CLIng invocation of PropertyContributors and make their contribution visible in whole Maven, not only Resolver.
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8385] Introduce proto session [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1929:
URL: https://github.com/apache/maven/pull/1929#issuecomment-2489359658
Dropped two files, locally is ok, let see ITs and merge
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8385] Introduce proto session [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1929:
URL: https://github.com/apache/maven/pull/1929#discussion_r1850832511
##########
its/core-it-suite/src/test/resources/mng-8385/spi-extension/.mvn/placeholder.txt:
##########
Review Comment:
It should be unneeded, since you added `root="true"` on the pom.
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8385] Introduce proto session [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1929:
URL: https://github.com/apache/maven/pull/1929#discussion_r1850835090
##########
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/spi/PropertyContributorsHolder.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.cling.invoker.spi;
+
+import java.util.Map;
+
+import org.apache.maven.api.di.Inject;
+import org.apache.maven.api.di.Named;
+import org.apache.maven.api.spi.PropertyContributor;
+
+/**
+ * Hack: to circumvent sisu/plexus/di stuff.
Review Comment:
I really need to investigate what's the problem here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8385] Introduce proto session [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #1929:
URL: https://github.com/apache/maven/pull/1929
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8385] Introduce proto session [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1929:
URL: https://github.com/apache/maven/pull/1929#discussion_r1850834371
##########
api/maven-api-spi/src/main/java/org/apache/maven/api/spi/PropertyContributor.java:
##########
@@ -38,6 +40,19 @@ public interface PropertyContributor extends SpiService {
* Invoked just before session is created with a mutable map that carries collected user properties so far.
*
* @param userProperties The mutable user properties, never {@code null}.
+ * @see #contribute(ProtoSession)
*/
- void contribute(Map<String, String> userProperties);
+ default void contribute(Map<String, String> userProperties) {}
Review Comment:
Glad we keep compatibility somehow !
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8385] Introduce proto session [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1929:
URL: https://github.com/apache/maven/pull/1929#discussion_r1850831759
##########
its/core-it-suite/src/test/resources/mng-8385/spi-extension/src/main/resources/META-INF/maven/org.apache.maven.api.di.Inject:
##########
@@ -0,0 +1 @@
+org.apache.maven.its.mng8385.CustomPropertyContributor
Review Comment:
That one should be automatically generated if you compile with enabled annotation processors.
See https://github.com/apache/maven/blob/master/api/maven-api-di/src/main/java/org/apache/maven/di/tool/DiIndexProcessor.java
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org