这是在Win10系统下,将Jar包手工导入进Maven本地仓库,使用PowerShell执行命令报的错。

命令如下:

mvn install:install-file -Dfile=E:\Workspace\FlowerPrice\lib\javacsv-2.1.jar -DgroupId=net.sourceforge.javacsv -DartifactId=javacsv -Dversion=2.1 -Dpackaging=jar

原因是在PowerShell中,点 “.” 算特殊运算符,导致该错误。

解决方法一:在CMD中执行该命令。需要注意把当前目录转到pom.xml所在目录

解决方法二:为命令加上单引号,变为如下:

mvn install:install-file -Dfile="E:\Workspace\FlowerPrice\lib\javacsv-2.1.jar" '-DgroupId=net.sourceforge.javacsv' '-DartifactId=javacsv' '-Dversion=2.1' '-Dpackaging=jar'

Maven 错误: Unknown lifecycle phase ".sourceforge.javacsv". You must specify a valid lifecycle phase or a goal的更多相关文章

  1. maven 错误No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format

    [INFO] Scanning for projects... [INFO] ------------------------------------------------------------- ...

  2. Maven报错 解决方案。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

    报错: [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or ...

  3. 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, i

    [ERROR] Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal ...

  4. Maven項目打包報錯:Plugin execution not covered by lifecycle configuration

    Maven項目打包報錯:Plugin execution not covered by lifecycle configuration 使用Eclipse导入一个新的maven项目时不时的会遇到这个错 ...

  5. Maven 错误:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project appservice-common: Fatal error compiling: 无效的目标发行版: 1.8

    通过IDEA 提供的面板 执行package 或者 install 没有错误,但是cmd terminal 窗口就不行!出现: Maven 错误:Failed to execute goal org. ...

  6. 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

    No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in t ...

  7. Maven 错误 Failure to transfer ...was cached in the local repository...

    Maven 错误 Failure to transfer ...was cached in the local repository... 我解决的时候多了两步才解决 1. mvn clean ins ...

  8. 备忘:maven 错误信息: Plugin execution not covered by lifecycle configuration

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  9. Unknown lifecycle phase "mvn". 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>

    在用maven命令启动storm时候,命令行是:mvn exec:java -Dexec.mainClass="TopologyMain" -Dexec.args="sr ...

随机推荐

  1. if和switch的选择结构

    1. Java中的if选择结构,包括以下形式. *基本if选择结构:可以处理一单一或组合条件的情况. *if-else选择结构:可以处理简单的条件分支情况. *多重if选择结构:可以处理连续区间的条件 ...

  2. C#使用phantomjs 进行网页整页截屏

    C#使用phantomjs 进行网页整页截屏 hantomjs 是一个基于js的webkit内核无头浏览器 也就是没有显示界面的浏览器,这样访问网页就省去了浏览器的界面绘制所消耗的系统资源,比较适合用 ...

  3. php strtotime,mktime,DateTime函数处理时间累加问题

    时间戳(年月日时分秒)  使用strtotime函数,结合+1 month,-1 month,next month,last month的时候会出现一些问题. demo示例: //时间"20 ...

  4. TP5内部异常API数据输出的自定义方法编写

    需求:利用postman进行请求api接口过程中 关于一些数据输出异常的情况下 我们希望通过自己编写一些类和方法 实现便于后端人员进行根据提示进行调试处理! 以下测试的时候 请设置 app_debug ...

  5. PHP之导出CSV文件

    序言 Q1:什么是csv文件? A1:csv即 comma-separated values ,逗号分隔值.是一种通用的相对简单地文件格式,目前被较为广泛的使用.其最广泛的应用就是用来转移表数据. “ ...

  6. JS-Promise-先上传文件再提交表单

    很久前就使用过 Bootstrap File Input 上传文件,将上传文件返回的信息和表单一并提交回去. 最开始的时候是让用户手动点上传文件,然后再点提交表单: 之后尝试了写在回调里,不过这样会写 ...

  7. CentOS 7安装图形界面

    之前公司的服务器都是用的CentOS 的系统,需要安装图形界面的时候我会执行以下命令 yum -y groupinstall "X Window System" "Fon ...

  8. (转载)Spring与SpringMVC父子容器的关系与初始化

    转自 https://blog.csdn.net/dhaiuda/article/details/80026354 Spring和SpringMVC的容器具有父子关系,Spring容器为父容器,Spr ...

  9. ichunqiu在线挑战--我很简单,请不要欺负我 writeup

    挑战链接: http://www.ichunqiu.com/tiaozhan/114 知识点: 后台目录扫描,SQL Injection,一句话木马, 提权,登陆密码破解 这个挑战是为像我这种从来都没 ...

  10. spring-第一篇之spring核心机制依赖注入(DI)/控制翻转(IoC)

    1.spring的核心机制:依赖注入(DI)/控制翻转(IoC) 什么是依赖:A对象需要调用B对象,所以A依赖于B. 什么是注入:A对象注入一个属性B对象. 什么是依赖注入(DI):A对象依赖于B对象 ...