Sakai
  1. Sakai
  2. SAK-18655

mvn -Ppack-demo install fails for Windows Vista on the 2.7.0 source code

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.9.0
    • Component/s: Global
    • Labels:
      None
    • Environment:
      Tested on two clients - Windows Vista Home Edition - Windows Vista SP1
    • 2.9 Status:
      Closed
    • 2.8 Status:
      Won't Fix
    • CLE Team Issue:
      Yes
    • Previous Issue Keys:
    • Release Notes:
      It has been reported that running mvn -Ppack-demo install fails for Windows Vista.

      Description

      Running mvn -Ppack-demo install fails with the error
      Could this be todo with the path transversal / and \

      for C:\Users\Alan\Desktop\sakai-2.7.0\pack-demo/target/pack-demo

      INFO] Building Sakai Pack Demo
      [INFO] task-segment: [install]
      [INFO] ------------------------------------------------------------------------
      [INFO] [site:attach-descriptor]
      [INFO] [install:install]
      [INFO] Installing C:\Users\Alan\Desktop\sakai-2.7.0\pack-demo\pom.xml to C:\Users\Alan\.m2\repository\org\sakaiproject\pack-demo\2.7.0\pack-demo-2.7.0.pom
      [INFO] [antrun:run {execution: pack-demo-clean}]
      [INFO] Executing tasks
         [delete] Deleting directory C:\Users\Alan\Desktop\sakai-2.7.0\pack-demo\target\unpack
          [unzip] Expanding: C:\Users\Alan\.m2\repository\tomcat\tomcat\tomcat\5.5.28\tomcat-5.5.28.zip into C:\Users\Alan\Desktop\sakai-2.7.0\pack-demo\target\unpack
         [delete] Deleting directory C:\Users\Alan\Desktop\sakai-2.7.0\pack-demo\target\unpack\apache-tomcat-5.5.28\webapps
          [mkdir] Created dir: C:\Users\Alan\Desktop\sakai-2.7.0\pack-demo\target\unpack\apache-tomcat-5.5.28\webapps\ROOT
           [echo] Executing cd ../;mvn clean
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] An Ant BuildException has occured: Execute failed: java.io.IOException: CreateProcess: mvn -Dmaven.tomcat.home=C:\Users\Alan\Desktop\sakai-2.7.0\pack-demo/target/pack clean error=2

      1. pack_SAK-18655.patch.txt
        2 kB
        Aaron Zeckoski
      2. SAK-18655.diff
        3 kB
        Matthew Jones

        Issue Links

          Activity

          Hide
          Matthew Jones added a comment -
          Looks like it fails on all windows, have a fix but need to test on unix oses. It seems to involve the exec task and how you need to call it for windows.
          Show
          Matthew Jones added a comment - Looks like it fails on all windows, have a fix but need to test on unix oses. It seems to involve the exec task and how you need to call it for windows.
          Hide
          Matthew Jones added a comment -
          This patch worked for me to build the -Ppack-demo on Server 2008. Should test a few other versions to make sure it still works as I had to hard code the os.names.
          Show
          Matthew Jones added a comment - This patch worked for me to build the -Ppack-demo on Server 2008. Should test a few other versions to make sure it still works as I had to hard code the os.names.
          Hide
          Matthew Buckett added a comment -
          An alternative might be to use a Maven profile with OS activation:

          http://maven.apache.org/guides/introduction/introduction-to-profiles.html

          as you can specify the profile to be active based on the OS family and let maven decide what should be in that family.

          I'm not sure if it's better.
          Show
          Matthew Buckett added a comment - An alternative might be to use a Maven profile with OS activation: http://maven.apache.org/guides/introduction/introduction-to-profiles.html as you can specify the profile to be active based on the OS family and let maven decide what should be in that family. I'm not sure if it's better.
          Hide
          Anthony Whyte added a comment -
          Downgrading priority to critical following bug triage review by Berg, Kirschner, May, Leveque and Whyte.
          Show
          Anthony Whyte added a comment - Downgrading priority to critical following bug triage review by Berg, Kirschner, May, Leveque and Whyte.
          Hide
          Matthew Jones added a comment -
          This is part of the ant exec task.

          If we are going to firmly require ant > 1.7 (might already be the case) we can use the osfamily rather than os to simplify. Otherwise the value for "os" might change on each jvm rev. For os family it *really* just needs windows and "mac/unix" at the moment. We don't have any support for those other families. I'm not sure what version of ant the maven-antrun-plugin uses in pack-demo by default. perhaps this can be forced with this if it isn't 1.7 already.
                <dependency>
                   <groupId>org.apache.ant</groupId>
                   <artifactId>ant</artifactId>
                   <version>1.7.0</version>
                </dependency>

          OSFamily:
          Possible values include "unix", "dos", "mac", "os/2", "os/400", "z/os", "tandem" and "windows".
          Show
          Matthew Jones added a comment - This is part of the ant exec task. If we are going to firmly require ant > 1.7 (might already be the case) we can use the osfamily rather than os to simplify. Otherwise the value for "os" might change on each jvm rev. For os family it *really* just needs windows and "mac/unix" at the moment. We don't have any support for those other families. I'm not sure what version of ant the maven-antrun-plugin uses in pack-demo by default. perhaps this can be forced with this if it isn't 1.7 already.       <dependency>          <groupId>org.apache.ant</groupId>          <artifactId>ant</artifactId>          <version>1.7.0</version>       </dependency> OSFamily: Possible values include "unix", "dos", "mac", "os/2", "os/400", "z/os", "tandem" and "windows".
          Hide
          Aaron Zeckoski added a comment -
          The patch here was out of date for trunk so I brought it up to date. I need someone with windows to test this change (and note that there is a section in the build.xml which is commented out because it looked like it was not needed. If the build fails, try uncommenting that section)
          Show
          Aaron Zeckoski added a comment - The patch here was out of date for trunk so I brought it up to date. I need someone with windows to test this change (and note that there is a section in the build.xml which is commented out because it looked like it was not needed. If the build fails, try uncommenting that section)
          Hide
          Aaron Zeckoski added a comment -
          After QA is complete, we should merge this back to 2.9
          Show
          Aaron Zeckoski added a comment - After QA is complete, we should merge this back to 2.9
          Hide
          Matthew Jones added a comment -
          Hey Aaron, I saw you working on this, I don't think my last comment (re: osfamily) was reflected in the patch. Though I think I got stuck at trying to figure out how to enforce ant > 1.7.

          The current patch (with os) works, but would fail to work whenever Microsoft releases a new version of Windows. :/
          Show
          Matthew Jones added a comment - Hey Aaron, I saw you working on this, I don't think my last comment (re: osfamily) was reflected in the patch. Though I think I got stuck at trying to figure out how to enforce ant > 1.7. The current patch (with os) works, but would fail to work whenever Microsoft releases a new version of Windows. :/
          Hide
          Greg Thomas added a comment -
          Sent out a message to the dev list to see if we can get some people to help confirm this.
          Show
          Greg Thomas added a comment - Sent out a message to the dev list to see if we can get some people to help confirm this.
          Hide
          Yuki Yamada added a comment -
          I tested the patch on Windows Server 2003. It did not work.
          Since os.name is "Windows 2003", it is necessary to include it in build.xml.

          Remarks: os.name is not "Windows Server 2003".
          Show
          Yuki Yamada added a comment - I tested the patch on Windows Server 2003. It did not work. Since os.name is "Windows 2003", it is necessary to include it in build.xml. Remarks: os.name is not "Windows Server 2003".
          Hide
          Matthew Jones added a comment -
          Yea, I think this really needs to be osfamily, just wasn't sure about ant version until now.

          Thanks a ton for testing Yuki, I don't have access to Server 2003 anymore.

          The 1.6 version of antrun plugin (what trunk and 2.8 is using) has a dependency on
              <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant-nodeps</artifactId>
                <version>1.8.1</version>
              </dependency>

          The 1.7 version is
              <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant</artifactId>
                <version>1.8.2</version>
              </dependency>

          https://search.maven.org/#artifactdetails%7Corg.apache.maven.plugins%7Cmaven-antrun-plugin%7C1.7%7Cmaven-plugin

          I'll switch it over to use osfamily today. I don't think antrun would need to upgrade.
          Show
          Matthew Jones added a comment - Yea, I think this really needs to be osfamily, just wasn't sure about ant version until now. Thanks a ton for testing Yuki, I don't have access to Server 2003 anymore. The 1.6 version of antrun plugin (what trunk and 2.8 is using) has a dependency on     <dependency>       <groupId>org.apache.ant</groupId>       <artifactId>ant-nodeps</artifactId>       <version>1.8.1</version>     </dependency> The 1.7 version is     <dependency>       <groupId>org.apache.ant</groupId>       <artifactId>ant</artifactId>       <version>1.8.2</version>     </dependency> https://search.maven.org/#artifactdetails%7Corg.apache.maven.plugins%7Cmaven-antrun-plugin%7C1.7%7Cmaven-plugin I'll switch it over to use osfamily today. I don't think antrun would need to upgrade.
          Hide
          Matthew Jones added a comment -
          Reassigning to switch to osfamily
          Show
          Matthew Jones added a comment - Reassigning to switch to osfamily
          Hide
          Matthew Jones added a comment -
          Okay, committed fix for osfamily and build at least gets rolling for pack-demo and pack-bin on Windows 7. I also added a modules dependency for master to the base pom so it makes sure to build that first otherwise it seems to have problems with a clean install

           This is currently failing at:
               [exec] [ERROR] Failed to execute goal on project kernel-deploy: Could not r
          esolve dependencies for project org.sakaiproject:kernel-deploy:pom:2.10-SNAPSHOT
          : Could not find artifact com.sun:tools:jar:1.5.0 at specified path C:\Program Files\Java\jre6/../lib/tools.jar -> [Help 1]

          It looks like kernel has this as a dependency in component-manager? This just does not exist anymore it looks like? Looks like a separate issue though.
          Show
          Matthew Jones added a comment - Okay, committed fix for osfamily and build at least gets rolling for pack-demo and pack-bin on Windows 7. I also added a modules dependency for master to the base pom so it makes sure to build that first otherwise it seems to have problems with a clean install  This is currently failing at:      [exec] [ERROR] Failed to execute goal on project kernel-deploy: Could not r esolve dependencies for project org.sakaiproject:kernel-deploy:pom:2.10-SNAPSHOT : Could not find artifact com.sun:tools:jar:1.5.0 at specified path C:\Program Files\Java\jre6/../lib/tools.jar -> [Help 1] It looks like kernel has this as a dependency in component-manager? This just does not exist anymore it looks like? Looks like a separate issue though.
          Hide
          Matthew Jones added a comment -
          I think this was just because I didn't have the JAVA_HOME pointed to the right JDK. Just the fact that it said 1.5.0 was kind of concerning, but that number doesn't matter. This got a little further:

               [exec] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compil
          er-plugin:2.3.2:compile (default-compile) on project sakai-user-tool: Compilatio
          n failure
               [exec] [ERROR] error: Lombok annotation handler class lombok.javac.handlers
          .HandleData failed on C:\Users\Matthew\Downloads\sakai source\sakai-trunk\user\u
          ser-tool\tool\src\java\org\sakaiproject\user\tool\ImportedUser.java: java.lang.N
          oSuchFieldError: extending
               [exec] [ERROR] -> [Help 1]
          Show
          Matthew Jones added a comment - I think this was just because I didn't have the JAVA_HOME pointed to the right JDK. Just the fact that it said 1.5.0 was kind of concerning, but that number doesn't matter. This got a little further:      [exec] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compil er-plugin:2.3.2:compile (default-compile) on project sakai-user-tool: Compilatio n failure      [exec] [ERROR] error: Lombok annotation handler class lombok.javac.handlers .HandleData failed on C:\Users\Matthew\Downloads\sakai source\sakai-trunk\user\u ser-tool\tool\src\java\org\sakaiproject\user\tool\ImportedUser.java: java.lang.N oSuchFieldError: extending      [exec] [ERROR] -> [Help 1]
          Hide
          Matthew Jones added a comment -
          Okay, fixed that above error, mvn install -Ppack-demo now works for me under Windows 7 with the latest 1.7 JDK off the website: 1.7.0_03. If you could give it a test again Yuki that'd be great.
          Show
          Matthew Jones added a comment - Okay, fixed that above error, mvn install -Ppack-demo now works for me under Windows 7 with the latest 1.7 JDK off the website: 1.7.0_03. If you could give it a test again Yuki that'd be great.
          Hide
          Yuki Yamada added a comment -
          I tested the updated patch about pack-demo and pack-bin. They all worked.

          Test results:
          Windows XP: OK
          Windows Vista: OK
          Windows Server 2003: OK
          Windows Server 2008: OK
          Show
          Yuki Yamada added a comment - I tested the updated patch about pack-demo and pack-bin. They all worked. Test results: Windows XP: OK Windows Vista: OK Windows Server 2003: OK Windows Server 2008: OK
          Hide
          Greg Thomas added a comment -
          r104989 - 2.9.x merge
          Show
          Greg Thomas added a comment - r104989 - 2.9.x merge
          Hide
          Matthew Jones added a comment -
          This was tested by myself and Yuki
          Show
          Matthew Jones added a comment - This was tested by myself and Yuki
          Hide
          Steve Swinsburg added a comment -
          Can someone on a windows machine merge this to 2.8 please.
          Show
          Steve Swinsburg added a comment - Can someone on a windows machine merge this to 2.8 please.
          Hide
          Steve Swinsburg added a comment -
          Not merging to 2.8 since the release/pack process works fine on non Windows machines and I don't want to introduce any possible regression between maintenance releases. I also don't have a Windows machine to verify and it is a non critical fix for this branch.
          Show
          Steve Swinsburg added a comment - Not merging to 2.8 since the release/pack process works fine on non Windows machines and I don't want to introduce any possible regression between maintenance releases. I also don't have a Windows machine to verify and it is a non critical fix for this branch.

            People

            • Assignee:
              Matthew Jones
              Reporter:
              Alan Berg
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: