Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-1869

UI fails to build when maven is run as root

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0
    • Component/s: UI
    • Labels:
      None
    • Rank:
      1|hzypg7:

      Description

      When trying to build CDAP as root, I get the following error from Bower:

      [INFO] --- frontend-maven-plugin:0.0.20:bower (bower-install) @ cdap-ui ---
      [INFO] Running 'bower install' in /usr/src/cdap/cdap-ui
      [INFO] bower ESUDO         Cannot be run with sudo
      [INFO]
      [INFO] Additional error details:
      [INFO] Since bower is a user command, there is no need to execute it with superuser permissions.
      [INFO] If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
      [INFO]
      [INFO] http://www.joyent.com/blog/installing-node-and-npm
      [INFO] https://gist.github.com/isaacs/579814
      [INFO]
      [INFO] You can however run a command with sudo using --allow-root option
      

      Setting --allow-root works:

      diff --git a/cdap-ui/pom.xml b/cdap-ui/pom.xml
      index 8657694..505302d 100644
      --- a/cdap-ui/pom.xml
      +++ b/cdap-ui/pom.xml
      @@ -90,7 +90,7 @@
                         <goal>bower</goal>
                       </goals>
                       <configuration>
      -                  <arguments>install</arguments>
      +                  <arguments>install --allow-root</arguments>
                       </configuration>
                     </execution>
                     <execution>
      

        Attachments

          Activity

            People

            • Assignee:
              sree Sreevatsan Raman
              Reporter:
              chris Chris Gianelloni
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: