前提背景
公司要封装一个工具类,把常用的mybatis,apollo,redis,初始化运行检查等等都封装在一起,项目建好了,但是打包发布nexus之后,别的项目死活拉不到依赖包,经查,是gradle...to Maven repositories.
// 一个可以让你把库上传到maven仓库的插件
apply plugin: 'maven'
// The signing plugin adds the...,可以通过签名知道谁创建了这个库文件,签名的时间等等信息
apply plugin: 'signing'
// 声明变量记录maven库地址
def mavenRepositoryUrl
// 判断是发布到正式库...'
// 下面的库地址指向的是我们私有仓库的snapshots 仓库
mavenRepositoryUrl = "http://xxxx.com/repository/maven-snapshots...password 'xxxx'
}
}
}
}
这样就可以通过Idea右边gradle工具栏的插件菜单来发布了
?