James Server
  1. James Server
  2. JAMES-848

run.bat and run.sh contain absolute entries to build path for runtime classpath

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, Trunk
    • Fix Version/s: 3.0-M1, 3.0.0
    • Component/s: Deployment Modules
    • Labels:
      None

      Description

      The run scripts will only work on the build machine until the build folder is there.

      The classpath should refer to the bundled lib folder, instead.

      1. JAMES-848-fix.patch
        1 kB
        Bernd Fondermann
      2. run.bat
        28 kB
        Stefano Bagnara

        Activity

        Hide
        Joerg Buchberger added a comment -

        Thanks! I can confirm that the committed fix works in my environment:
        Microsoft Windows XP [Version 5.1.2600] SP2
        Java 1.6.0_06-b02

        Show
        Joerg Buchberger added a comment - Thanks! I can confirm that the committed fix works in my environment: Microsoft Windows XP [Version 5.1.2600] SP2 Java 1.6.0_06-b02
        Hide
        Bernd Fondermann added a comment -

        This is a fix for the issue, I will commit it as soon as I'm able to.

        Show
        Bernd Fondermann added a comment - This is a fix for the issue, I will commit it as soon as I'm able to.
        Hide
        Bernd Fondermann added a comment -

        I can reproduce this.
        The problem is that $

        {spring-deployment.target.lib.dir}

        on Windows contains mixed slashes and backslashes like in
        C:\my\working\dir\trunk\spring-deployment/target/james-server-spring-deployment-3.0-SNAPSHOT/
        so <replace... > does not trigger (exe-classpath is all-backslashes) and this lead to no relative paths at all.
        The crippled paths are only a follow-up problem.

        Show
        Bernd Fondermann added a comment - I can reproduce this. The problem is that $ {spring-deployment.target.lib.dir} on Windows contains mixed slashes and backslashes like in C:\my\working\dir\trunk\spring-deployment/target/james-server-spring-deployment-3.0-SNAPSHOT/ so <replace... > does not trigger (exe-classpath is all-backslashes) and this lead to no relative paths at all. The crippled paths are only a follow-up problem.
        Hide
        Bernd Fondermann added a comment -

        target "generate-run-executable" in spring-deployment/build.xml should handle building batch files for both platforms, including relative paths and proper separators.
        in the prev comment, Stefano quoted only the first part of this target, but the remainder is important, too. If somebody experiencing problems here could try and post intermediate results for this target, including the values of $

        {exe-classpath}

        and $

        {targetlibs}

        , please. thanks!

        Show
        Bernd Fondermann added a comment - target "generate-run-executable" in spring-deployment/build.xml should handle building batch files for both platforms, including relative paths and proper separators. in the prev comment, Stefano quoted only the first part of this target, but the remainder is important, too. If somebody experiencing problems here could try and post intermediate results for this target, including the values of $ {exe-classpath} and $ {targetlibs} , please. thanks!
        Hide
        Stefano Bagnara added a comment -

        Given that the resulting script contains bad paths (e.g: not only they are absolute, but they use ";" instead of ":").
        maybe this ant snippet:

        <path id="targetlibs">
        <fileset dir="$

        {spring-deployment.target.lib.dir}

        ">
        <include name="*.jar" />
        </fileset>
        </path>
        <property name="exe-classpath" refid="targetlibs" />

        is not cross platform?

        I'm on ant 1.7.0 / j2sdk 1.4.2 / win32 i386

        Show
        Stefano Bagnara added a comment - Given that the resulting script contains bad paths (e.g: not only they are absolute, but they use ";" instead of ":"). maybe this ant snippet: — <path id="targetlibs"> <fileset dir="$ {spring-deployment.target.lib.dir} "> <include name="*.jar" /> </fileset> </path> <property name="exe-classpath" refid="targetlibs" /> — is not cross platform? I'm on ant 1.7.0 / j2sdk 1.4.2 / win32 i386
        Hide
        Stefano Bagnara added a comment -

        Here is the run.bat I find inside the dist/james-server-spring-deployment-3.0-SNAPSHOT.zip bin folder after running "ant" in the spring module.

        Show
        Stefano Bagnara added a comment - Here is the run.bat I find inside the dist/james-server-spring-deployment-3.0-SNAPSHOT.zip bin folder after running "ant" in the spring module.
        Hide
        Stefano Bagnara added a comment -

        No time/No checkout ATM, but may it be an ant version issue? When I posted this I was on ant-1.7.0 , j2sdk 1.4.2_16 on Windows Vista 32bit Italian.

        Show
        Stefano Bagnara added a comment - No time/No checkout ATM, but may it be an ant version issue? When I posted this I was on ant-1.7.0 , j2sdk 1.4.2_16 on Windows Vista 32bit Italian.
        Hide
        Robert Burrell Donkin added a comment -

        Looks ok to me know but maybe i'm not clear what to look for...

        Show
        Robert Burrell Donkin added a comment - Looks ok to me know but maybe i'm not clear what to look for...
        Hide
        Stefano Bagnara added a comment -

        Forgot to say that this is about the spring-deployment module.

        Show
        Stefano Bagnara added a comment - Forgot to say that this is about the spring-deployment module.

          People

          • Assignee:
            Bernd Fondermann
            Reporter:
            Stefano Bagnara
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development