/*
* 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. Shell编程进阶 1.6 if判断的几种用法

    针对文件和目录的逻辑判断 touch .txt .txt ]; then echo ok;fi -f 判断1.txt是否是文件且是否存在,成立输出ok if [-d /tmp/ ]; then ech ...

  2. DAY9-python并发之多进程理论

    一.背景知识 顾名思义,进程即正在执行的一个过程.进程是对正在运行程序的一个抽象. 进程的概念起源于操作系统,是操作系统最核心的概念,也是操作系统提供的最古老也是最重要的抽象概念之一.操作系统的其他所 ...

  3. Eclipse 快键键(持续更新)

    本人抛弃一些简单常见的快键键,例如 ctrl+c   ,+v ,+z之类的 1.ctrl+d 删除一整行 2.ctrl+f 搜索 3.光标选中几行,ctrl+alt+↓ 向下复制选中的那几行 4.光标 ...

  4. 2.2.3 Analyzing the output 分析对用户推荐书目的结果(2)

    2.2.3 Analyzing the output   在之前的程序运行结果中我们得到的结果输出是: RecommendedItem [item:104, value:4.257081]   程序要 ...

  5. 【WebRTC】简介

    WebRTC 名称源自网页实时通信(英语:Web Real-Time Communication)的缩写,是一个支持网页浏览器进行实时语音对话或视频对话的API.它于2011年6月1日开源并在Goog ...

  6. 利用rowid删除数据库中无主键的相同记录

    数据库中表没有添加主键,误插入了两条数据,现在需要删除其中一条记录. 利用rowid号,因为表中的每一行数据都有一个rowid,这个rowid 号是不同的,用select可以查询出来. select ...

  7. solr4.8中集成mmseg4j1.9.1

    要想在Solr中整合mmseg4j其实很容易,只需要如下几个步骤 1.下载(https://code.google.com/p/mmseg4j/downloads/list)并解压mmseg4j-1. ...

  8. 【总结整理】webGIS须知

    一般WebGIS项目中,前端展示数据的流程基本是先做数据入库.服务发布.然后前端调用展示 a.动态出图可以使用WMS中的GetMap请求. b.矢量查询可以使用WFS中的GetFeature请求. c ...

  9. Codeforces 1142D(dp)

    题目传送 先给出设计dp的结论: dp[i][j]:以第i个位置.以rankj的数拓展出去的方案数.意会一下,我实在想不好语言-- 其中所谓rankj=真·rank%11 找到拓展的规律,转移也就顺理 ...

  10. C++ 面向对象: I/O对象的应用

    1. 补充完整从text.txt文件读取数据后,再写入in.txt文件.2. 完成从text.txt文件读取数据后,进行排序,再写入in.txt文件.数据量自行设定.3. 请解决在主程序文件中加载多个 ...