You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jiangtao Guo (Jira)" <ji...@apache.org> on 2022/10/04 13:42:00 UTC

[jira] [Updated] (MNG-7558) The localRepository is invalid when I use 'mvn install'

     [ https://issues.apache.org/jira/browse/MNG-7558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jiangtao Guo updated MNG-7558:
------------------------------
    Description: 
I have set the localRepository in the d disk file 'setting.xml', but the localRepository is invalid when I use 'mvn install' in IDEA.

Maven's official documents( [https://maven.apache.org/settings.html] )mention that the setting file has priority, but there is no setting file in my user directory.

What should I do? The setting file is as follows:

我已经在d磁盘文件中设置了localRepository。但当我在IDEA中使用“mvn install”时,localRepository无效。
Maven的官方文件([https://maven.apache.org/settings.html])提到设置文件具有优先级,但我的用户目录中没有'setting.xml'。

我应该怎么做,setting文件内容如下:
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<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>D:\ProgramFiles\maven3.6\repository</localRepository>
    <mirrors>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云公共仓库</name>
            <url>https://maven.aliyun.com/repository/public</url>
        </mirror>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云谷歌仓库</name>
            <url>https://maven.aliyun.com/repository/google</url>
        </mirror>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云阿帕奇仓库</name>
            <url>https://maven.aliyun.com/repository/apache-snapshots</url>
        </mirror>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云spring仓库</name>
            <url>https://maven.aliyun.com/repository/spring</url>
        </mirror>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云spring插件仓库</name>
            <url>https://maven.aliyun.com/repository/spring-plugin</url>
        </mirror>
        <mirror>
            <id>jboss</id>
            <name>jboss</name>
            <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
            <mirrorOf>JBoss Releases</mirrorOf>
        </mirror>
        <mirror>
            <id>repo1</id>
            <mirrorOf>central</mirrorOf>
            <name>central repo</name>
            <url>http://repo1.maven.org/maven2/</url>
        </mirror>
    </mirrors>
</settings>
 {code}

  was:
I have set the localRepository in the d disk file 'setting.xml', but the localRepository is invalid when I use 'mvn install' in IDEA.

Maven's official documents( https://maven.apache.org/settings.html )mention that the setting file has priority, but there is no setting file in my user directory.

我已经在d磁盘文件中设置了localRepository。但当我在IDEA中使用“mvn install”时,localRepository无效。
Maven的官方文件(https://maven.apache.org/settings.html)提到设置文件具有优先级,但我的用户目录中没有'setting.xml'。

What should I do? The setting file is as follows:

我应该怎么做,setting文件内容如下:
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<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>D:\ProgramFiles\maven3.6\repository</localRepository>
    <mirrors>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云公共仓库</name>
            <url>https://maven.aliyun.com/repository/public</url>
        </mirror>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云谷歌仓库</name>
            <url>https://maven.aliyun.com/repository/google</url>
        </mirror>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云阿帕奇仓库</name>
            <url>https://maven.aliyun.com/repository/apache-snapshots</url>
        </mirror>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云spring仓库</name>
            <url>https://maven.aliyun.com/repository/spring</url>
        </mirror>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云spring插件仓库</name>
            <url>https://maven.aliyun.com/repository/spring-plugin</url>
        </mirror>
        <mirror>
            <id>jboss</id>
            <name>jboss</name>
            <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
            <mirrorOf>JBoss Releases</mirrorOf>
        </mirror>
        <mirror>
            <id>repo1</id>
            <mirrorOf>central</mirrorOf>
            <name>central repo</name>
            <url>http://repo1.maven.org/maven2/</url>
        </mirror>
    </mirrors>
</settings>
 {code}


> The localRepository is invalid when I use 'mvn install'
> -------------------------------------------------------
>
>                 Key: MNG-7558
>                 URL: https://issues.apache.org/jira/browse/MNG-7558
>             Project: Maven
>          Issue Type: Bug
>          Components: Maven Wrapper
>    Affects Versions: 3.6.1
>            Reporter: Jiangtao Guo
>            Priority: Major
>
> I have set the localRepository in the d disk file 'setting.xml', but the localRepository is invalid when I use 'mvn install' in IDEA.
> Maven's official documents( [https://maven.apache.org/settings.html] )mention that the setting file has priority, but there is no setting file in my user directory.
> What should I do? The setting file is as follows:
> 我已经在d磁盘文件中设置了localRepository。但当我在IDEA中使用“mvn install”时,localRepository无效。
> Maven的官方文件([https://maven.apache.org/settings.html])提到设置文件具有优先级,但我的用户目录中没有'setting.xml'。
> 我应该怎么做,setting文件内容如下:
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <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>D:\ProgramFiles\maven3.6\repository</localRepository>
>     <mirrors>
>         <mirror>
>             <id>aliyunmaven</id>
>             <mirrorOf>*</mirrorOf>
>             <name>阿里云公共仓库</name>
>             <url>https://maven.aliyun.com/repository/public</url>
>         </mirror>
>         <mirror>
>             <id>aliyunmaven</id>
>             <mirrorOf>*</mirrorOf>
>             <name>阿里云谷歌仓库</name>
>             <url>https://maven.aliyun.com/repository/google</url>
>         </mirror>
>         <mirror>
>             <id>aliyunmaven</id>
>             <mirrorOf>*</mirrorOf>
>             <name>阿里云阿帕奇仓库</name>
>             <url>https://maven.aliyun.com/repository/apache-snapshots</url>
>         </mirror>
>         <mirror>
>             <id>aliyunmaven</id>
>             <mirrorOf>*</mirrorOf>
>             <name>阿里云spring仓库</name>
>             <url>https://maven.aliyun.com/repository/spring</url>
>         </mirror>
>         <mirror>
>             <id>aliyunmaven</id>
>             <mirrorOf>*</mirrorOf>
>             <name>阿里云spring插件仓库</name>
>             <url>https://maven.aliyun.com/repository/spring-plugin</url>
>         </mirror>
>         <mirror>
>             <id>jboss</id>
>             <name>jboss</name>
>             <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
>             <mirrorOf>JBoss Releases</mirrorOf>
>         </mirror>
>         <mirror>
>             <id>repo1</id>
>             <mirrorOf>central</mirrorOf>
>             <name>central repo</name>
>             <url>http://repo1.maven.org/maven2/</url>
>         </mirror>
>     </mirrors>
> </settings>
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)