Maven插件,Ant任务,或gradle这个插件,它会检查RPM已安装 [英] maven plugin, ant task, or gradle plugin which checks that rpm has been installed

查看:184
本文介绍了Maven插件,Ant任务,或gradle这个插件,它会检查RPM已安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是任何人都知道一个Maven插件,Ant任务,或gradle这个插件,它可以验证一个rpm已经安装了Linux系统上的?在谷歌搜索结果上来的所有插件似乎着力打造的RPM,而不是检查RPM依赖例如

Is anyone aware of a maven plugin, ant task, or gradle plugin which can verify that an rpm has already been installed on a Linux system? All the plugins coming up in google results seem to be focused on creating RPMs rather than checking for RPM dependencies e.g.

  • c-builds plugin http://mojo.codehaus.org/cbuild-parent/
  • rpm-maven-plugin http://mojo.codehaus.org/rpm-maven-plugin/index.html

上下文:我们有一些Maven的本机神器插件依赖于从OpenSSL的-DEVEL RPM的/usr/include/openssl/ssl.h和/usr/lib/libssl.a。我想一个方法来验证的OpenSSL DEVEL RPM已安装。

Context: we have some maven-native-plugin artifacts which depend on the /usr/include/openssl/ssl.h and /usr/lib/libssl.a from the openssl-devel RPM. I'd like a way to verify that the openssl-devel RPM has been installed.

我的问题是一种类似于是否有一个Maven插件获取一个rpm 。但我没关系,如果该插件就可以印证一个RPM安装了Red Hat Linux系统上,实际上在获取RPM只会是一个不错的。

My question is kind of similar to Is there a Maven plugin to fetch an rpm. But I'm okay if the plugin just confirms that an RPM is installed on a Red Hat Linux system, actually fetching the RPM would just be a nice to have.

推荐答案

您可以写一个小行家执法规则,只是调用调用Runtime.getRuntime()。EXEC(转-q的OpenSSL DEVEL),并解析输出。它的简单和快捷。如果你没有找到RPM执法者可以打破建立,给你一个头了。

You can write a small maven enforcer rule that just calls Runtime.getRuntime().exec("rpm -q openssl-devel") and parse the output. It's simple and fast. If you don't find the rpm the enforcer can break the build and give you a heads up.

  • http://maven.apache.org/enforcer/maven-enforcer-plugin/
  • http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html

这篇关于Maven插件,Ant任务,或gradle这个插件,它会检查RPM已安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆