JFROG RPM问题

时间:2019-04-01 06:23:19

标签: maven yum jfrog-cli rpm-maven-plugin

我们已经为RPM文件设置了一个jfrog存储库。 我们正在使用“ rpm-maven-plugin”构建RPM,并试图将rpm文件上传到jfrog存储库中。

我们尝试使用CMD- jfrog rt u“(* .rpm)” service / --recursive = false --props = rpm.metadata.version = test

我们还在maven的maven settings.xml和deploymentRepo标签中更新了jfrog repo,但仍然失败。

我们已成功在YUM存储库中部署了RPM,并且在存储数据中也更新了校验和,但无法与JFROG一起使用。

Maven RPM插件配置:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-rpm</id>
<phase>install</phase>
<goals>
<goal>rpm</goal>
</goals>
</execution>
</executions>
<configuration>
<needarch>noarch</needarch>
<targetOS>linux</targetOS>
<name>${artifact_name}</name>
<version>${rpm_version}</version>
<license>${name}</license>
<group>default</group>
<release>${rpm_release}</release>
<keyname />
<repackJars>false</repackJars>
<copyTo>${directory}/${artifact_name}${version}${release}.noarch.rpm</copyTo>
<requires>
<require>jre8 >= 1.8</require>
</requires>
<repackJars>false</repackJars>
<defineStatements>
<defineStatement>_build_sign DSA</defineStatement>
<defineStatement>_source_filedigest_algorithm md5</defineStatement>
<defineStatement>_binary_filedigest_algorithm md5</defineStatement>
<defineStatement>_source_payload w0.gzdio</defineStatement>
<defineStatement>_binary_payload w0.gzdio</defineStatement>
<defineStatement>__os_install_post %{nil}</defineStatement>
</defineStatements>
<preinstallScriptlet>
<scriptFile>${directory}/scripts/preinstall.sh</scriptFile>
</preinstallScriptlet>
<postinstallScriptlet>
<scriptFile>${directory}/scripts/postinstall.sh</scriptFile>
</postinstallScriptlet>
<preremoveScriptlet>
<scriptFile>${directory}/scripts/preremove.sh</scriptFile>
</preremoveScriptlet>
<postremoveScriptlet>
<scriptFile>${directory}/scripts/postremove.sh</scriptFile>
</postremoveScriptlet>
<defaultFilemode>644</defaultFilemode>
<defaultDirmode>711</defaultDirmode>
<defaultUsername>${user}</defaultUsername>
<defaultGroupname>${groupname}</defaultGroupname>
<mappings>
<mapping>
<directory>${dir_path}</directory>
<sources>
<source>
<location>${basedir}/../target/service-test.jar</location>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>

在上传时,我们遇到了以下错误。 [错误] [线程2]人工响应:403禁止

{
  "errors": [


{       "status": 404,       "message": "Checksum deploy failed. No existing file with SHA-1: abc"     }
  ]
}
[Error] Failed uploading 1 artifacts.
{
  "status": "failure",
  "totals":

{     "success": 0,     "failure": 1   }
}

我们能够使用JFROG GUI成功上传相同的RPM文件。

1 个答案:

答案 0 :(得分:0)

我已经解决了问题。现在,我们正在使用checksum(SHA)插件创建Maven工件,并将其部署在jfrog中。

<groupId>net.ju-n.maven.plugins</groupId> <artifactId>checksum-maven-plugin</artifactId>