Results 1 to 10 of 10
Like Tree1Likes
  • 1 Post By setevoy

Thread: Apache Maven: /bin/sh: 1: rpm: not found

  1. #1
    setevoy's Avatar
    setevoy is offline Member
    Join Date
    Aug 2013
    Location
    Kiev, UA
    Posts
    12
    Rep Power
    0

    Default Apache Maven: /bin/sh: 1: rpm: not found

    Hi.

    Sorry for so childish question - but I'm newbie in Maven and absolute zero in Java.

    But. I'm trying compile one project and got some errors. One from them absolutely weird for me.
    Here is end of build-log:

    Java Code:
    [INFO] [jar:jar {execution: only-library}]
    [INFO] [assembly:single {execution: default}]
    [INFO] Reading assembly descriptor: assembly.xml
    [INFO] Copying files to /home/setevoy/svn/***-4.3.0.50
    [WARNING] Assembly file: /home/setevoy/svn/l***-4.3.0.50 is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.
    [INFO] [rpm:rpm {execution: default-rpm}]
    [WARNING] /bin/sh: 1: rpm: not found
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] RPM query for default vendor returned: '127' executing '/bin/sh -c rpm -E '%{_host_vendor}''
    What RMP doing here? Is that mean RPM which is Red Hat Package Manager or something other one?

    All this working under:

    Java Code:
    Distributor ID: Debian
    Description:    Debian GNU/Linux 7.1 (wheezy)
    Release:        7.1
    
    Apache Maven 2.2.1 (rdebian-8)
    Java version: 1.6.0_27
    Thanks for any tips and sorry for any errors.

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    It might help if you post the actual POM content that is tied to the execution of RPM.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    setevoy's Avatar
    setevoy is offline Member
    Join Date
    Aug 2013
    Location
    Kiev, UA
    Posts
    12
    Rep Power
    0

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    Quote Originally Posted by gimbal2 View Post
    It might help if you post the actual POM content that is tied to the execution of RPM.
    Do you mean that one in */following_release/pom.xml?

    Java Code:
            <profiles>
                    <profile>
                            <id>rpm</id>
                            <activation>
                                    <activeByDefault>false</activeByDefault>
                                    <os>
                                            <name>Linux</name>
                                    </os>
                            </activation>
                            <modules>
                                    <module>limits-admin</module>
                            </modules>
                    </profile>

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    I'd expect there to be a Maven plugin definition somewhere to configure the RPM plugin.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    setevoy's Avatar
    setevoy is offline Member
    Join Date
    Aug 2013
    Location
    Kiev, UA
    Posts
    12
    Rep Power
    0

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    Quote Originally Posted by gimbal2 View Post
    I'd expect there to be a Maven plugin definition somewhere to configure the RPM plugin.
    Yes, there is it:

    Java Code:
    <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>rpm-maven-plugin</artifactId>
       <!-- version>2.0.1</version -->
       <version>2.0-beta-4</version>
    </plugin>
    But... How can it cause a problem like I posted it first topic? And - if that Error happened due to this plugin - how can I solve it? If it's possible :-)
    Thanks for any links or solutions if you have...

  6. #6
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    That looks like plugin management, not the actual plugin configuration. But I can't say because you keep posting tiny snippets. This is why it just won't work to research problems when you don't know the tech. Maven is quite difficult you know.

    You solve the problem by finding the cause of it, which will likely require reading the documentation of the RPM plugin. I don't personally know it so I can't tell you what the issue is. My only gut feeling is that the output executing '/bin/sh -c rpm -E '%{_host_vendor}'' looks a bit odd, I have the idea that the ${_host_vendor} bit should have been replaced with an actual value. So far you haven't posted anything that shows where this command is setup.

    RPM Maven Plugin - Introduction
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  7. #7
    setevoy's Avatar
    setevoy is offline Member
    Join Date
    Aug 2013
    Location
    Kiev, UA
    Posts
    12
    Rep Power
    0

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    Here is build log with -debug info. May be it can help?

  8. #8
    setevoy's Avatar
    setevoy is offline Member
    Join Date
    Aug 2013
    Location
    Kiev, UA
    Posts
    12
    Rep Power
    0

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    A lot of thanks to all, guys.

    So - I migrated project to CentOS (which really use Red-Hat Package Manager aka RPM) instead of Debian - and now have:

    Java Code:
        [INFO] *** .......................................... SUCCESS [10.766s]  
        [INFO] ------------------------------------------------------------------------  
        [INFO] ------------------------------------------------------------------------  
        [INFO] BUILD SUCCESSFUL
    By the way, also have another problem like:

    Java Code:
        [WARNING] /bin/sh: rpmbuild: command not found  
        [INFO] ------------------------------------------------------------------------  
        [ERROR] BUILD ERROR
    Solution is install rpm-build package:

    Java Code:
        # yum -y install rpm-build.i686
    gimbal2 likes this.

  9. #9
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    Migrating to a different OS seems a bit drastic, but if you're helped this way - good job figuring it out. Problems in the installed environment are the worst IMO.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  10. #10
    setevoy's Avatar
    setevoy is offline Member
    Join Date
    Aug 2013
    Location
    Kiev, UA
    Posts
    12
    Rep Power
    0

    Default Re: Apache Maven: /bin/sh: 1: rpm: not found

    Quote Originally Posted by gimbal2 View Post
    Migrating to a different OS seems a bit drastic
    Well, I haven't any idea how to setup RPM in Debian-like OS'es, which uses APT :-) Anyway - this is to big "spike" I think. So - as it is just testing machine for future project it's seems good solution to change OS.

Similar Threads

  1. Replies: 0
    Last Post: 12-17-2012, 01:32 PM
  2. is this program to do with apache maven
    By swee in forum Apache Maven
    Replies: 4
    Last Post: 01-13-2012, 12:54 PM
  3. Installing Apache tomcat and maven into NetBeans
    By MostinCredible21 in forum Apache Commons
    Replies: 0
    Last Post: 01-03-2012, 08:57 PM
  4. Apache 1.3 Servlet not found
    By teckygamer in forum Java Servlet
    Replies: 1
    Last Post: 09-06-2010, 02:16 AM
  5. Replies: 2
    Last Post: 01-05-2010, 05:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •