侧边栏壁纸
  • 累计撰写 781 篇文章
  • 累计创建 1 个标签
  • 累计收到 1 条评论
标签搜索

依赖

Dettan
2021-04-10 / 0 评论 / 0 点赞 / 103 阅读 / 6,890 字
温馨提示:
本文最后更新于 2022-04-30,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

https://mvnrepository.com/

<repository>
            <id>icm</id>
            <name>icm</name>
            <url>http://maven.icm.edu.pl/artifactory/repo/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Sonatype Releases</id>
            <name>Sonatype Releases</name>
            <url>https://oss.sonatype.org/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Spring Plugins</id>
            <name>Spring Plugins</name>
            <url>http://repo.spring.io/plugins-release/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Spring Libs</id>
            <name>Spring Libs</name>
            <url>http://repo.spring.io/libs-milestone/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Atlassian</id>
            <name>Atlassian</name>
            <url>https://maven.atlassian.com/content/repositories/atlassian-public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>JBoss Releases</id>
            <name>JBoss Releases</name>
            <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Nuxeo Releases</id>
            <name>Nuxeo Releases</name>
            <url>https://maven-eu.nuxeo.org/nexus/content/repositories/public-releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>XWiki Releases</id>
            <name>XWiki Releases</name>
            <url>http://maven.xwiki.org/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Apache Releases</id>
            <name>Apache Releases</name>
            <url>https://repository.apache.org/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Clojars</id>
            <name>Clojars></name>
            <url>http://clojars.org/repo/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Hortonworks</id>
            <name>Hortonworks</name>
            <url>http://repo.hortonworks.com/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Cloudera</id>
            <name>Cloudera</name>
            <url>https://repository.cloudera.com/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>WSO2</id>
            <name>WSO2</name>
            <url>http://dist.wso2.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Java.net Releases</id>
            <name>Java.net Releases</name>
            <url>https://maven.java.net/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Alfresco Public</id>
            <name>Alfresco Public</name>
            <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Boundless</id>
            <name>Boundless</name>
            <url>http://repo.boundlessgeo.com/main/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>OpenNMS</id>
            <name>OpenNMSe></name>
            <url>http://repo.opennms.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Redhat GA</id>
            <name>Redhat GA</name>
            <url>https://maven.repository.redhat.com/ga/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>JBoss 3rd-party</id>
            <name>JBoss 3rd-party</name>
            <url>https://repository.jboss.org/nexus/content/repositories/ea/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>NetBeans</id>
            <name>NetBeans</name>
            <url>http://bits.netbeans.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
依赖传递:导入的jar包要依赖别的jar的话自动导入

apply plugin: 'java'
repositories {
    mavenCentral()
}
dependencies {
    compile group: 'org.hibernate', name: 'hibernate-core', version: '3.6.7.Final'
    testCompile group: 'junit', name: 'junit', version: '4.+'
}



使用 Maven 中央仓库
build.gradle
repositories {
    mavenCentral()
}
或者其它远程 Maven 仓库:
使用 Maven 远程仓库
build.gradle
repositories {
    maven {
        url "http://repo.mycompany.com/maven2"
    }
}
或者采用 Ivy 远程仓库
采用 Ivy 远程仓库
build.gradle
repositories {
    ivy {
        url "http://repo.mycompany.com/repo"
    }
}
或者在指定本地文件系统构建的库。
采用本地 Ivy 目录
build.gradle
repositories {
    ivy {
        // URL can refer to a local directory
        url "../local-repo"
    }
}



0

评论区