Mojo's RPM Maven Plugin
  1. Mojo's RPM Maven Plugin
  2. MRPM-107

Get "The packaging for this project did not assign a file to the build artifact" on Mac

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-alpha-1
    • Fix Version/s: 2.1-alpha-3
    • Component/s: rpm
    • Labels:
      None
    • Environment:
      Mac OS 10.7.3, Mac Ports rpm
    • Number of attachments :
      1

      Description

      When doing "mvn clean install" on IT rpm-3 (for example) I get an error from Maven saying:
      The packaging for this project did not assign a file to the build artifact

      I think the problem is that the plugin thinks the naming of the rpm file is something different that it is on my Mac and Maven notices that the specified artifact file doesn't exist.

        Issue Links

          Activity

          Hide
          Graham Leggett added a comment -

          What worries me is that a lot of effort is being made to make this plugin work on MacOSX, when it is as yet not clear whether rpmbuild works properly on MacOSX at all.

          I looked last night to see whether rpm was available for MacOSX, and I've found a lot of people complaining that while they can get rpm installed, they cannot get rpmbuild to work for them. While it is true that in the Java world we want the Java code to work everywhere, rpm doesn't seem to practically work everywhere, and so we should focus our efforts on getting the plugin working where rpm works, and that means on Redhat derivatives.

          We also want to be careful of the RPM version in use. Newer versions of RPM found on Redhat derivatives have subtle difference in behaviour to the probably-older versions of RPM available for less mainstream RPM platforms. We don't want to force the plugin to only support older behaviour, and so break the plugin when used with up to date versions of RPM.

          For example, newer versions of RPM seem to lowercase the architecture string, while this test insists on using mixed case. Therefore, newer versions of RPM break. We should fix the test in this case to remove the mixed case.

          Show
          Graham Leggett added a comment - What worries me is that a lot of effort is being made to make this plugin work on MacOSX, when it is as yet not clear whether rpmbuild works properly on MacOSX at all. I looked last night to see whether rpm was available for MacOSX, and I've found a lot of people complaining that while they can get rpm installed, they cannot get rpmbuild to work for them. While it is true that in the Java world we want the Java code to work everywhere, rpm doesn't seem to practically work everywhere, and so we should focus our efforts on getting the plugin working where rpm works, and that means on Redhat derivatives. We also want to be careful of the RPM version in use. Newer versions of RPM found on Redhat derivatives have subtle difference in behaviour to the probably-older versions of RPM available for less mainstream RPM platforms. We don't want to force the plugin to only support older behaviour, and so break the plugin when used with up to date versions of RPM. For example, newer versions of RPM seem to lowercase the architecture string, while this test insists on using mixed case. Therefore, newer versions of RPM break. We should fix the test in this case to remove the mixed case.
          Hide
          Graham Leggett added a comment -

          One thing I've picked up is that the --target parameter is for some reason being hard coded to be 'noarch-apple-mac os x' - note the spaces in the target name. It is not clear as to why there is a target parameter is here at all. Rpmbuild contains it's own intelligence to figure out the target, and I've seen all sorts of weirdness occur if you try and override rpmbuild's idea of the target.

          Show
          Graham Leggett added a comment - One thing I've picked up is that the --target parameter is for some reason being hard coded to be 'noarch-apple-mac os x' - note the spaces in the target name. It is not clear as to why there is a target parameter is here at all. Rpmbuild contains it's own intelligence to figure out the target, and I've seen all sorts of weirdness occur if you try and override rpmbuild's idea of the target.
          Hide
          Graham Leggett added a comment -

          Having investigated the attached patch further, turns out that the patch fixes a problem on Linux machines that has the same message but a different cause to the problem on MacOSX. In order to ensure these aren't confused, I've created a new issue MRPM-122 to distinguish between the two.

          To show the difference in behaviour, all tests running fail as follows on MacOS:

          [INFO] Building: rpm-1/pom.xml
          [INFO] ..FAILED (11.2 s)
          [INFO]   The build exited with code 1. See /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/it/rpm-1/build.log for details.
          [INFO] Building: rpm-2/pom.xml
          [INFO] ..FAILED (8.5 s)
          [INFO]   The post-build script did not succeed. Expression: attachedRpm5.exists()
          [INFO] Building: rpm-3/pom.xml
          [INFO] ..FAILED (7.0 s)
          [INFO]   The build exited with code 1. See /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/it/rpm-3/build.log for details.
          [INFO] Building: rpm-artifact/pom.xml
          [INFO] ..FAILED (10.1 s)
          [INFO]   The post-build script did not succeed. /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/local-repo/org/codehaus/mojo/rpm/its/rpm-artifact/1.0/rpm-artifact-1.0-rpm.rpm does not exist
          [INFO] Building: rpm-disable/pom.xml
          [INFO] ..FAILED (5.8 s)
          [INFO]   The post-build script did not succeed. attached-jre5 RPM not created
          [INFO] Building: rpm-macros/pom.xml
          [INFO] ..FAILED (5.3 s)
          [INFO]   The build exited with code 1. See /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/it/rpm-macros/build.log for details.
          [INFO] Building: rpm-reactor/pom.xml
          [INFO] ..FAILED (10.3 s)
          [INFO]   The post-build script did not succeed. rpm file does not exist: /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/it/rpm-reactor/rpm-rpm/target/rpm/rpm-reactor-module-rpm/RPMS/noarch/rpm-reactor-module-rpm-1.0-rel.noarch.rpm
          
          Show
          Graham Leggett added a comment - Having investigated the attached patch further, turns out that the patch fixes a problem on Linux machines that has the same message but a different cause to the problem on MacOSX. In order to ensure these aren't confused, I've created a new issue MRPM-122 to distinguish between the two. To show the difference in behaviour, all tests running fail as follows on MacOS: [INFO] Building: rpm-1/pom.xml [INFO] ..FAILED (11.2 s) [INFO] The build exited with code 1. See /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/it/rpm-1/build.log for details. [INFO] Building: rpm-2/pom.xml [INFO] ..FAILED (8.5 s) [INFO] The post-build script did not succeed. Expression: attachedRpm5.exists() [INFO] Building: rpm-3/pom.xml [INFO] ..FAILED (7.0 s) [INFO] The build exited with code 1. See /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/it/rpm-3/build.log for details. [INFO] Building: rpm-artifact/pom.xml [INFO] ..FAILED (10.1 s) [INFO] The post-build script did not succeed. /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/local-repo/org/codehaus/mojo/rpm/its/rpm-artifact/1.0/rpm-artifact-1.0-rpm.rpm does not exist [INFO] Building: rpm-disable/pom.xml [INFO] ..FAILED (5.8 s) [INFO] The post-build script did not succeed. attached-jre5 RPM not created [INFO] Building: rpm-macros/pom.xml [INFO] ..FAILED (5.3 s) [INFO] The build exited with code 1. See /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/it/rpm-macros/build.log for details. [INFO] Building: rpm-reactor/pom.xml [INFO] ..FAILED (10.3 s) [INFO] The post-build script did not succeed. rpm file does not exist: /Users/minfrin/src/apache/sandbox/plexus/rpm-maven-plugin/target/it/rpm-reactor/rpm-rpm/target/rpm/rpm-reactor-module-rpm/RPMS/noarch/rpm-reactor-module-rpm-1.0-rel.noarch.rpm
          Hide
          Anders Hammar added a comment -

          I appreciate that Mac might not be a great platform to test this plugin, but to do changes to the code and put my name on that I want to be sure I don't do any sloppy fixes. That's simply just not me.
          Also, this ticket is about an issue on the Mac platform. So fixes here should be for that. If there is some other issue we should create a separate tucket, which you just did. Thanks!

          Show
          Anders Hammar added a comment - I appreciate that Mac might not be a great platform to test this plugin, but to do changes to the code and put my name on that I want to be sure I don't do any sloppy fixes. That's simply just not me. Also, this ticket is about an issue on the Mac platform. So fixes here should be for that. If there is some other issue we should create a separate tucket, which you just did. Thanks!
          Hide
          Anders Hammar added a comment -

          This issue has been solved by fixing MRPM-98.

          Show
          Anders Hammar added a comment - This issue has been solved by fixing MRPM-98 .

            People

            • Assignee:
              Anders Hammar
              Reporter:
              Anders Hammar
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: