Reputation: 31
I am using STS version 3.9. I am trying to add external dependency for ojdbc7.jar to local maven repository. I have downloaded ojbdc7.jar
from oracle site. Through configuration window
I have set goal as - install:install-file
Parameters as -
-Dfile={Path/to/your/ojdbc7.jar} -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0 -Dpackaging=jar
While running this, I am getting below error.
Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (default-cli) on project .The parameters 'file' for goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file are missing or invalid
Thanks in advance.
Upvotes: 3
Views: 6364
Reputation: 5796
In my case I forgot to add the backslash like so:
mvn install:install-file \
-Dfile='some-file.jar' \
-DgroupId='com.something' \
-DartifactId='artifactId' \
-Dversion='version' \
-Dpackaging='packaging' \
-DgeneratePom=true
Upvotes: 0
Reputation: 81
Wrap all the parameters in the single quotes. shell is expanding it in unacceptable ways to maven.
mvn install:install-file -Dfile='/path/library.jar' -DgroupId='groupid' \
-DartifactId='' -Dversion='' -Dpackaging='jar'
Upvotes: 2
Reputation: 347
you are missing the file path and double quotes:
mvinstall:install-file -Dfile="path/file.jar" -DgroupId="com.oracle" -DartifactId=ojdbc7 -Dversion="12.1.0" -Dpackaging=jar
Upvotes: 0
Reputation: 32028
You should update the value of your param:
-Dfile={Path/to/your/ojdbc7.jar}
to the exact location of the jar you've downloaded -
-Dfile={/Users/user/Downloads/ojdbc7.jar}
Note: It must be a valid path in your system which you can get by looking at the properties/info of the downloaded jar.
Upvotes: 0