【dubbo】Dubbo项目编译失败

一、问题描述

[ERROR] Unknown lifecycle phase "packagaes". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/LifecyclePhaseNotFoundException
Plugin 'org.codehaus.mojo:build-helper-maven-plugin:' not found
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1:compile (default) on project protobuf-provider: Missing:
[ERROR] ----------
[ERROR] 1) com.google.protobuf:protoc:exe:osx-aarch_64:3.7.1
[ERROR] 
[ERROR]   Try downloading the file manually from the project website.
[ERROR] 
[ERROR]   Then, install it using the command: 
[ERROR]       mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.7.1 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file
[ERROR] 
[ERROR]   Alternatively, if you host your own repository you can deploy the file there: 
[ERROR]       mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.7.1 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR]   Path to dependency: 
[ERROR]         1) org.apache.dubbo:protobuf-provider:jar:1.0-SNAPSHOT
[ERROR]         2) com.google.protobuf:protoc:exe:osx-aarch_64:3.7.1
[ERROR] 
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR] 
[ERROR] for artifact: 
[ERROR]   org.apache.dubbo:protobuf-provider:jar:1.0-SNAPSHOT
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR]   apache.snapshots.https (https://repository.apache.org/content/repositories/snapshots, releases=false, snapshots=true),
[ERROR]   sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, releases=false, snapshots=true),
[ERROR]   central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :protobuf-provider

二、问题解决

protobuf 报错 Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.X.X:compile

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Dubbo是一个分布式服务框架,可以帮助我们快速构建高性能、可扩展的分布式应用。下面是一个简单的Dubbo项目搭建的步骤: 1. 创建Maven项目:首先,在你的IDE中创建一个新的Maven项目。 2. 添加Dubbo依赖:在项目的pom.xml文件中添加Dubbo的依赖。示例代码如下: ```xml <dependencies> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-spring-boot-starter</artifactId> <version>2.7.12</version> </dependency> </dependencies> ``` 3. 配置Dubbo服务提供者:创建一个Java类作为Dubbo服务提供者,并在类上添加Dubbo的注解。示例代码如下: ```java import org.apache.dubbo.config.annotation.DubboService; @DubboService public class DemoServiceImpl implements DemoService { // 实现接口方法 } ``` 4. 配置Dubbo服务消费者:创建一个Java类作为Dubbo服务消费者,并在类上添加Dubbo的注解。示例代码如下: ```java import org.apache.dubbo.config.annotation.DubboReference; public class DemoConsumer { @DubboReference private DemoService demoService; // 调用远程服务方法 } ``` 5. 配置Dubbo注册中心:在项目的配置文件中配置Dubbo的注册中心,比如Zookeeper。示例配置如下: ```properties # dubbo.registry.address指定注册中心地址 dubbo.registry.address=zookeeper://127.0.0.1:2181 ``` 6. 运行项目:启动Dubbo服务提供者和消费者,通过Dubbo的注册中心进行服务的注册和发现。 以上是一个简单的Dubbo项目搭建的步骤,具体可以根据你的实际需求进行相应的配置和调整。希望对你有所帮助!如有更多问题,请继续提问。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值