首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Apache isis helloworld原型构建失败

Apache isis helloworld原型构建失败
EN

Stack Overflow用户
提问于 2018-03-20 22:50:52
回答 2查看 239关注 0票数 0

我开始使用Apache isis (我有Windows10),并遵循他们的教程(https://isis.apache.org/guides/ugfun/ugfun.html#_ugfun_getting-started_helloworld-archetype)。

我安装了Java和Maven,将它们添加到路径中,然后我创建了一个文件夹,当我运行命令mvn -v时,我会在其中看到以下输出:

代码语言:javascript
复制
E:\Apache isis\test_project>mvn -v
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
Maven home: D:\Development softwares\apache-maven-3.5.3-bin\apache-maven-3.5.3\bin\..
Java version: 9.0.4, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jre-9.0.4
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

当我运行他们的文档中指定的命令来生成app时:

代码语言:javascript
复制
mvn archetype:generate  \
    -D archetypeGroupId=org.apache.isis.archetype \
    -D archetypeArtifactId=helloworld-archetype \
    -D archetypeVersion=1.16.2 \
    -D groupId=com.mycompany \
    -D artifactId=myapp \
    -D version=1.0-SNAPSHOT \
    -B

我得到以下错误:

代码语言:javascript
复制
PS C:\Users\Nitish> cd .\Desktop\
PS C:\Users\Nitish\Desktop> mvn archetype:generate  \
>>     -D archetypeGroupId=org.apache.isis.archetype \
>>     -D archetypeArtifactId=simpleapp-archetype \
>>     -D archetypeVersion=1.16.2 \
>>     -D groupId=com.mycompany \
>>     -D artifactId=myapp \
>>     -D version=1.0-SNAPSHOT \
>>     -B
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.114 s
[INFO] Finished at: 2018-03-20T15:42:22+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\Nitish\Desktop). 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 articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
-D : The term '-D' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:2 char:5
+     -D archetypeGroupId=org.apache.isis.archetype \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-D:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-D : The term '-D' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:3 char:5
+     -D archetypeArtifactId=simpleapp-archetype \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-D:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-D : The term '-D' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:4 char:5
+     -D archetypeVersion=1.16.2 \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-D:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-D : The term '-D' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:5 char:5
+     -D groupId=com.mycompany \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-D:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-D : The term '-D' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:6 char:5
+     -D artifactId=myapp \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-D:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-D : The term '-D' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:7 char:5
+     -D version=1.0-SNAPSHOT \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-D:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-B : The term '-B' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:8 char:5
+     -B
+     ~~
    + CategoryInfo          : ObjectNotFound: (-B:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我是不是漏掉了什么?

EN

回答 2

Stack Overflow用户

发布于 2018-03-20 23:24:43

当我使用Powershell时,我必须使用以下命令:

代码语言:javascript
复制
mvn archetype:generate  "-DarchetypeGroupId=org.apache.isis.archetype" "-DarchetypeArtif
actId=helloworld-archetype" "-DarchetypeVersion=1.16.2" "-DgroupId=com.mycompany" "-DartifactId=myapp" "-Dversion=1.0-SN
APSHOT" "-B"
票数 1
EN

Stack Overflow用户

发布于 2019-08-02 13:39:09

对于Unix,它应该如下所示。

代码语言:javascript
复制
mvn archetype:generate \
  -DarchetypeGroupId=org.apache.beam \
  -DarchetypeArtifactId=beam-sdks-java-maven-archetypes-examples \
  -DarchetypeVersion=2.14.0 \
  -DgroupId=org.example \
  -DartifactId=word-count-beam \
  -Dversion="0.1" \
  -Dpackage=org.apache.beam.examples \
  -DinteractiveMode=false

如果您想在powershell中使用它,请将反斜杠\替换为反引号`

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49387401

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档