在Idea Intellij中使用Nexus存储库而不是公共Maven

xwhyz

如何强制Idea Intellij从Nexus信息库而不是Maven公共存储库下载?我在哪里可以在Idea属性中进行配置?它没有在pom.xml文件中定义,我不希望这样。

瓜拉塔米达

不知道它是否也可以在Idea Intellij上使用(我正在使用spring source studio-eclipse clon),但是应该这样做是因为Maven配置位于主目录.M2目录中的settings.xml中。只需使用以下内容(我的服务器在nexus-server:8081上运行):

<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">
  <servers>
    <server> 
      <id>releases</id>
      <username>user-name</username>
      <password>your-password</password>
    </server>
    <server> 
      <id>snapshots</id>
      <username>user-name</username>
      <password>your-password</password>
    </server>
  </servers>
    <mirrors>
        <mirror>
            <!--This sends everything else to /public -->
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://nexus-server:8081/nexus/content/groups/public</url>
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <id>nexus</id>
            <!--Disable snapshots for the built in central repo to direct -->
            <!--all requests to nexus via the mirror -->
            <repositories>
                <repository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                        <updatePolicy>always</updatePolicy>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                        <updatePolicy>always</updatePolicy>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <activeProfiles>
        <!--make the profile active all the time -->
        <activeProfile>nexus</activeProfile>
    </activeProfiles>
</settings>

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类常见问题

使用IntelliJ IDEA设置JUnit

来自分类Dev

使用IntelliJ IDEA创建Java库文件

来自分类Dev

IntelliJ IDEA 13.1-更新Maven存储库索引身份验证失败

来自分类Dev

如何在IDEA Intellij中更改GitHub存储库?

来自分类Dev

IntelliJ IDEA Git图

来自分类Dev

IntelliJ IDEA渲染错误

来自分类Dev

IntelliJ IDEA覆盖$ user

来自分类Dev

Intellij IDEA EAP下载

来自分类Dev

GUI源IntelliJ Idea

来自分类Dev

如何在IntelliJ IDEA 13中将存储库添加到“索引Maven存储库”?

来自分类Dev

IntelliJ IDEA文件超时?

来自分类Dev

Intellij IDEA检查样式

来自分类Dev

IntelliJ IDEA中每个模块的不同存储库

来自分类Dev

Intellij IDEA的GWT插件

来自分类Dev

IntelliJ Idea生成的源

来自分类Dev

Debugging at IntelliJ IDEA 14.1.3

来自分类Dev

在IntelliJ IDEA中使用JDBC / Mysql Connector

来自分类Dev

在Intellij Idea中使用android.support.v4库

来自分类Dev

Intellij Idea BNF行尾

来自分类Dev

Intellij IDEA RAML插件

来自分类Dev

使用JavaFX与IntelliJ IDEA的

来自分类Dev

使用IntelliJ IDEA从git存储库还原文件

来自分类Dev

如何在IntelliJ IDEA中使用C ++?

来自分类Dev

Intellij Idea快速防御

来自分类Dev

如何在IntelliJ IDEA中使用库

来自分类Dev

Intellij Idea将更改上传到Subversion存储库

来自分类Dev

我无法在IntelliJ IDEA中使用Maven的依赖项

来自分类Dev

使用 IntelliJ IDEA 调试 ActiveJDBC

来自分类Dev

如何在Intellij Idea中使用maven在ipfs中创建远程连接?