简体   繁体   中英

How to connect to the internal maven repository?

In our company we have an internal maven repository. The IDE used is eclipse.

The link to the internal maven repository is http://machinename:8080/artifactory

Can someone please help me how to connect to this internal maven repository and also what all changes are to be made on the eclipse to use this?

You need to update your Maven settings.xml file to use the internal Artifactory repo, instead of the global maven repository.

In Eclipse go to Window > Preferences > Maven > User Settings and edit the settings.xml file to contain your repository. eg

<profile>
    <id>profile_name_here</id>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
    <repositories>
        <repository>
            <id>profile_id_here</id>
            <name>artifactory</name>
            <url>http://machinename:8080/artifactory</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>warn</checksumPolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>fail</checksumPolicy>
            </snapshots>
        </repository>
    </repositories>
</profile>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM