- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 Arch Linux 和 jdk 版本 9 以及 apache Maven 3.5.2
我点击了这个链接 https://console.bluemix.net/docs/runtimes/liberty/getting-started.html#getting-started-tutorial设置应用程序。
但是当我运行命令时
mvn clean install
我搜索了错误中提供的链接,但没有帮助。我还用谷歌搜索了与我的错误类似的东西,但没有得到解决。我对这些东西很陌生。请有人为此提供解决方案。
按照建议,我通过提供 -X
和 -e
mvn 中的命令和那些错误在下面
mnv -e :
[shivam@shivam get-started-java]$ mvn -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.191 s
[INFO] Finished at: 2017-12-15T08:44:39+05:30
[INFO] Final Memory: 5M/20M
[INFO] ------------------------------------------------------------------------
[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 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]
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>[:<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.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:94)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[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/NoGoalSpecifiedException
然后运行 mvn-X
[shivam@shivam ~]$ mvn -X
Apache Maven 3.5.2 (NON-CANONICAL_2017-10-25T13:09:52+03:00_root; 2017-10-25T15:39:52+05:30)
Maven home: /opt/maven
Java version: 9, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-9-openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.14.3-1-arch", arch: "amd64", family: "unix"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.annotation.* < plexus.core
[DEBUG] Imported: javax.enterprise.inject.* < plexus.core
[DEBUG] Imported: javax.enterprise.util.* < plexus.core
[DEBUG] Imported: javax.inject.* < plexus.core
[DEBUG] Imported: org.apache.maven.* < plexus.core
[DEBUG] Imported: org.apache.maven.artifact < plexus.core
[DEBUG] Imported: org.apache.maven.classrealm < plexus.core
[DEBUG] Imported: org.apache.maven.cli < plexus.core
[DEBUG] Imported: org.apache.maven.configuration < plexus.core
[DEBUG] Imported: org.apache.maven.exception < plexus.core
[DEBUG] Imported: org.apache.maven.execution < plexus.core
[DEBUG] Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG] Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG] Imported: org.apache.maven.model < plexus.core
[DEBUG] Imported: org.apache.maven.monitor < plexus.core
[DEBUG] Imported: org.apache.maven.plugin < plexus.core
[DEBUG] Imported: org.apache.maven.profiles < plexus.core
[DEBUG] Imported: org.apache.maven.project < plexus.core
[DEBUG] Imported: org.apache.maven.reporting < plexus.core
[DEBUG] Imported: org.apache.maven.repository < plexus.core
[DEBUG] Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG] Imported: org.apache.maven.settings < plexus.core
[DEBUG] Imported: org.apache.maven.toolchain < plexus.core
[DEBUG] Imported: org.apache.maven.usability < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG] Imported: org.codehaus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.* < plexus.core
[DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.component < plexus.core
[DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG] Imported: org.codehaus.plexus.container < plexus.core
[DEBUG] Imported: org.codehaus.plexus.context < plexus.core
[DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG] Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG] Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG] Imported: org.eclipse.aether.* < plexus.core
[DEBUG] Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG] Imported: org.eclipse.aether.collection < plexus.core
[DEBUG] Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG] Imported: org.eclipse.aether.graph < plexus.core
[DEBUG] Imported: org.eclipse.aether.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.installation < plexus.core
[DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG] Imported: org.eclipse.aether.repository < plexus.core
[DEBUG] Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG] Imported: org.eclipse.aether.spi < plexus.core
[DEBUG] Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG] Imported: org.eclipse.aether.version < plexus.core
[DEBUG] Imported: org.fusesource.jansi.* < plexus.core
[DEBUG] Imported: org.slf4j.* < plexus.core
[DEBUG] Imported: org.slf4j.helpers.* < plexus.core
[DEBUG] Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Message scheme: color
[DEBUG] Message styles: debug info warning error success failure strong mojo project
[DEBUG] Reading global settings from /opt/maven/conf/settings.xml
[DEBUG] Reading user settings from /home/shivam/.m2/settings.xml
[DEBUG] Reading global toolchains from /opt/maven/conf/toolchains.xml
[DEBUG] Reading user toolchains from /home/shivam/.m2/toolchains.xml
[DEBUG] Using local repository at /home/shivam/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/shivam/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.110 s
[INFO] Finished at: 2017-12-15T08:47:52+05:30
[INFO] Final Memory: 6M/21M
[INFO] ------------------------------------------------------------------------
[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 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]
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>[:<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.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:94)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[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/NoGoalSpecifiedException
如上所述,我使用的是 jdk 版本 9。
最佳答案
我对这个话题做了很多研究。而我查到的结果是java和maven的版本不兼容导致了这个问题。目前我使用的是 jdk 版本 9。这个问题的解决方案可能是将默认的 jdk 版本更改为 jdk 8
关于java - arch linux 中的 mvn clean install 产生许多错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47818469/
我正在为我的项目使用 Maven。如果我的项目不使用某些本地资源,这不是问题。 以便我遵循本指南 https://stackoverflow.com/a/61576687/6720896 将我的本地
今天我尝试通过 Maven 使用 site 命令生成报告,在编译阶段遇到了问题。 错误: ParseException in /Users/rajesh/Documents/workspace/mob
这个问题已经有答案了: Mvn install or Mvn package (8 个回答) 已关闭 6 年前。 我是一名新开发人员,一生中从未使用过 eclipse 或 java,我正在尝试做一些事
我知道mvn:package可以用来生成JAR或WAR,mvn:assemble有什么区别吗? 最佳答案 他们是完全不同的。 “package”是一个简单的命令,用于简单/单个项目,您只需创建一个 j
我正在使用 Maven 运行单个测试。 以这两种方式运行它的区别是: mvn -Dtest=DatabaseTest test mvn -Dtest=DatabaseTest surefire:tes
我已经从 svn checkout 了一个项目。我正在尝试使用 Maven 构建项目。 使用 mvn 编译可以很好地构建。 当我尝试命令 mvn package 时,出现以下错误。 [INFO] --
当我使用 Maven 故障安全插件运行集成测试时遇到问题。我有两个类,一个是 TestUnitTest.java,另一个是 TestIntegrationIT.java。在pom.xml中,我配置如下
我有一个测试用例: import org.graph.*; import org.junit.*; public class TestCase_1 { @Test public voi
大家好,我有这两个问题 mvn clean 我收到此警告消息 Some problems were encountered while building the effective model for
Maven的mvn install和mvn verify命令有什么区别? 关键字clean如何修改这些命令? 最佳答案 mvn verify - 如前所述 - 执行 maven 在项目中找到的任何集成
我正在关注 Scala, Eclipse and Maven Integration tutorial . 这真的很有用。 但是有一件事情让我觉得很烦: 我总是需要从 Eclipse 运行两个命令作为
虽然我知道 mvn install -U 用于 update-snapshots 并且它更新了从构建日志中看到的远程存储库中的所有内容,但我无法了解它会强制更新哪一部分。因为据我了解,即使是 mvn
我已经阅读了@ codehaus exec-maven-plugin usage 的文档.我知道 exec:java 允许用户在他们声明的同一个 VM 中执行 java 程序。我是 Maven 的新手
我正在使用树脂服务器开发一个 Java 项目(其中 maven 是构建工具)。我找到了一些不错的 plugins对于 Tomcat,如果我发出 'mvn compile'然后编译文件转到/webapp
我有一个打包为 war 文件(包括几个 jar 文件)的 Web 应用程序。我注意到当我运行 mvn install 时——唯一被编译的项目是那些已经改变的——然后它替换了 war 文件中的这些 ja
这个问题在这里已经有了答案: IDEA JetBrains IntelliJ - Compile error on 'make' but fine when compiled using Maven
mvn clean install和mvn install有什么区别? 最佳答案 clean 在 Maven 中是它自己的构建生命周期阶段(可以被认为是一个 Action 或任务)。 mvn clea
我的团队使用内部团队 Maven 存储库,该存储库是使用 Apache 从开发服务器共享的。我们还在同一台机器上运行 Continuum CI 服务器。 Continuum 中的 Maven 构建以“
我正在尝试执行“mvn install”以从 Dockerfile 创建 war 文件。波纹管是Dockerfile FROM scratch FROM ubuntu:16.04 RUN mkdir
mvn 验证失败并抛出依赖错误。 Dependency convergence error for com.company.concepts:patients:2.4.14-SNAPSHOT path
我是一名优秀的程序员,十分优秀!