JFROG 转速问题
JFROG RPM issues
我们已经为 RPM 文件设置了一个 jfrog 存储库。
我们正在使用 'rpm-maven-plugin' 构建 RPM 并尝试将 rpm 文件上传到 jfrog 存储库。
我们尝试使用 CMD- jfrog rt u "(*.rpm)" service/ --recursive=false --props=rpm.metadata.version=test
我们还更新了 maven settings.xml 和 maven 中的 deploymentRepo 标签,用于 jfrog 回购,但仍然失败。
我们在 YUM 存储库中成功部署了 RPM,并且也在 repodata 中更新了校验和,但无法使用 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 Forbidden
{
"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 文件。
我已经解决了问题。现在我们正在使用校验和(SHA)插件创建 Maven 工件并部署在 jfrog 中。
<groupId>net.ju-n.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
我们已经为 RPM 文件设置了一个 jfrog 存储库。 我们正在使用 'rpm-maven-plugin' 构建 RPM 并尝试将 rpm 文件上传到 jfrog 存储库。
我们尝试使用 CMD- jfrog rt u "(*.rpm)" service/ --recursive=false --props=rpm.metadata.version=test
我们还更新了 maven settings.xml 和 maven 中的 deploymentRepo 标签,用于 jfrog 回购,但仍然失败。
我们在 YUM 存储库中成功部署了 RPM,并且也在 repodata 中更新了校验和,但无法使用 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 Forbidden
{
"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 文件。
我已经解决了问题。现在我们正在使用校验和(SHA)插件创建 Maven 工件并部署在 jfrog 中。
<groupId>net.ju-n.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>