Plugin not found for 'install' prefix in current project
I want to add jdbc oracle to maven repository, since it is not in repository, I have to run this command:
mvn install:install-file
-Dfile=D:\Temp\ojdbc6.jar
-DgroupId=com.oracle
-DartifactId=ojdbc6 -
Dversion=11.2.0 -Dpackaging=jar
and face this error:
[ERROR] No plugin found for prefix 'install' in the current project and in the p
lugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the re
positories [local ({my repository path}), central (https://repo.maven.
apache.org/maven2)]
any help will be appreciated.
source to share
I got the same problem, there is a two step process to solve this problem:
-
Configuring Maven Proxy Server Configuration
-
Open the Maven config file:
- For Linux:
${user.home}/.m2/settings.xml
-
For Windows:
C:\users\username\.m2\settings.xml
-
If you can find the file, open it and search for the
<proxies></proxies>
segment. -
If you can't find the file, create a new file named
settings.xml
and add the following xml tags<settings></settings>
-
Add proxy settings as shown below:
<proxies> <proxy> <id>example-proxy</id> <active>true</active> <protocol>http</protocol> <host>proxy.example.com</host> <port>8080</port> <username>proxyuser</username> <password>somepassword</password> <nonProxyHosts>www.google.com|*.example.com</nonProxyHosts> </proxy> </proxies>
- For Linux:
-
-
Update Maven Libraries with Working Extension
- The Wagon HTTP lightweight library allows us to connect through NTLM proxies. This can be added as an extension to the default Maven libraries.
- Download
wagon-http-lightweight-2.2.jar
from https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-http-lightweight/2.2/wagon-http-lightweight-2.2.jar - Copy the downloaded file to a folder
%M2_HOME%/lib/ext
.
You are now ready to use Maven with your programs.
source to share
Try adding this to your Maven config file:
<!-- https://mvnrepository.com/artifact/com.oracle/ojdbc14 -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
</dependency>
It should install Oracle JDBC into your repository and install the required JARS.
https://www.tech-recipes.com/rx/39256/add-dependencies-to-maven-pom-xml-file/
Add it to the tag dependencies
.
Hope it helps!
source to share