欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

安装thingsboard遇到的错误

程序员文章站 2022-07-14 08:57:33
...

1、
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:npm (npm build) on project ui: Failed to run task: 'npm run build' failed. (error code 2) -> [Help 1]
输入mvn -e查看详细异常:

[ERROR] No goals have been specified for this build. 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 ph
ases 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-c
ompile, 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]
org.apache.maven.lifecycle.NoGoalSpecifiedException: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<pl
ugin-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-t
est-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-sit
e, site, post-site, site-deploy.

第一个错误尝试改进
目前对源代码文件的修改:
1、首先是改了三个pom.xml文件中的node和npm版本
2、在ui根目录下pom.xml文件中添加了compile
3、在thingsboard根目录下pom.xml文件中添加了插件,使用无测试运行。

改进摸索
1、修改maven setting文件,不使用淘宝镜像,使用默认镜像。

在thingsboard编译时刚再一次看安装文档,好像是呼吁Server UI错误,但是文档中的四个原因都是install,而我报错是因为build。

改完镜像之后报错:Plugin org.apache.maven.plugins:maven-surefire-plugin:2.19.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.19.1: Could not trans fer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.19.1 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2 .19.1/maven-surefire-plugin-2.19.1.pom: Unknown host 杩欐槸鍦ㄤ富鏈哄悕瑙f瀽鏃堕?氬父鍑虹幇鐨勬殏鏃堕敊璇紝瀹冩剰鍛崇潃鏈湴鏈嶅姟鍣ㄦ病鏈変粠鏉冨▉鏈嶅姟鍣ㄤ笂鏀跺埌鍝嶅簲銆? (repo.maven.apache.org) -> [Help 1]

PluginResolutionException

将镜像改为阿里官方镜像,又出现npm run build错误

<mirror>
      <id>aliyunmaven</id>
      <mirrorOf>*</mirrorOf>
      <name>阿里云公共仓库</name>
      <url>https://maven.aliyun.com/repository/public</url> 
</mirror>

试试改为

 <mirror>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <url>http://repo1.maven.org/maven2/</url>
            <mirrorOf>central</mirrorOf>
    </mirror>
    
     <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>

还是编译失败
用下面这个仓库

 <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>

编译失败:

 Failed to execute goal on project rule-engine-components: Could not resolve dependencies for project org.thingsboard.rule-engine:rule-engine-components:jar:2.4.3: The following artifacts could not be resolved: com.amazonaws:
aws-java-sdk-core:jar:1.11.323, com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.6.7, joda-time:joda-time:jar:2.8.1, com.amazonaws:jmespath-java:jar:1.11.323, com.google.protobuf:protobuf-java-util:jar:3.7.1, com.googl
e.api:gax-grpc:jar:1.47.1, io.grpc:grpc-auth:jar:1.22.1, org.threeten:threetenbp:jar:1.3.3, com.google.auth:google-auth-library-oauth2-http:jar:0.16.2, com.google.http-client:google-http-client-jackson2:jar:1.30.1, io.grpc:grpc-alts
:jar:1.22.1, io.grpc:grpc-grpclb:jar:1.22.1, io.grpc:grpc-core:jar:1.22.1, com.google.android:annotations:jar:4.1.1.4, io.perfmark:perfmark-api:jar:0.16.0, io.opencensus:opencensus-contrib-grpc-metrics:jar:0.21.0, io.grpc:grpc-netty
-shaded:jar:1.22.1, com.google.api.grpc:proto-google-cloud-pubsub-v1:jar:1.65.0, com.google.api:api-common:jar:1.8.1, com.google.api.grpc:grpc-google-cloud-pubsub-v1:jar:1.65.0, io.grpc:grpc-stub:jar:1.22.1, io.grpc:grpc-api:jar:1.2
2.1, io.grpc:grpc-context:jar:1.22.1, org.codehaus.mojo:animal-sniffer-annotations:jar:1.17, io.grpc:grpc-protobuf:jar:1.22.1, io.grpc:grpc-protobuf-lite:jar:1.22.1, com.google.api.grpc:proto-google-common-protos:jar:1.16.0, com.rab
bitmq:amqp-client:jar:4.8.0, org.bouncycastle:bcpkix-jdk15on:jar:1.56, org.locationtech.spatial4j:spatial4j:jar:0.7, org.locationtech.jts:jts-core:jar:1.15.0: Could not transfer artifact com.amazonaws:aws-java-sdk-core:jar:1.11.323
from/to central (http://repo1.maven.org/maven2/): Transfer failed for http://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.323/aws-java-sdk-core-1.11.323.jar 501 HTTPS Required -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :rule-engine-components

重启再次编译报错

[ERROR] Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.8:invoke (default) on project http: Execution default of goal org.fortasoft:gradle-maven-plugin:1.0.8:invoke failed: Plugin org.fortasoft:gradle-maven-plugin:1.0.8
 or one of its dependencies could not be resolved: Failed to collect dependencies at org.fortasoft:gradle-maven-plugin:jar:1.0.8 -> org.gradle:gradle-tooling-api:jar:2.13: Failed to read artifact descriptor for org.gradle:gradle-too
ling-api:jar:2.13: Could not transfer artifact org.gradle:gradle-tooling-api:pom:2.13 from/to gradle (http://repo.gradle.org/gradle/libs-releases-local/): Authorization failed for http://repo.gradle.org/gradle/libs-releases-local/or
g/gradle/gradle-tooling-api/2.13/gradle-tooling-api-2.13.pom 403 Forbidden -> [Help 1]

换为淘宝镜像,然后使用将ui ->中的<defaultGoal>compile</defaultGoal>删掉,再试。

 BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:14 min
[INFO] Finished at: 2020-07-10T11:46:44+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:npm (npm build) on project ui: Failed to run task: 'npm run build' failed. (error code 2) -> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :ui

换为淘宝镜像回到最原始的错误npm run build failded

切换到thingsboard3.0分支

下载资源卡住,关机重启
然后npm镜像和node镜像,
安装thingsboard遇到的错误
然后再taskkill /f /im /java.exe ,然后再clean,再进行编译。

相关标签: 物联网平台

上一篇: List

下一篇: list