NutzCN Logo
问答 nutzwk 5.06 部署问题
发布于 12天前 作者 qq_856b85c9 135 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

首先在根目录已执行 mvn install
然后IDEA右侧展开 Maven Projects,先编译,后打包
然后接着执行mvn clean package install -Dmaven.test.skip=true
这些都成功了,中间我把wk-nb-web-platform的pom文件中的javadoc有过报错,也已经将doclint给处理了
然后执行mvn clean package nutzboot:shade nutzboot:war
提示除了下述错误

D:\Project\HOME>mvn clean package nutzboot:shade nutzboot:war
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for or cn.wizzer.app:wk-:wk-nb-web-platform:jar:5.0.6
[WARNING] '] 'build.plugins.plugin.(gr.(groupId:artifactId)' must be unique but found duplicate declaration of plugin in org.apache.maven.plugins:mav:maven-javadoc-plugin @  @ cn.wizzer.app:wk-:wk-nb-web-platform:[unknown-ve
rsion], D:\Project\HOME\wk-app\wk-nb-web-platform\rm\pom.xml, li, line 204, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] NutzWk-NB
[INFO] wk-framework
[INFO] wk-app
[INFO] wk-model
[INFO] wk-common
[INFO] wk-nb-service-sys
[INFO] wk-nb-service-cms
[INFO] wk-nb-service-wx
[INFO] wk-nb-web-platform
[INFO] wk-nb-web-api
[INFO] wk-nb-task
[INFO] wk-nb-service-cai
[INFO] wk-wiki
Downloading: g: http://jfrog.nutz.cn/artifactory/snapshots/org/codehaus/mojo/maven-metadata.xml
Dow
Downloading: g: http://jfrog.nutz.cn/artifactory/snapshots/org/apache/maven/plugins/maven-metadata.xml
Dow
Downloading: g: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
Dow
Downloading: g: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
Dow
Downloaded: d: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml (10 (10 KB at 6.5 KB/sec)
Downloaded: d: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml (21 (21 KB at 13.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] NutzWk-NB .......................................... 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-nb-service-cai .................................. SKIPPED
[INFO] wk-wiki ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.076 s
[INFO] Finished at: 2018-10-09T17:55:27+08:00
[INFO] Final Memory: 17M/245M
[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 (C:\Users\Administrator\
.m2\repository), nutz-snapshots (http://jfrog.nutz.cn/artifactory/snapshots), nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public)] -> [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

D:\Project\HOME>
22 回复
mvn -U clean package nutzboot:shade

nutzwk以jar部署为主, war形式基本上不会用到

那我启动之前所打的jar包,用
javaw jar -Xmx512m -Xms512m -Dnutz.profiles.active=prod -jar sys.jar
没有任何的反应,而且也没有向zookeeper中注入服务,是哪里出问题了么

java -Xmx512m -Xms512m -Dnutz.profiles.active=prod -jar sys.jar

你写的是 javaw jar 是什么鬼

这个打错了,是java jar -Xmx512m -Xms512m -Dnutz.profiles.active=prod -jar sys.jar
然后就是
Error: Could not find or load main class jar

看看sys.jar的大小,感觉你用错jar包了

会生成2个jar, 大的才是

生成了三个包,一个是sys-5.06.jar
一个是sys-5.06-javadoc.jar
一个是sys-5.06-sources.jar

我用的是第一个

那不对,你打包的命令用了啥???

我在最上面有写我的命令

mvn -U clean package nutzboot:shade

这个

使用这个就出错

[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 (C:\Users\Administrator\
.m2\repository), nutz-snapshots (http://jfrog.nutz.cn/artifactory/snapshots), nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public)] -> [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]

还有就是\org\nutz\nutzboot-parent\2.2-SNAPSHOT 里面这个包怎么也下不下来

我知道了, 版本问题
根据这个提交改一下根pom.xml就好了 https://github.com/Wizzercn/NutzWk/commit/632388f266792ebea47e88a5e8cc4722687f7464

我按照这个改了

<properties>
    <nutzboot.version>2.3-SNAPSHOT</nutzboot.version>
    <nutz.version>1.r.67-SNAPSHOT</nutz.version>
    <poi.version>3.17</poi.version>
    <zkclient.version>0.10</zkclient.version>
    <druid.version>1.1.10</druid.version>
    <mysql-connector-java.version>5.1.46</mysql-connector-java.version>
    <docker.image.prefix>nutzboot</docker.image.prefix>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

然后还是有问题
[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 (C:\Users\Administrator\
.m2\repository), nutz-snapshots (http://jfrog.nutz.cn/artifactory/snapshots), nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public)] -> [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]

打开那个链接?? 是加入

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

能不能发一个\org\nutz\nutzboot-parent\2.2-SNAPSHOT 文件夹里的内容给我

按照这个执行了之后然后执行java jar -Xmx512m -Xms512m -Dnutz.profiles.active=prod -jar sys.jar
就报错误信息 sys.jar中没有主清单属性

不可能呀,把mvn输出日志完整贴一下吧

要你不下载nutzwk最新的代码来试一下吧,本应很简单的

之前的版本是先跟目录下install,然后到各个有main方法的模块进行package 和nutzboot:shade,jar包大小一般都在10mb以上(含依赖)

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