NutzCN Logo
问答 nuztboot:shade打包失败报错
发布于 2047天前 作者 qq_5336d4bb 5110 次浏览 复制 上一个帖子 下一个帖子
标签:
[ERROR] Failed to execute goal org.nutz.boot:nutzboot-maven-plugin:2.3-SNAPSHOT:shade (default-cli) on project wk-nb-service-sys: Failed to create shaded artifact, project main artifact does not exist. -> [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

24 回复

先执行package

执行了,执行 mvn clean packet没问题 ,执行mvn clean package nutzboot:shade就报上面的代码错


org.nutz.boot
nutzboot-maven-plugin
${nutzboot.version}

版本是2.3-SNAPSHOT
这插件也引入了

是不是插件下载的有问题,我本地仓库里看了,repository\org\nutz\boot\nutzboot-maven-plugin\2.3-SNAPSHOT 下有10个文件,是不是自动下载的的不对,我也试了删除重新下载,还是这么一些

本地可以跑,使用shade打包就报错

mvn clean package 应该会出一个target/XXXX.jar 看看有没有

没有的话本地度跑不了,我的问题是无法打包

是在命令行下执行的吗?

 <plugin>
                <groupId>org.nutz.boot</groupId>
                <artifactId>nutzboot-maven-plugin</artifactId>
                <version>${nutzboot.version}</version>
            </plugin>

用了2.3-SNAPSHOT的,但是到repository\org\nutz\boot\nutzboot-maven-plugin\2.3-SNAPSHOT 下有10个文件,nutzboot-maven-plugin-2.3-20180727.041727-3.jar nutzboot-maven-plugin-2.3-20180727.041727-3.jar.sha1 nutzboot-maven-plugin-2.3-SNAPSHOT.jar 等文件????

idea下和cmd命令行下,都报一个错

[ERROR] Failed to execute goal org.nutz.boot:nutzboot-maven-plugin:2.3-SNAPSHOT:shade (default-cli) on project wk-nb-service-sys: Failed to create shaded artifact, project main artifact does not exist. -> [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

我也是了不用2.3-SNAPSHOT,用2.2.3,也不行

完整输出贴一下

完整的

C:\Users\KX-8500\Desktop\NutzWk>mvn clean package nutzboot:shade
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] NutzWk-NB                                                          [pom]
[INFO] wk-framework                                                       [jar]
[INFO] wk-app                                                             [pom]
[INFO] wk-model                                                           [jar]
[INFO] wk-common                                                          [jar]
[INFO] wk-nb-service-sys                                                  [jar]
[INFO] wk-nb-service-cms                                                  [jar]
[INFO] wk-nb-service-wx                                                   [jar]
[INFO] wk-nb-web-platform                                                 [jar]
[INFO] wk-nb-web-api                                                      [jar]
[INFO] wk-nb-task                                                         [jar]
[INFO] wk-wiki                                                            [pom]
Downloading from nutz-snapshots: http://jfrog.nutz.cn/artifactory/snapshots/org/apache/maven/plugins/maven-metadata.xml
Downloading from nutz-snapshots: http://jfrog.nutz.cn/artifactory/snapshots/org/codehaus/mojo/maven-metadata.xml
Downloading from alimaven: http://maven.aliyun.com/nexus/content/repositories/central/org/codehaus/mojo/maven-metadata.xml
Downloading from alimaven: http://maven.aliyun.com/nexus/content/repositories/central/org/apache/maven/plugins/maven-metadata.xml
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/repositories/central/org/apache/maven/plugins/maven-metadata.xml (14 kB at 22 kB/s)
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/repositories/central/org/codehaus/mojo/maven-metadata.xml (20 kB at 25 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] NutzWk-NB 5.0.7 .................................... SKIPPED
[INFO] wk-framework ....................................... SKIPPED
[INFO] wk-app ............................................. SKIPPED
[INFO] wk-model ........................................... SKIPPED
[INFO] wk-common .......................................... SKIPPED
[INFO] wk-nb-service-sys .................................. SKIPPED
[INFO] wk-nb-service-cms .................................. SKIPPED
[INFO] wk-nb-service-wx ................................... SKIPPED
[INFO] wk-nb-web-platform ................................. SKIPPED
[INFO] wk-nb-web-api ...................................... SKIPPED
[INFO] wk-nb-task ......................................... SKIPPED
[INFO] wk-wiki 5.0.7 ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.437 s
[INFO] Finished at: 2018-08-20T16:05:42+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'nutzboot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (D:\zc\repository), nutz-snapshots (http://jfrog.nutz.cn/artifactory/snapshots), alimaven (http://maven.aliyun.com/nexus/content/repositories/central/)] -> [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/NoPluginFoundForPrefixException

当然不行啦, 要在具体的service/web下面执行的

如果把nutzboot:shade去掉,运行mvn clean package是对的 ,我怀疑nutzboot-maven-plugin插件没有安装正确
我本地仓库里居然有以下的10个文件?????
_remote.repositories
maven-metadata-nutz-snapshots.xml
maven-metadata-nutz-snapshots.xml.sha1
nutzboot-maven-plugin-2.3-20180727.041727-3.jar
nutzboot-maven-plugin-2.3-20180727.041727-3.jar.sha1
nutzboot-maven-plugin-2.3-20180727.041727-3.pom
nutzboot-maven-plugin-2.3-20180727.041727-3.pom.sha1
nutzboot-maven-plugin-2.3-SNAPSHOT.jar
nutzboot-maven-plugin-2.3-SNAPSHOT.pom
resolver-status.properties

original-wk-nb-service-sys-5.0.7.jar 是不是对了

直接在idea里nutzboot:shade也报错解决

不是这个意思, nutzboot:shade会找package生成的jar, 而生成jar是需要pom.xml里面写<package>jar</package>, 对应parent项目, 是不满足这个条件的,所以报错

你得cd到具体的service模块里面执行nutzboot:shade

wk-app是一个pom

要cd到 wk-app\wk-nb-service-sys\ 里面执行nutzboot:shade

嗯,现在行可以打包了

请问怎么部署

添加回复
请先登陆
回到顶部