2

i am trying to install a local jar to my maven project, i am running this command from my project folder :

mvn install:install-file -Dfile= ~/Downloads/<jar_path> -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=<version> -Dpackaging=jar -DgeneratePom=false

and i am getting this error:

Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project my-project: Error installing artifact 'my-artifact': Failed to install artifact groupId:artifactId:jar:version: /Users/my-project-path (Is a directory) -> [Help 1]
Ayoub
  • 112
  • 1
  • 9

1 Answers1

5

There is a space in your command, after -Dfile=!

 mvn install:install-file -Dfile= ~/Downloads/<jar_path> -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=<version> -Dpackaging=jar -DgeneratePom=false

try

 mvn install:install-file -Dfile=~/Downloads/<jar_path> -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=<version> -Dpackaging=jar -DgeneratePom=false
AlexN
  • 1,613
  • 8
  • 21
  • Oh my god!!!! i can't believe this was it, i spent 5 hours yesterday but i had also to change the ~ by /Users/.... but it was the space causing the error thank you very very much for your help you saved my day – Ayoub Oct 09 '15 at 07:07