说来恼火,在网上找了半天没找到

  原来插件名称其实不需要定义而是直接想象到的,如下,我尝试过了好几种

  mvn plugin:goal 都没成功;从代码看goal已经没啥疑问了,就是compile,但哪个是plugin呢?

  protobuf
  protobuf
  protobuf
  protobuf
  
  <plugins>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.5.1</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:3.5.1-1:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.11.0:exe:${os.detected.classifier}</pluginArtifact>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

  所以只需要执行 mvn protobuf : compile 就行了

  但为什么maven没有把插件名称用元数据表示呢?

相关文章:

  • 2022-12-23
  • 2022-02-05
  • 2021-05-22
  • 2022-02-13
  • 2022-02-25
  • 2022-01-08
  • 2021-11-10
猜你喜欢
  • 2021-05-02
  • 2021-07-19
  • 2021-11-18
  • 2021-09-16
  • 2022-12-23
  • 2021-10-10
相关资源
相似解决方案