5 分钟内的 Maven 问题

2024-03-05

我正在跟进5 分钟内完成 Maven http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html手册包含以下内容:

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

我收到以下错误:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.160s
[INFO] Finished at: Sat Dec 10 16:27:55 ICT 2011
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (
D:\experiment\maven). Please verify you invoked Maven from the correct directory. -> [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 arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

更多信息:

PS D:\experiment\maven> ping http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/2.2/maven-archetype-plugin-2.2.pom
Ping request could not find host http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/2.2/maven-archetype-plugin-2.2.pom. Please check the name and try again.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.869s
[INFO] Finished at: Sat Dec 10 19:03:37 ICT 2011
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (
D:\experiment\maven). Please verify you invoked Maven from the correct directory. -> [Help 1]
org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to exe
cute but there is no POM in this directory (D:\experiment\maven). Please verify you invoked Maven fr
om the correct directory.
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

我使用的是 Windows 7 SP1。

我遇到这个问题是因为我使用 PowerShell 运行它。

当我使用 CMD.EXE 运行它时,它工作正常。

感谢大家的帮助。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

5 分钟内的 Maven 问题 的相关文章

  • 为 Apache Spark 示例运行 Cypher (CAPS)

    我知道这是一个广泛的问题 但这会对neo4j不属于某个领域的用户scala编程 我需要使用Apache Spark 项目的 Cypher https github com opencypher cypher for apache spark
  • Maven:如何确保在类路径中使用带时间戳的快照版本?

    我希望我们的功能测试使用类路径中快照的时间戳版本 例如 api 0 5 0 20110706 191935 1 jar 从 Maven 运行 然而 虽然我可以看到我们的 Artifactory 存储库中有带时间戳的版本 但 Maven 指的
  • 如何使用Powershell变量打开Edge?

    我已经尝试过以下方法 edge New Object com microsoft edge application edge visible true edge FullScreen true 但我收到错误 New Object Retri
  • 如何根据服务器/环境动态加载服务器配置?

    目前 我设置了 Maven 配置文件 以便能够为不同的环境 开发 演示 暂存 生产等 部署我的项目 并且它工作得很好 但问题是 对于我拥有的每个模块 Web 应用程序 我需要复制 粘贴此配置文件 它们都是属性文件 当我需要更改环境 服务器配
  • Powershell - 从图像网址下载图像

    对 powershell 的了解有限 我尝试从图像网址下载图像 例如这样 http hdwallpaperia com wp content uploads 2014 01 Mc Laren P1 Wallpaper Image Pictu
  • 如何使用卸载路径卸载 MSI

    我正在尝试获取一组应用程序的卸载路径并卸载它们 到目前为止 我得到了卸载路径列表 但我很难真正卸载这些程序 到目前为止我的代码是 app msi1 msi2 msi3 msi4 Regpath HKLM Software Microsoft
  • 更新到Android 5.0后出现java.lang.UnsatisfiedLinkError

    我正在开发一个 Android 应用程序 它使用一个名为 liballjoyn java so 的本机库 可用here https allseenalliance org developers download在 Android 核心 SD
  • 每次修改代码时都必须 mvn clean install

    我不是来自 Java 世界 但我必须为我的一个项目深入研究它 我不明白为什么每次修改或更新代码时 都必须 mvn clean install 来调试代码的最新版本 你知道为什么吗 尝试按Ctrl Shift F9 热插拔 有时会有所帮助
  • 将 Unicode 字符串转换为 ASCII

    我的字符串包含 ASCII 中未找到的字符 如 我需要一个函数将它们转换为可接受的内容 例如 a e i o u 这是因为我将根据这些字符串创建 IIS 网站 即我将使用它们作为域名 function Convert DiacriticCh
  • 如何使用类在 PowerShell 中实现事件处理

    我希望能够创建一个自定义事件 该事件将触发订阅该事件的函数或对象 我查看了一些功能 例如 New Event and Register ObjectEvent 但我不完全确定如何有效地将它们组合在一起 我想要的想法是让一个函数在引发某个事件
  • 是否可以在 PowerShell 中使 IndexOf 不区分大小写?

    我在终端服务器中由查询会话命令组成的数组中搜索索引时遇到问题 这是有问题的脚本 Array of logged users in terminal servers a Get RDUsersession CollectionName BLA
  • Maven 构建和 Maven 安装之间的区别

    我在 Eclipse 中使用 Maven 当我尝试构建项目时 我看到以下选项 Build Clean 生成源 Install 构建和安装有什么区别 如果构建可以配置为执行不同的目标 例如 安装 为什么我们需要单独的项目 Maven 构建生命
  • Maven 3 - 在 .jar 中分发自定义插件?

    在这里完成 Maven 新手 所以请原谅任何滥用的术语等 我在 Maven 3 中构建了一个自定义插件 定义 git rebase 目标的插件 我能够 mvn install 没问题 然后我可以从命令行调用目标 mvn edu clemso
  • 如何并行执行PowerShell函数多次?

    我不确定是否需要将其称为多线程 基于作业或异步的需求 但基本上我有一个 Powershell 脚本函数 它需要多个参数 并且我需要使用不同的参数多次调用它并让它们运行在平行下 目前 我这样调用该函数 Execute param1 param
  • 如何在Intellij IDEA中复制maven依赖项到输出工件WEB-INF/lib?

    我知道在 eclipse maven 中可以将依赖项复制到 WEB INF lib 目录setting Deployment Assembly and Build Path 但是我怎样才能用 Intellij IDEA 实现这一点呢 好的
  • Powershell从字符串中获取数字

    大家好 我正在尝试使用 powershell 从用户 ID 中获取号码 我们使用的格式是名字的第一个字母 姓氏的前四个字母和学生 ID 因此名为 John Smith ID 123456 的学生将是 jsmit123456 如果用户的名字少
  • Maven 原型删除注释

    我正在使用 Maven 生成原型 我能够使原型生成良好 并且它生成的项目模板按预期工作 唯一的问题是在我的 shell 脚本中 脚本中注释掉的所有内容都会被删除 只留下命令 我进行了多次搜索 我所能找到的只是另一个用户面临类似的 java
  • BuildNumber 不是使用 buildnumber-maven-plugin 生成的

    在我的父母 pom 中我有
  • 如何设置文件的LastWriteTime属性?

    我想更改使用此脚本生成的文件的创建日期 clientname Read Host Enter the client name path Read Host Enter the complete path of bak files time
  • 将 Spring Boot 应用程序部署到 Heroku 失败并显示“无效标志:--release -> [帮助 1]”

    当我尝试将代码部署到 Heroku 时 通过git push heroku master 我收到 Maven 错误 remote ERROR Failed to execute goal org apache maven plugins m

随机推荐