Maven 2.x Install Plugin

Maven does not recognize the version number provided for install-file in Windows CMD or PowerShell

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: 2.2
  • Fix Version/s: None
  • Component/s: install:install-file
  • Labels:
    None
  • Environment:
    Windows 7, Windows Powershell, Windows CMD
  • Number of attachments :
    0

Description

When I want to install a 3rd-Party-Library with the following command:

mvn install:install-file -Dfile=C:/Users/sascha/Java/workspace/TEAMUPEngine/lib/iaik_cms.jar -DgroupId=iaik -DartifactId=cms -Dversion=4.0.1 -Dpackaging=jar

it fails with:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task '.0.1': you must specify a valid lifecycle phase, or a goal
in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jul 17 12:42:07 CEST 2009
[INFO] Final Memory: 3M/38M
[INFO] ------------------------------------------------------------------------

I tried this on Windows CMD and Windows PowerShell using the mvn and mvn.bat command, but it does only work with -Dversion=4, without the dot as a delimiter.

Hope this can be fixed.

Issue Links

Activity

Hide
Benjamin Bentmann added a comment -

Windows 7, does this also fail on Vista or XP? What happens if you put quotes around -Dversion=4.0.1?

Show
Benjamin Bentmann added a comment - Windows 7, does this also fail on Vista or XP? What happens if you put quotes around -Dversion=4.0.1?
Hide
Sascha Fröhlich added a comment -

Found out that it's working on Windows CMD, had a typo in my command so that it failed when I was testing, I'm sorry for that.

But it fails with Windows Powershell, although I'm escaping with double brackets, backward apostrophe (mentioned here: http://channel9.msdn.com/wiki/windowspowershellquickstart/) or backslash.

Show
Sascha Fröhlich added a comment - Found out that it's working on Windows CMD, had a typo in my command so that it failed when I was testing, I'm sorry for that. But it fails with Windows Powershell, although I'm escaping with double brackets, backward apostrophe (mentioned here: http://channel9.msdn.com/wiki/windowspowershellquickstart/) or backslash.
Hide
Benjamin Bentmann added a comment -

And what's the exact commands and corresponding error message from the Powershell?

Show
Benjamin Bentmann added a comment - And what's the exact commands and corresponding error message from the Powershell?
Hide
Sascha Fröhlich added a comment - - edited

mvn install:install-file -Dfile=C:/Users/sascha/Java/workspace/TEAMUPEngine/lib/iaik_cms.jar -DgroupId=iaik -DartifactId=cms -Dversion=4`.0`.1 -Dpackaging=jar

results in

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task '.0.1': you must specify a valid lifecycle phase, or a goal
in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jul 17 13:10:52 CEST 2009
[INFO] Final Memory: 3M/38M
[INFO] ------------------------------------------------------------------------

mvn install:install-file -Dfile=C:/Users/sascha/Java/workspace/TEAMUPEngine/lib/iaik_cms.jar -DgroupId=iaik -DartifactId=cms -Dversion=4\.0\.1 -Dpackaging=jar

results in:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task '.0\.1': you must specify a valid lifecycle phase, or a goal
in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jul 17 13:11:44 CEST 2009
[INFO] Final Memory: 3M/38M
[INFO] ------------------------------------------------------------------------

There is atm no Windows XP or Vista machine nearby, I'm sorry.

Show
Sascha Fröhlich added a comment - - edited mvn install:install-file -Dfile=C:/Users/sascha/Java/workspace/TEAMUPEngine/lib/iaik_cms.jar -DgroupId=iaik -DartifactId=cms -Dversion=4`.0`.1 -Dpackaging=jar results in
[INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'install'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Invalid task '.0.1': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Fri Jul 17 13:10:52 CEST 2009 [INFO] Final Memory: 3M/38M [INFO] ------------------------------------------------------------------------
mvn install:install-file -Dfile=C:/Users/sascha/Java/workspace/TEAMUPEngine/lib/iaik_cms.jar -DgroupId=iaik -DartifactId=cms -Dversion=4\.0\.1 -Dpackaging=jar results in:
[INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'install'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Invalid task '.0\.1': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Fri Jul 17 13:11:44 CEST 2009 [INFO] Final Memory: 3M/38M [INFO] ------------------------------------------------------------------------
There is atm no Windows XP or Vista machine nearby, I'm sorry.
Hide
Benjamin Bentmann added a comment -

It seems the equal sign (=) is a special/reserved character in Powershell so one has to handle it with care. Putting quotes around the arg, i.e.

mvn .... "-Dversion=4.0.0"

works here.

Show
Benjamin Bentmann added a comment - It seems the equal sign (=) is a special/reserved character in Powershell so one has to handle it with care. Putting quotes around the arg, i.e.
mvn .... "-Dversion=4.0.0"
works here.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: