我的问题很"简单"但直到现在我才找到解决方案:
我有2个项目.
项目B 依赖于A(使用classifier dev或pro)
我用A分类器(dev)在A上执行安装目标
然后我编译B项目(我把依赖项放到A,用分类器DEV)
它运作良好.
但是当我对artifactory(目标部署)做同样的事情时,它不起作用 (并且存储库配置为"唯一")
它不起作用,因为神器?maven依赖?正试图下载A与分类器dev 和最新时间戳,buildnumber of whatever.
但是这个"逻辑"是错误的,因为最新的时间戳对A分类器pro有效!
我读了本地存储库和artifactory存储库之间的metadata.xml.有类似的(但不完全相同)
我错了什么?多谢你们!
在现有工件上将工件部署到Artifactory时,它不会将其与现有工件具有的构建关联.
例如:如果您使用Jenkins Artifactory插件来部署三个工件:
example.jar
example.pom
example.json
Run Code Online (Sandbox Code Playgroud)
然后,它将创建一个新构建,将这些构件与该构建相关联,并将构件部署到您指定的位置和repo.
假设使用buildName"example-build"和buildNumber 51将其部署到/libs-release-local/example/1.0/
如果您查看了工件,您将在构建选项卡上看到它与build-info.json相关联.
现在,假设您使用REST API将example.json部署到同一位置:
PUT /libs-release-local/example/1.0/example.json
Run Code Online (Sandbox Code Playgroud)
现在,新工件与build-info.json无关!
如何部署工件以使其与已存在的build-info.json相关联?(在此示例中,"/ example-build/51"构建).
无法执行此操作会导致各种问题(例如,当build_promotion完成时,它仅提升先前关联的工件,而不会提升以后部署的任何工件.)
作为从ant迁移到gradle的短期选择,我们希望仅在我们的ant构建的开始和结束时使用gradle,而不是从gradle内部运行ant。
基本上,我们想使用gradle将依赖项提取到目录,然后运行ant build将所有指定的jar放在目录中,然后使用gradle将工件从该目录发布到Artifactory。
这意味着gradle并不会实际构建工件,而是会在目录中找到它们,但是我们仍然希望对它们进行版本控制(因为它们将进入工件)
因此,我们希望使用Gradle动态地版本化和发布目录中的所有文件。
查看gradle文档,似乎Gradle和artifactory-publish插件专注于“要发布的模块”的更多静态定义。我很难让Gradle正确发布目录中文件的动态计数。
我已经尝试了以下内容(压缩),但到目前为止在我的测试中还行不通(因为MavenPublication名称似乎要求使用静态文本)-工件发布位当前未遍历适当的MavenPublications集:
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'artifactory-publish'
version = new Version( 1, 0, System.env.BUILD_NUMBER ) // set by Jenkins
ext.filesToPublish=['foo.jar', 'bar.ear']
publishing {
publications {
def i=0;
for ( s in filesToPublish ) {
++i
def vname="artifact" + i;
$vname(MavenPublication) {
artifact s
artifactId vname
}
}
}
}
artifactory {
contextUrl = 'http://.../artifactory'
publish {
repository {
repoKey='...'
username='...'
password='...'
}
defaults {
publications('artifact0')
publications('artifact1')
publications('artifact2')
}
}
resolve { …
Run Code Online (Sandbox Code Playgroud) 根据以下链接,Artifactory AQL通过仅返回感兴趣的字段,允许通过REST API"显示特定字段". https://www.jfrog.com/confluence/display/RTF/Artifactory+Query+Language#ArtifactoryQueryLanguage-DisplayingSpecificFields
如果我提供字段列表,它不起作用,见下文
不工作 - 不好要求(400)
items.find(...).include("name","repo")
作品
items.find(...).包括( "*")
任何人都可以建议
谢谢,Jag
我正在测试Artifactory 4.2.0 PRO.
非常好的功能是可以通过执行下载构建生成的所有文件的存档,例如:
curl -XPOST -u admin:password -H "Content-Type: application/json" http://localhost:8081/artifactory/api/archive/buildArtifacts -d '
{
"buildName": "Vehicle Routing Problem",
"buildNumber": "3",
"archiveType": "zip"
}' > build.zip
Run Code Online (Sandbox Code Playgroud)
但是,在使用AQL指定确切属性时,我无法找到是否有可能执行相同操作(下载存档).我一直在尝试上传其他工件,其属性与构建推送的属性完全相同,但它们不是由上面的代码段获取(我假设某种元数据存储在某处).
在不使用许多HTTP查询的情况下获取多个工件的可能性有多大?
问候.
我正在尝试为我们的神器服务器设置ssl.为此,我希望将nginx配置为反向代理.到目前为止,我做了以下工作
- 使用其docker镜像安装了artifactory pro
docker run --name artifactory-registry -p 8081:8081 -v $ARTIFACTORY_HOME/data -v $ARTIFACTORY_HOME/logs -v $ARTIFACTORY_HOME/backup -v $ARTIFACTORY_HOME/etc jfrog-docker-reg2.bintray.io/jfrog/artifactory-pro:latest
Run Code Online (Sandbox Code Playgroud)
- 使用Insatlled nginx sudo apt-get install nginx
我可以在http:// localhost:8081/artifactory/webapp /#/ home访问webapp, 然后在$ ARTIFACTORY_HOME/tomcat/conf/server.xml下的配置文件下访问
<Service name="Catalina">
<Connector port="8081"/>
<!-- This is the optional AJP connector -->
<Connector port="8019" protocol="AJP/1.3"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"/>
</Engine>
</Service>
Run Code Online (Sandbox Code Playgroud)
从在线发现的来源,nginx需要以下配置作为反向代理
server {
listen 80;
server_name yourdomain.com;
root /etc/tomcat7/webapps/apple;
proxy_cache one;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass …
Run Code Online (Sandbox Code Playgroud) 我们使用Artifactory来存储我们的maven生成的java工件.我们有许多相互依赖的相互关联的项目.是否可以使用maven或Artifactory来选择一个工件并查找具有该依赖关系的所有项目?
在下面的示例中,我想找到哪些项目使用artifact1 v1.0.0.我希望能够使用maven/Artifactory来查找artifact2依赖于此版本的依赖项,但找不到artifact3/4这一事实.理想情况下,如果我只是在寻找artifact1的使用而不管版本,那么找到artifact2也会很好.
<project>
<groupId>mygroup</groupId>
<artifactId>artifact1</artifactId>
<version>1.0.0</version>
</project>
<project>
<groupId>mygroup</groupId>
<artifactId>artifact2</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>mygroup</groupId>
<artifactId>artifact1</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>
<project>
<groupId>mygroup</groupId>
<artifactId>artifact3</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>mygroup</groupId>
<artifactId>artifact1</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
</project>
<project>
<groupId>mygroup</groupId>
<artifactId>artifact4</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>mygroup</groupId>
<artifactId>otherartifact</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>
Run Code Online (Sandbox Code Playgroud) 我们对JFrog Artifactory的专业版感兴趣.这需要大约3000美元.我们有一个来自我们所有系统的测试环境,并且还想为Artifactory Server提供这个.是否支付了测试安装(原始备份)?
乔治·
因为我是Jfrog神器的新手.如果我使用Artifactory开源作为我的生产存储库管理器,你能告诉我这没关系吗?
在我的公司使用Apache archiva之前,我可以看到它中部署了很多依赖文件.
现在我想进入Aritifactory OSS.我可以将Apache archiva中的所有工件迁移到jfrog artifactory中吗?
请指教.
谢谢.
我正在尝试在Windows Server上运行Artifactory但Artifactory服务无法启动.我在Hyper-V中的VM中运行Windows Server 2016 Datacenter.我已经尝试过使用和不使用Windows GUI的服务器安装.Artifactory通过Chocolatey安装:
choco install Artifactory -y
Run Code Online (Sandbox Code Playgroud)
当我尝试使用PowerShell启动服务时:
Start-Service Artifactory
Run Code Online (Sandbox Code Playgroud)
我立即在PowerShell中收到此错误:
由于以下错误,无法启动服务'artifactory(Artifactory)':无法在计算机上启动服务Artifactory'.'.
Windows事件日志按以下顺序显示这两个错误:
- 等待Artifactory服务连接时达到超时(30000毫秒).
- 由于以下错误,Artifactory服务无法启动:服务未及时响应启动或控制请求.
同样,这些错误立即发生,因此超时错误完全错误.
但我能够手动启动Artifactory流程:
C:\Program Files\artifactory\bin\artifactory.bat
Run Code Online (Sandbox Code Playgroud)
公地daemon.2017-08-10.log
[2017-08-10 10:02:53] [info] [ 2344] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:53] [info] [ 2344] Service Artifactory name Artifactory
[2017-08-10 10:02:53] [info] [ 2344] Service 'Artifactory' installed
[2017-08-10 10:02:53] [info] [ 2344] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 3420] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:54] [info] [ 3420] Updating service...
[2017-08-10 …
Run Code Online (Sandbox Code Playgroud)