打包报错。

来源:2-4 博客应用运行环境搭建

weixin_慕的地8486394

2022-03-28

[root@localhost ~]# mvn package
[INFO] Scanning for projects…
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.073 s
[INFO] Finished at: 2022-03-28T16:12:08+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/root). 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
[root@localhost ~]#
[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=128 time=30.8 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=128 time=30.7 ms
^C
www.a.shifen.com ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 30.799/30.841/30.883/0.042 ms

老师请帮忙看下,什么问题。。不太明白 mvn package 时候就会抱这个错误

写回答

1回答

清风

2022-03-28

可以按照这么写,指定要跑的参数:

mvn install:install-file "-DgroupId=org.mozilla" "-DartifactId=jss" "-Dversion=4.2.5" "-Dpackaging=jar" "-Dfile=C:\Users\AArmijos\workspace\componentes-1.0.4\deps\jss-4.2.5.jar"

0
1
weixin_慕婉清7028505
老师,我用你这个命令,还是会报上面那个错误
2022-08-15
共1条回复

Kubernetes 入门到进阶实战,系统性掌握 K8s 生产实践

阿里云最有价值专家亲授,云原生时代必备技能

1501 学习 · 613 问题

查看课程