/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/3.5.1/userguide/java_library_plugin.html
*/ // Apply the java-library plugin to add support for Java Library apply plugin: 'java-library'
apply plugin: 'maven-publish'
//只有group 和 version 可以编辑。。project.name 不能修改。。。
project.group="zkdg" project.version="0.1-SNAPSHOT" // In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
maven { url 'file:///E:/whm/repository/'} //使用file协议,本地仓库
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/'} // jcenter()
} dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:21.0'
compile 'emark:emark-manager:0.0.1-SNAPSHOT'
compile 'org.springframework:spring-context:4.3.9.RELEASE'
// Use JUnit test framework
testImplementation 'junit:junit:4.12' } //maven-publish 插件 提交到本地仓库
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
//若是war包,就写components.web,若是jar包,就写components.java
from components.java
}
}
repositories {
maven { if (project.version.endsWith('-SNAPSHOT')) {
url = "file:///E:/whm/repository/"
} else {
url = "release版本的仓库地址"
} // credentials {
// username 'nexus仓库用户名'
// password 'nexus仓库密码'
// }
}
}
}
gradle publishMavenPublicationToMavenRepository 运行命令(如果失败,请去掉gradle)

令人蛋疼的是gradle 无法下载文件到maven 仓库。。。。而是以缓存 存在。。。真够不习惯的,我还是用maven 吧。。而且 gradle 网上资料也有点少----

不过gradle的语法真的很美,看起来很漂亮。。不过目前来说还不是很好用-----

gradle 使用本地maven 仓库 和 提交代码到maven的更多相关文章

  1. git远程仓库、提交代码操作

    初始化仓库 1.初始化 git init #或 git clone 远程仓库地址 git init 后续要添加远程仓库,git clone不需要再添加 2.连接仓库 git remote add 远程 ...

  2. maven 动态版本 aliyun阿里云Maven仓库地址——加速你的maven构建

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  3. Git仓库创建---克隆仓库---初始提交代码

    1.在Git上创建仓库,添加成员,默认分支是“master”,仓库路径假设为http://192.168.1.1/root/project.git 2.在sourceTree上,点击“克隆”,输入上面 ...

  4. GIT 使用(二):创建仓库并提交代码

    基本操作 所用命令使用 windows 下安装 git-bash 运行 Table of Contents 先决条件 已经安装了 GIT 客户端 已经设置用户信息 如果没做可以看安装和配置 获取 Gi ...

  5. git连接不上远程仓库---visualstudio提交代码报错:no upstream configured for branch 'master'

    1,新建文件夹,在文件下下鼠标右键git bush--->git init,初始化仓库: 2,设置gitthub仓库地址:git remote add origin https://github ...

  6. 如何将本地git仓库中的代码上传到github

    1,  在github上新建一个仓库,比如为:CSS3Test,仓库地址为:https://github.com/hyuanyuanlisiwei/CSS3Test 2,本地git仓库中的文件项目为C ...

  7. (转)如何将本地git仓库中的代码上传到github

    1,  在github上新建一个仓库,比如为:CSS3Test,仓库地址为:https://github.com/hyuanyuanlisiwei/CSS3Test 2,本地git仓库中的文件项目为C ...

  8. 转:aliyun阿里云Maven仓库地址——加速你的maven构建

    maven仓库用过的人都知道,国内有多么的悲催.还好有比较好用的镜像可以使用,尽快记录下来.速度提升100倍. http://maven.aliyun.com/nexus/#view-reposito ...

  9. aliyun阿里云Maven仓库地址——加速你的maven构建

    maven仓库用过的人都知道,国内有多么的悲催.还好有比较好用的镜像可以使用,尽快记录下来.速度提升100倍. http://maven.aliyun.com/nexus/#view-reposito ...

随机推荐

  1. 前端seo小结,网页代码优化

    seo的目的:提高网站流量 search engine optimization 搜索引擎优化seo search engine marketing 搜索引擎营销sem 权重10个等级 等级越大,权重 ...

  2. vue-resource基础介绍

    1.vue-resource 的请求api是按照rest风格设计的,它提供了7种请求api get(url, [data], [options]); head(url,[data],[options] ...

  3. vray学习笔记(1)vray介绍

    vray是个什么东西? 它是个渲染器. 渲染器是个什么东西? 渲染器就是3d软件里面把模型画成一张图片的东西,渲染的过程就是把3D物体变成2D画面的过程. 模型是个什么东西? 模型就是模型,它由两部分 ...

  4. head first 设计模式 策略模式

    HEAD FIRST:策略模式定义了算法族,分别封装起来,让它们之间可以互相替换,此模式让算法的变化独立于使用算法的客户. 设计模式:定义一系列的算法,把它们一个个封装起来,并且使它们可以相互替换.本 ...

  5. Entity Framework Tutorial Basics(33):Spatial Data type support in Entity Framework 5.0

    Spatial Data type support in Entity Framework 5.0 MS SQL Server 2008 introduced two spatial data typ ...

  6. 多线程学习-基础(十三)(学习参考·网摘) ArrayBlockingQueue源代碼解析(base jdk 1.8)

    前记: 这个得首先声明一下,以下大部分内容均参考于:https://blog.csdn.net/wx_vampire/article/details/79585794,本随笔只作为学习作用,侵权删! ...

  7. git命令(一)

    git中每个版本的保存是记录每个版本的快照,只在乎这个文件是否改变. Workspace:工作区 Index / Stage:暂存区 Repository:仓库区(或本地仓库) Remote:远程仓库 ...

  8. jqueue使用ajax方式

    1.get: $.ajax({ type: "GET", url: baseUrl + "Showcontent/del_user?type=1&id=" ...

  9. Mybatis+maven自动构建dao、mapper、model

    1.Pom.xml文件配置: 代码: <plugins> <!-- Mybatis generator代码生成插件 配置 --> <plugin> <grou ...

  10. 转载-ActiveMQ通过JAAS实现的安全机制

    JAAS(Java Authentication and Authorization Service)也就是java认证/授权服务.这是两种不同的服务,下面对其做一些区别:验证(Authenticat ...