<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[资源]分享针对国内开发者的Maven源镜像]]></title><description><![CDATA[<p dir="auto">记得最开始使用Maven的时候，基本上大部分时间都花在寻找依赖和下载依赖上。<br />
许多API的作者也都是把自己的工件放在自己的maven仓库上，<br />
如果你使用Maven或者Gradle，那么你不仅要在pom.xml中写dependency，还要写一个repository。<br />
有些仓库在国内访问还很慢、甚至无法打开，这大大降低了开发效率。</p>
<p dir="auto">如果你现在正为此苦恼的话，那么试试我搭建的仓库吧！</p>
<p dir="auto">介绍</p>
<p dir="auto"><strong>仓库地址：<a href="https://lss233.com/artifactory/minecraft" rel="nofollow ugc">https://lss233.com/artifactory/minecraft</a></strong><br />
这个仓库镜像了以下内容：</p>
<p dir="auto">Spigot的Snapshots （主要包含了spigot-api, bukkit-api）<br />
Spongepowered (主要包含了spongeapi, spongecommon 以及其他开发sponge插件可能用到的工件)<br />
forge(镜像了files.minecraftforge.net/maven)<br />
<a href="http://nexus.hc.to" rel="nofollow ugc">nexus.hc.to</a>(主要包含了vault-api, heroes, Residence等工件)<br />
placeholderapi-repo（主要包含了PlaceholderAPI）<br />
sk89q-repo (主要包含了worldedit, worldguard, craftbook,dynmap-api 等工件 )<br />
dmulloy2-snapshots（主要包含了ProtocolLib等工件）<br />
ess3-repo （主要包含了Essentials插件的一些工件）<br />
dakanilabs-repo (主要包含了SQLibrary, PlayerPoints等一些工件)<br />
kk-central （主要包含了KCauldron等一些工件）<br />
Phoenix(主要包含了PhoenixAPI)</p>
<p dir="auto">destroystokyo-repo（主要包含paper-api, paperclip, waterfall等工件)<br />
lex-snapshots(主要包含了NeptuneLib）<br />
sonatype（主要包含了bungeecord-api等一大堆工件）<br />
codemc(主要包含了craftbukkit、spigot服务端)<br />
nukkit (主要包含了nukkit, nukkit-parent)<br />
<a href="http://libraries.minecraft.net" rel="nofollow ugc">libraries.minecraft.net</a></p>
<p dir="auto">使用方法</p>
<p dir="auto">对于使用Maven进行开发的小伙伴</p>
<p dir="auto">打开pom.xml ，在 &lt;repositories&gt; ... &lt;/repositories&gt;代码块中加入：</p>
<pre><code>&lt;repository&gt;
  &lt;id&gt; lss233-minecraft &lt;/id&gt;
  &lt;name&gt; Lss233's Minecraft Repository &lt;/name&gt;
  &lt;url&gt;https://lss233.com/artifactory/minecraft&lt;/url&gt;
&lt;/repository&gt;
</code></pre>
<p dir="auto">然后就可以把其他已经在本仓库中的 &lt;repository&gt; ... &lt;/repository&gt;删除啦。<br />
Gradle Wrapper加速<br />
通常首次使用 gradlew 的时候总会从Gradle官网缓慢地下载gradle.<br />
本人对此也提供了一个简单的镜像。<br />
加速方法:<br />
打开项目中的 gradle/wrapper/gradle-wrapper.properties 文件，<br />
<a href="http://xn--services-4e6o.gradle.org/distributions%E6%9B%BF%E6%8D%A2%E4%B8%BA" rel="nofollow ugc">将services.gradle.org/distributions替换为</a> <a href="http://lss233.com/artifactory/gradle-dist%E5%8D%B3%E5%8F%AF%E3%80%82" rel="nofollow ugc">lss233.com/artifactory/gradle-dist即可。</a></p>
<p dir="auto">对于使用Gradle进行Forge Mod开发的小伙伴</p>
<p dir="auto">把build.gradle里</p>
<pre><code>maven {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
        }
</code></pre>
<p dir="auto">替换成</p>
<pre><code>maven {
            name = "forge"
            url = "https://lss233.com/artifactory/minecraft"
        }
</code></pre>
<p dir="auto">就可以提升下载速度啦，还能避免下载失败的问题呢。<br />
高版本MDK<br />
如果使用高版本的MDK，可能还会遇到 jcenter 无法访问的现象。<br />
解决方法:<br />
由于仓库中已经包含JCenter，您可以直接将build.gradle中的jcenter() 删除。</p>
<p dir="auto">完整版的build.gradle参考：<br />
1.12.2</p>
<pre><code>
buildscript {
    repositories {
        jcenter()
        maven { url = "https://lss233.com/artifactory/minecraft" }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
    }
}
apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.0"
group= "com.yourname" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
    sourceCompatibility = targetCompatibility = '1.8'
}

minecraft {
    version = "1.12.2-14.23.5.2808"
    runDir = "run"

    // the mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   snapshot are built nightly.
    // stable_#            stables are built at the discretion of the MCP team.
    // Use non-default mappings at your own risk. they may not always work.
    // simply re-run your setup task after changing the mappings to update your workspace.
    mappings = "snapshot_20171003"
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

dependencies {
    // you may put jars on which you depend on in ./libs
    // or you may define them like so..
    //compile "some.group:artifact:version:classifier"
    //compile "some.group:artifact:version"

    // real examples
    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

    // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
    //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
    // except that these dependencies get remapped to your current MCP mappings
    //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // for more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html

}

processResources {
    // this will ensure that this task is redone when the versions change.
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    // replace stuff in mcmod.info, nothing else
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'

        // replace version and mcversion
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }

    // copy everything else except the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}
</code></pre>
<p dir="auto">1.7.10：</p>
<pre><code>
buildscript {
    repositories {
        mavenLocal()
        mavenCentral()

        maven {
            url = "https://lss233.com/artifactory/minecraft"
        }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
    }
}

apply plugin: 'forge'

version = "1.0"
group= "com.yourname" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"

minecraft {
    version = "1.7.10-10.13.4.1558-1.7.10"
    runDir = "eclipse"
}

dependencies {
    // you may put jars on which you depend on in ./libs
    // or you may define them like so..
    //compile "some.group:artifact:version:classifier"
    //compile "some.group:artifact:version"

    // real examples
    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
    // for more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html
    compile project(':PokeMarketCommon')
}

processResources
{
    // this will ensure that this task is redone when the versions change.
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    // replace stuff in mcmod.info, nothing else
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'

        // replace version and mcversion
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }

    // copy everything else, thats not the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}
</code></pre>
<p dir="auto">对于使用Gradle进行插件开发的小伙伴<br />
在build.gradle里的 repositories { .... }里面加入一行:</p>
<pre><code>maven {
            url 'https://lss233.com/artifactory/minecraft/'
}
</code></pre>
<p dir="auto">对于啥都不用的小伙伴</p>
<p dir="auto">你可以用浏览器直接打开本仓库的网址，自行寻找你想要的依赖。</p>
<p dir="auto">如果您有什么需要补充的仓库，或者想要提交自己的工件，也可以告诉我喔。<br />
另外，如果出现504 Gateway Time-out 的情况，应该是不会影响你的构建程序自动下载文件的。<br />
如果本仓库无法正常使用，<strong>请提醒我</strong>，我会尽快修复。</p>
<p dir="auto">最后<br />
本人是没有稳定收入的学生，维护这个镜像服务需要不小的开销。<br />
关于本镜像源的更新会首发于本人博客，你可以<a href="https://blog.lss233.com/lss233minecraft-mod/" rel="nofollow ugc">点击这里访问</a>。<br />
如果这个东西对您有帮助、想支持我继续下去，可以了解一下我在<a href="https://afdian.net/@lss233" rel="nofollow ugc">爱发电</a>的主页喔~</p>
]]></description><link>https://node.zuimc.hiwbb.com/topic/30999/资源-分享针对国内开发者的maven源镜像</link><generator>RSS for Node</generator><lastBuildDate>Mon, 30 Nov 2026 14:45:26 GMT</lastBuildDate><atom:link href="https://node.zuimc.hiwbb.com/topic/30999.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Feb 2019 16:31:17 GMT</pubDate><ttl>60</ttl></channel></rss>