[error] maven execution terminated abnormally (exit code 1)

版权声明:喜欢可以转载,但是必须注明出处。技术要分享,专利要维护。 https://blog.csdn.net/wzcyamadie/article/details/82744740

问题出在maven

解决思路:首先,maven 的环境变量确保没问问题。然后检查settings.xml文件。

  1. 在IDEA设置中,找到maven
    【建议使用全局设置,设置一次就行,以后不用再设置maven 】

这里写图片描述

下面付一个settings.xml文件,
【使用中只需要修改“< localRepository>E:\Etools\maven\repo< /localRepository >”中的路径就可以了,根据自己的情况修改】

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">


    <localRepository>E:\Etools\maven\repo</localRepository>


    <servers>
        <server>
            <id>dynamic-public</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>dynamic-releases</id>
            <username>admin</username>
            <password>admin123</password>
        </server>

        <server>
            <id>dynamic-snapshots</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>thirdparty</id>
            <username>admin</username>
            <password>admin123</password>
        </server>       
    </servers>

    <mirrors>
        <mirror>
            <id>nexus</id>
            <mirrorOf>central</mirrorOf>
            <name>nexus repository</name>
            <url>http://192.168.22.50:8081/nexus/content/groups/dynamic-public</url>
        </mirror>
    </mirrors>

    <profiles>
        <profile>
            <id>central</id>
            <repositories>
                <repository>
                    <id>central</id>
                    <name>Central</name>
                    <url>http://192.168.22.50:8081/nexus/content/groups/dynamic-public </url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <name>Central</name>
                    <url>http://192.168.22.50:8081/nexus/content/groups/dynamic-public</url>
                </pluginRepository>
            </pluginRepositories>
        </profile> 
    </profiles>


    <activeProfiles> 
        <activeProfile>central</activeProfile>
    </activeProfiles>

    <pluginGroups>
        <pluginGroup>org.mortbay.jetty</pluginGroup>    
        <pluginGroup>org.codehaus.cargo</pluginGroup>
        <pluginGroup>org.jvnet.hudson.tools</pluginGroup>
    </pluginGroups>

</settings>

猜你喜欢

转载自blog.csdn.net/wzcyamadie/article/details/82744740