This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new 3fb896b11 [CELEBORN-666] Define `protobuf-maven-plugin` in the root 
pom.xml
3fb896b11 is described below

commit 3fb896b11f8df32b32279405974a0d2b61c73faf
Author: Fu Chen <cfmcgr...@gmail.com>
AuthorDate: Mon Jun 12 19:46:46 2023 +0800

    [CELEBORN-666] Define `protobuf-maven-plugin` in the root pom.xml
    
    ### What changes were proposed in this pull request?
    
    Define `protobuf-maven-plugin` in the root pom.xml
    
    ### Why are the changes needed?
    
    to fix
    
    ```bash
    build/mvn protobuf:compile -am -pl common
    ```
    
    ```
    [ERROR] No plugin found for prefix 'protobuf' in the current project and in 
the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from 
the repositories [local (/Users/fchen/.m2/repository), apache.snapshots 
(https://repository.apache.org/snapshots), central 
(https://repo.maven.apache.org/maven2)] -> [Help 1]
    org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin 
found for prefix 'protobuf' in the current project and in the plugin groups 
[org.apache.maven.plugins, org.codehaus.mojo] available from the repositories 
[local (/Users/fchen/.m2/repository), apache.snapshots 
(https://repository.apache.org/snapshots), central 
(https://repo.maven.apache.org/maven2)]
        at 
org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve 
(DefaultPluginPrefixResolver.java:95)
        at 
org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix 
(MojoDescriptorCreator.java:266)
        at 
org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor 
(MojoDescriptorCreator.java:220)
        at 
org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments
 (DefaultLifecycleTaskSegmentCalculator.java:104)
        at 
org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments
 (DefaultLifecycleTaskSegmentCalculator.java:83)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:89)
        at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:298)
        at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
        at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
        at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
        at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
        at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
        at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke (Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:282)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:225)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:406)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:347)
    [ERROR]
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, 
please read the following articles:
    [ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    tested locally.
    
    Closes #1579 from cfmcgrady/protobuf-plugin.
    
    Authored-by: Fu Chen <cfmcgr...@gmail.com>
    Signed-off-by: Cheng Pan <cheng...@apache.org>
---
 common/pom.xml | 17 -----------------
 master/pom.xml | 17 -----------------
 pom.xml        | 22 ++++++++++++++++++++++
 3 files changed, 22 insertions(+), 34 deletions(-)

diff --git a/common/pom.xml b/common/pom.xml
index b11338829..c9b0c5293 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -142,23 +142,6 @@
       <plugin>
         <groupId>org.xolstice.maven.plugins</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
-        <version>${maven.plugin.protobuf.version}</version>
-        <extensions>true</extensions>
-        <configuration>
-          <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
-          
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
-          <pluginId>grpc-java</pluginId>
-          
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
-        </configuration>
-        <executions>
-          <execution>
-            <id>compile-protoc</id>
-            <goals>
-              <goal>compile</goal>
-              <goal>compile-custom</goal>
-            </goals>
-          </execution>
-        </executions>
       </plugin>
     </plugins>
     <extensions>
diff --git a/master/pom.xml b/master/pom.xml
index 5e0dd78da..0f9abb0a3 100644
--- a/master/pom.xml
+++ b/master/pom.xml
@@ -103,23 +103,6 @@
       <plugin>
         <groupId>org.xolstice.maven.plugins</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
-        <version>${maven.plugin.protobuf.version}</version>
-        <extensions>true</extensions>
-        <configuration>
-          <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
-          
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
-          <pluginId>grpc-java</pluginId>
-          
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
-        </configuration>
-        <executions>
-          <execution>
-            <id>compile-protoc</id>
-            <goals>
-              <goal>compile</goal>
-              <goal>compile-custom</goal>
-            </goals>
-          </execution>
-        </executions>
       </plugin>
     </plugins>
     <extensions>
diff --git a/pom.xml b/pom.xml
index c919d3825..4db589447 100644
--- a/pom.xml
+++ b/pom.xml
@@ -479,6 +479,28 @@
           </executions>
         </plugin>
 
+        <plugin>
+          <groupId>org.xolstice.maven.plugins</groupId>
+          <artifactId>protobuf-maven-plugin</artifactId>
+          <version>${maven.plugin.protobuf.version}</version>
+          <extensions>true</extensions>
+          <configuration>
+            <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
+            
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+            <pluginId>grpc-java</pluginId>
+            
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
+          </configuration>
+          <executions>
+            <execution>
+              <id>compile-protoc</id>
+              <goals>
+                <goal>compile</goal>
+                <goal>compile-custom</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-clean-plugin</artifactId>

Reply via email to