这是在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. js数组声明+split()方法

    split()方法:var words = sentence.split(' '): "hello".split("", 3) //可返回 ["h&q ...

  2. HDU 5632 Rikka with Array [想法题]

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5632 ------------------------------------------------ ...

  3. canvas绘制随机颜色的柱形图

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. 把Notepad++的tab设置为四个空格

    在7.1版本以及以后 设置->首选项->Language 勾选Repalce by space 在7.1版本以前 设置->首选项->制表符设置 右侧,转为空格,勾选上 参考: ...

  5. (appium+python)UI自动化_09_unittest批量运行测试用例&生成测试报告

    前言 上篇文章[(appium+python)UI自动化_08_unittest编写测试用例]讲到如何使用unittets编写测试用例,并执行测试文件.接下来讲解下unittest如何批量执行测试文件 ...

  6. 【Unity练习】 平衡球Demo

    链接:http://pan.baidu.com/s/1pKEpnIz 密码:btke

  7. SPOJ NICEBTRE - Nice Binary Trees(树 先序遍历)

    传送门 Description Binary trees can sometimes be very difficult to work with. Fortunately, there is a c ...

  8. 关于this、Echarts中的data

    this是指当前对象 移除class的jQuery代码:$('ur.nav li:eq(0)').removeClass('active') 添加class的jQuery代码:$('ur.nav li ...

  9. servlet--禁用浏览器缓存

    禁用浏览器缓存:Cache-Control.pragma.expires response.setHeader("Cache-Control", "no-cache&qu ...

  10. 通过queue实现前端的被动接收

    一般请求都是由前端主动发起请求,后端响应,但有些情况必须要后端达到一定条件了才向前端相应数据,这就变成前端被动了.比如微信接收信息,只有别人给你发消息,你才能被动接收消息. 最近做了个项目,当有人经过 ...