title: rpm-maven-plugin and OS X
body: <p>I'm trying to set up a maven project on OSX and use the <code>rpm-maven-plugin</code> to build it as an RPM package. However, even the simplest configuration of the plugin seems to fail. The error I get is <code>Bad exit status from /usr/local/Cellar/rpm/5.4.10/var/tmp/rpm-tmp.50667 (%install)</code>. The verbose output doesn't give very much information. The generated spec file looks like this:</p>
  
  <pre><code>Name: server
  Version: 1.0
  Release: SNAPSHOT20130920084527
  Summary: MySummary
  License: 2013 MyCompany
  Distribution: MyDistribution
  Group: Application/SomeGroup
  Packager: me
  autoprov: yes
  autoreq: yes
  Prefix: /app/theapp
  BuildRoot: /Users/me/Projects/projectname/server/target/rpm/server/buildroot
  
  %description
  My Description
  
  %install
  if [ -e $RPM_BUILD_ROOT ];
  then
    mv /Users/me/Projects/projectname/server/target/rpm/server/tmp-buildroot/*         $RPM_BUILD_ROOT
  else
    mv /Users/me/Projects/projectname/server/target/rpm/server/tmp-buildroot $RPM_BUILD_ROOT
  fi
  
  %files
  %defattr(644,-,-,755)
    "/"
  </code></pre>
  
  <p>The command that builds the RPM is <code>/usr/local/bin/rpmbuild -vvv -bb --target noarch --buildroot /Users/me/Projects/projectname/server/target/rpm/server/buildroot --define '_topdir /tmp' server.spec</code></p>
  
  <p>I'm not really sure if it's an OSX problem or a general rpm-maven-plugin problem, but I suspect it is an OSX problem since I have been building RPMs with the rpm-maven-plugin on other platforms.</p>
  
  <p>Have anyone else succeeded in using the <code>rpm-maven-plugin</code> on OSX?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I'm using <code>rpm-maven-plugin</code> 2.1-alpha-3, OS X 10.8.4 and installed rpm via homebrew. I have also verified that the same config works on a CentOS Vagrant box.</p>