- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试使用 gradle 设置 Artifact (APK/aar 文件)构建过程,类似于我习惯使用 maven 的方式。
mvn release:prepare (Adjusts version, checks into SVN, creates the tag)
mvn release:perform -Dgoals=deploy (Pushes the artifact to http://artifactory.XXX.local/artifactory/libs-releases-local/)
我希望能够运行 gradle 命令并获得类似的结果。我正在使用 https://github.com/researchgate/gradle-release发布管理插件(工作正常,所以我很擅长发布)。但是当我运行命令 gradlew artifactoryPublish
Artifact 被部署在其他一些位置(好像它不尊重 gradle 文件中的 repoKey)
D:\my-lib-android-0.0.2>gradlew artifactoryPublish ... ... [buildinfo] Not using buildInfo properties file for this build. :artifactoryPublish Deploying build descriptor to: http://artifactory.XXX.local/artifactory/api/build Build successfully deployed. Browse it in Artifactory under http://artifactory.XXX.local/artifactory/webapp/builds/my-lib-android-0.0.2/1449880830949>
BUILD SUCCESSFUL
Total time: 9.692 secs
所以我的问题是如何修复我的设置,以便将 Artifact 推送到与此类似的 URL:
http://artifactory.XXX.local/artifactory/libs-releases-local/com/example/my-lib-android/0.0.2/my-lib-android-0.0.2.aar
build.gradle 文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '3.1.2')
classpath 'net.researchgate:gradle-release:2.3.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id 'net.researchgate.release' version '2.3.4'
}
apply plugin: "com.jfrog.artifactory"
apply plugin: 'maven-publish'
apply plugin: 'net.researchgate.release'
allprojects {
repositories {
jcenter()
maven {
url 'http://artifactory.XXX.local/artifactory/libs-releases-local'
}
}
}
artifactory {
contextUrl = "${artifactory_contextUrl}"
//The base Artifactory URL if not overridden by the publisher/resolver
publish {
repository {
repoKey = "libs-releases-local"
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
release {
revertOnFail = false
}
task build{
}
gradle.properties 文件:
version=my-lib-android-0.0.3-SNAPSHOT
artifactory_user=myUserName
artifactory_password=myPasssword
artifactory_contextUrl=http://artifactory.XXX.local/artifactory
最佳答案
使用android-maven
插件:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.2'
classpath 'com.github.dcendents:android-maven-plugin:1.0'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.2.0'
}
}
apply plugin: 'android-library'
apply plugin: 'com.jfrog.artifactory-upload'
apply plugin: 'android-maven'
configurations {
published
}
task sourceJar(type: Jar) {
from android.sourceSets.main.java
classifier "sources"
}
artifactoryPublish {
dependsOn sourceJar
}
artifacts {
published sourceJar
}
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = "libs-releases-local"
username = "${artifactory_user}"
password = "${artifactory_password}"
}
defaults {
publishConfigs('archives', 'published')
publishPom = true //Publish generated POM files to Artifactory (true by default)
publishIvy = false //Publish generated Ivy descriptor files to Artifactory (true by default)
}
}
}
关于android - Gradle 发布到 Artifactory 的特定仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34235086/
我需要为我在 artifactory 中的一个 repo 协议(protocol)删除超过特定天数的 Artifactory 版本。我的意思是假设我的 artifactory url repo 是:-
我需要为我在 artifactory 中的一个 repo 协议(protocol)删除超过特定天数的 Artifactory 版本。我的意思是假设我的 artifactory url repo 是:-
我们使用的是 Artifactory 版本 4.12.2。如果我有十个本地存储库,并且我只想在五个存储库中保留最新的二十个 Artifactory ,而在其他五个存储库中则没有限制。需要建议我如何实现
我们想要两个 JFrog Artifactory 实例,一个供公司本地网络内部的用户使用(完全开放访问),另一个可以从外部使用(访问受限)。因此,我们希望第二个实例镜像第一个实例的部分(或全部)存储库
我在 Artifactory (OpenSource) 中有一些 Artifactory : 我可以使用 下载 Artifactory jfrog CLI : jfrog rt config --us
如何将特定 Artifactory 复制到另一个 Artifactory 实例? 据我所知,导出/导入功能仅适用于完整系统或完整的单个存储库复制。我也不想复制完整的 repo 协议(protocol)
我知道 artifactory 使用基于校验和的存储,并且只会存储一个 Artifactory 的一个副本,即使我以不同的名称上传多个相同的副本也是如此。 因为我有很多项目都使用匿名版本但可能是相同的
假设我有 Artifactory “mylibrary-5.2.jar”和“mylibrary-5.3.jar”,分别代表我们的项目为我们的其他项目之一创建和发布的库的 5.2 和 5.3 版本。 A
阅读本 API 指南。我的 Artifactory 版本是 4.12.2。 https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+
我在玩一个全新的OOS artifactory安装。我有一个 jcenter 的远程存储库.我正在寻找一种将远程 Artifactory 手动缓存到 jcenter-cach 的方法与 artifac
我有 Artifactory Jfrog 6.16.0 Pro。我安装了插件 artifactCleanup 并针对存储库运行它。它删除了大约 500GB。下一步,我从垃圾箱中删除文件,现在它为零。最
JFrog Artifactory 支持 NuGet 源。您将如何配置 Chocolatey 以指向 Artifactory 服务器而不是 Chocolatey.org? 最佳答案 创建一个指向 Ch
Maven Publishing的新手。我们的团队已经开始使用Artifactory,我正在尝试找出如何发布到Artifactory,但使用的是自定义 Artifact ID。这是我的build.gr
我正在使用 Jfrog artifactory OSS 版本 5。我可以看到我的快照存储库太大,我想从快照存储库中删除不需要的 Artifactory 。 我想删除过去 6 个月内未下载的所有 Art
我正在使用 Jfrog artifactory OSS 版本 5。我可以看到我的快照存储库太大,我想从快照存储库中删除不需要的 Artifactory 。 我想删除过去 6 个月内未下载的所有 Art
情况是这样的,我们在公司有一个共享文件夹,当我们放置一个应用程序的安装程序时(两个文件 .sh,一个用于 bin,另一个用于 conf),这是一个手动操作。 我们正在尝试让 Jenkins 自动执行此
我目前正尝试在 Artifactory 中查询与核心项目相关的特定 Artifactory 。所有 Artifactory 都将以项目标签为前缀。示例:“proj1-core”。我使用 Artifac
我已经设置了一个 Artifactory (4.1.2) 的实例,我用它来存储 java Artifactory 。我使用如下配置的 gradle 插件将 Artifactory 推送到实例 arti
我想永久链接到Artifactory中工件的最新快照版本。如果我们使用的是1.0-SNAPSHOT,我想要一个可下载最新的1.0-SNAPSHOT JAR的URL。通过在服务器上的http://hos
当我下载,解压缩并启动artifactory.sh时,看到以下错误 2020-02-26T21:32:50.496Z [jfac ] [ERROR] [c1b4de79a3f11666] [.j.a.
我是一名优秀的程序员,十分优秀!