执行如下

mvn install:install-file -Dfile=D:\Temp\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 - Dversion=11.2.0 -Dpackaging=jar

错误如下

[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)]

解决方法

C:\Users\acer.m2 中 settings.xml文件内容

<?xml version="1.0" encoding="UTF-8"?>
<settings> 
<localRepository>D:\Program Files\apache-maven-3.5.4\repository</localRepository>
    <mirrors>
        <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>
  <profiles>
    <profile>
       <id>nexus</id> 
        <repositories>
            <repository>
                <id>nexus</id>
                <name>local private nexus</name>
                <url>http://maven.oschina.net/content/groups/public/</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </repository>
        </repositories>
        
        <pluginRepositories>
            <pluginRepository>
            <id>nexus</id>
            <name>local private nexus</name>
            <url>http://maven.oschina.net/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile></profiles>
</settings>