Maven RPM Plugin fails to find rpm command in intellij
I have a module I am trying to package as an RPM using Maven RPM plugin. When I run mvn package from the command line, it generates the rpm as expected. When I try to run the package phase from within Intellij, it seems unable to find the rpm command:
[WARNING] /bin/sh: rpm: command not found
...followed later by:
[ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1-alpha-1:rpm (default-rpm) on project ve_hive_client: RPM query for default vendor returned: '127' executing '/bin/sh -c rpm -E '%{_host_vendor}'' -> [Help 1]
My hunch is that my rpm installation (/usr/local/bin/rpm) 开发者_C百科isn't available in Intellij's PATH. Any idea how to add it?
had the same problem on ubuntu. i just installed the rpm program and the PATH then had rpm then.
/usr/bin/rpm
Maven did not complain then
try adding:
PATH=PATH:/usr/local/bin/rpm
in your .bashrc?
Not sure if this will help or not, but worth a try.
If you are running OSX and you've installed rpm using homebrew then it's not related with paths or rpm itself.
In OSX executing
/bin/sh -c rpm -E '%{_host_vendor}'
is different than executing
/bin/sh -c "rpm -E '%{_host_vendor}'"
The latter works pretty well.
Anyone found a way to fix this without changing the plug-in's source code?
精彩评论