我是靠谱客的博主 感动方盒,这篇文章主要介绍gradle maven 国内仓库 java,现在分享给大家,希望可以做个参考。

init.gradle

allprojects {
    repositories {
         maven {
			name 'aliyun'
            url 'http://maven.aliyun.com/nexus/content/groups/public/'
         }
    }
}



conf/setting.xml

<localRepository>F:Program Filesmavenrepo</localRepository>

<mirror>
      <id>aliyun</id>
      <mirrorOf>central</mirrorOf>
      <name>aliyun-maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>

编译当前目录下的libs文件夹里的文件

compile fileTree(dir:'libs',include:['*.jar'])

主文件

 jar {
   manifest {
     attributes(
       'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
       'Main-Class': 'demo3.App'
     )
   }
}


最后

以上就是感动方盒最近收集整理的关于gradle maven 国内仓库 java的全部内容,更多相关gradle内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(33)

评论列表共有 0 条评论

立即
投稿
返回
顶部