NutzCN Logo
问答 服务器上无法运行 nutxboot jar包
发布于 2144天前 作者 daydayup 1607 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

java -Xmx512m -Xms512m -jar wk-nb-service-sys-5.0.1-SNAPSHOT.jar

报这个错
no main manifest attribute, in wk-nb-service-sys-5.0.1-SNAPSHOT.jar

8 回复

打包错误

mvn clean package nutzboot:shade

[INFO] [INFO] --- nutzboot-maven-plugin:2.2-SNAPSHOT:shade (default-cli) @ wk-nb-service-sys ---
SLF4J: The requested version 1.5.6 by your slf4j binding is not compatible with [1.6, 1.7]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.

/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java "-Dmaven.home=/Applications/IntelliJ IDEA 15.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA 15.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" -Didea.launcher.port=7534 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 15.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA 15.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.4.jar:/Applications/IntelliJ IDEA 15.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=15.0.2 org.nutz.boot:nutzboot-maven-plugin:2.2-SNAPSHOT:shade
[INFO] Scanning for projects...
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-parent/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-parent/2.2-SNAPSHOT/maven-metadata.xml (579 B at 2.2 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/boot/nutzboot-maven-plugin/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/boot/nutzboot-maven-plugin/2.2-SNAPSHOT/maven-metadata.xml (973 B at 6.9 KB/sec)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Building wk-nb-service-sys 5.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/wk-framework/5.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/wk-framework/5.0.1-SNAPSHOT/maven-metadata.xml (753 B at 5.4 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/wk-parent/5.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/wk-parent/5.0.1-SNAPSHOT/maven-metadata.xml (576 B at 3.3 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-nutz-dao/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-nutz-dao/2.2-SNAPSHOT/maven-metadata.xml (2 KB at 7.9 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter/2.2-SNAPSHOT/maven-metadata.xml (580 B at 4.0 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-daocache/1.r.66-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-daocache/1.r.66-SNAPSHOT/maven-metadata.xml (980 B at 6.9 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzmore/1.r.66-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzmore/1.r.66-SNAPSHOT/maven-metadata.xml (576 B at 4.0 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz/1.r.66-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz/1.r.66-SNAPSHOT/maven-metadata.xml (2 KB at 7.9 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-core/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-core/2.2-SNAPSHOT/maven-metadata.xml (2 KB at 8.2 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/app/wk-model/5.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/app/wk-model/5.0.1-SNAPSHOT/maven-metadata.xml (753 B at 5.3 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/app/wk-app/5.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/app/wk-app/5.0.1-SNAPSHOT/maven-metadata.xml (577 B at 3.6 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/app/wk-code-generator-nb/5.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/app/wk-code-generator-nb/5.0.1-SNAPSHOT/maven-metadata.xml (762 B at 5.4 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/app/wk-common/5.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/cn/wizzer/app/wk-common/5.0.1-SNAPSHOT/maven-metadata.xml (751 B at 4.4 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-dubbo/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-dubbo/2.2-SNAPSHOT/maven-metadata.xml (2 KB at 8.3 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-dubbo/1.r.66-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-dubbo/1.r.66-SNAPSHOT/maven-metadata.xml (981 B at 6.4 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-jdbc/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-jdbc/2.2-SNAPSHOT/maven-metadata.xml (2 KB at 8.2 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-redis/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-redis/2.2-SNAPSHOT/maven-metadata.xml (2 KB at 8.3 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-jedis/1.r.66-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-jedis/1.r.66-SNAPSHOT/maven-metadata.xml (981 B at 6.7 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-wkcache/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-wkcache/2.2-SNAPSHOT/maven-metadata.xml (2 KB at 7.9 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-wkcache/1.r.66-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-wkcache/1.r.66-SNAPSHOT/maven-metadata.xml (979 B at 6.7 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-test-junit4/2.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-test-junit4/2.2-SNAPSHOT/maven-metadata.xml (2 KB at 8.2 KB/sec)
[INFO] [INFO] --- nutzboot-maven-plugin:2.2-SNAPSHOT:shade (default-cli) @ wk-nb-service-sys ---
SLF4J: The requested version 1.5.6 by your slf4j binding is not compatible with [1.6, 1.7]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
[ERROR] The project main artifact does not exist. This could have the following
[ERROR] reasons:
[ERROR] - You have invoked the goal directly from the command line. This is not
[ERROR] supported. Please add the goal to the default lifecycle via an
[ERROR] element in your POM and use "mvn package" to have it run.
[ERROR] - You have bound the goal to a lifecycle phase before "package". Please
[ERROR] remove this binding from your POM such that the goal will be run in
[ERROR] the proper phase.
[ERROR] - You removed the configuration of the maven-jar-plugin that produces the main artifact.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.180s
[INFO] Finished at: Wed Jun 06 19:08:18 CST 2018
[INFO] Final Memory: 12M/125M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.nutz.boot:nutzboot-maven-plugin:2.2-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

Process finished with exit code 1

那是一个完整的命令,不能只执行nutzboot:shade

plugin加上这段, 执行package的时候能把shade也一起执行,方便一些,

            <executions>
                 <execution>
                     <phase>package</phase>
                     <goals>
                        <goal>shade</goal>
                     </goals>
                 </execution>
             </executions>

目前最新版本号5.0.4,修复了一些问题建议升级

来自 iPhone 6

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