Make rpm-maven-plugin work on MAC OS (mavericks)

I use rpm-maven-plugin to create the installation package. This works fine on UBUNTU, but when I run it on mac os, I met the following errors. Is there any way to make it work on mac os?

<groupId>org.codehaus.mojo</groupId> <artifactId>rpm-maven-plugin</artifactId> <executions> <execution> <phase>prepare-package</phase> <goals> <goal>rpm</goal> </goals> </execution> </executions> [WARNING] /bin/sh: rpm: command not found [ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.0.1:rpm (default) on project mongodb: RPM query for default vendor returned: '127' executing '/bin/sh -c rpm -E '%{_host_vendor}'' -> [Help 1] 
+8
java maven rpm
source share
2 answers

it calls the native rpm command , which is available in your ubuntu environment, for your Apple environment you will need to install rpm executable

 $ brew install rpm $ brew install rpmbuild 
+9
source share

Needless to say, you can also install it through macports:


$> sudo port install rpm

---> Calculation of dependencies for rpm

---> Dependencies to be installed: beecrypt neon kerberos5 libcomerr openssl libproxy python27 db48 db_select python_select sqlite3 vala

---> Extract archive for beecrypt

---> Trying to get beecrypt-4.2.1_5.darwin_14.x86_64.tbz2 from http://packages.macports.org/beecrypt

...

---> Apply patches to rpm

---> Setting up rpm <== takes a long time

---> The rpm <== building takes a long time

---> Install rpm in destroot

---> Install rpm @ 4.4.9_17

---> Activation rpm @ 4.4.9_17

---> Cleaning rpm

---> Updating the binary database

---> Scan binary files for error binding

---> No broken files found.

$>

Note that in the setup above, the steps to “Configure rpm” and “Building rpm” took a lot of time, so be patient, work in the background (but do not print progress markers).


$> which rpm

/ Opt / local / bin / min


I ran into another problem when starting my build; rpmbuild step failed: "Could not open temporary file".

Solution https://www.redhat.com/archives/rpm-list/2002-June/msg00258.html -

$> vi $HOME/.rpmmacros

& add one line to it

%_tmppath /tmp

You have to be golden.

+4
source share

All Articles