我正在尝试将一个java lib发布到Bintray,然后通过在gradle中定义bintray repo在另一个项目中使用该lib。
当从本地计算机部署到Bintray时,这一切都有效,但是当我尝试从Travis CI运行它时,它似乎没有正确发布。
当我尝试在不同的gradle项目中添加依赖项时,它找不到人工制品,即使我知道它在哪里以及文件已经上传。
我注意到当我使用Travis时似乎没有正确创建maven-metadata.xml
,我的印象是Bintray会为我创建它。
.travis.yml
language: java
before_install:
- if [ -n "$TRAVIS_TAG" ]; then ./travis_prebuild.sh; fi
script:
- echo "Building artifacts"
- gradle clean build
- if [ -n "$TRAVIS_TAG" ]; then gradle createPom; fi
before_deploy:
- echo "Creating description file for bintray."
- ./travis_postbuild.sh
deploy:
provider: bintray
file: "descriptor.json"
user: $BINTRAY_USER
key: $BINTRAY_API_KEY
passphrase: $BINTRAY_GPG_PASSWORD
skip_cleanup: true
on:
tags: true
bintray-conf.json
{
"package": {
"name": "core",
"repo": "Qatja",
"subject": "wetcat",
"issue_tracker_url": "https://github.com/Qatja/core/issues",
"vcs_url": "https://github.com/Qatja/core.git",
"labels": ["MQTT", "Java"],
"public_download_numbers": true,
"public_stats": true
},
"version": {
"name": "@VERSION@",
"gpgSign": true
},
"files":
[
{"includePattern": "build/libs/(.*\.jar)", "uploadPattern": "@VERSION@/$1"},
{"includePattern": "build/(.*\.pom)", "uploadPattern": "@VERSION@/$1"}
],
"publish": true
}
答案 0 :(得分:0)
我想你需要重命名" descriptor.json"到" bintray-conf.json"。其余的看起来和我的工作配置差不多。
var input = "21/01/2050 00:00";
console.log( moment(input, 'DD/MM/YYYY HH:mm').format('MM/DD/YYYY HH:mm') );