You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slawekjaranowski (via GitHub)" <gi...@apache.org> on 2025/05/22 20:20:19 UTC

[PR] Introduce service executors for Cpd, Pdm executors [maven-pmd-plugin]

slawekjaranowski opened a new pull request, #206:
URL: https://github.com/apache/maven-pmd-plugin/pull/206

   Standard mojos and reports have different parent classes, so we need to extract tasks which both will execute.
   
   We cannot use one abstract for both.
   
   


-- 
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] Introduce service executors for CPD, PMD executors [maven-pmd-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #206:
URL: https://github.com/apache/maven-pmd-plugin/pull/206#issuecomment-2905793560

   > LGTM.
   > 
   > I wonder, whether we could merge CpdExecutor + CpdServiceExecutor and PmdExecutor + PmdServiceExecutor and Executor + ServiceExecutor. Having both an "executor" and a "service executor" sounds unnecessary to me...
   
   CpdExecutor/PmdExecutor are use in fokr mode with main static method .... but ServiceExecutor I use a constructor for inject needed components.
   


-- 
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] Introduce service executors for CPD, PMD executors [maven-pmd-plugin]

Posted by "adangel (via GitHub)" <gi...@apache.org>.
adangel commented on code in PR #206:
URL: https://github.com/apache/maven-pmd-plugin/pull/206#discussion_r2104331793


##########
src/main/java/org/apache/maven/plugins/pmd/exec/ServiceExecutor.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * 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.plugins.pmd.exec;
+
+import javax.inject.Provider;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.toolchain.Toolchain;
+import org.apache.maven.toolchain.ToolchainManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Abstract service executor for CPD and PMD.
+ */
+abstract class ServiceExecutor {
+
+    private static final Logger LOG = LoggerFactory.getLogger(PmdExecutor.class);

Review Comment:
   ```suggestion
       private static final Logger LOG = LoggerFactory.getLogger(ServiceExecutor.class);
   ```



-- 
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] Introduce service executors for CPD, PMD executors [maven-pmd-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski merged PR #206:
URL: https://github.com/apache/maven-pmd-plugin/pull/206


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