Wookie
  1. Wookie
  2. WOOKIE-152

Problem building Wookie using Ant 1.8 (was: Build paths doubling up Windows XP SP3 & 7)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.2
    • Fix Version/s: 0.9.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Tested on Windows XP SP3 & 7

      Description

      When building the wookie server I obtain the following error:

      build-feature:
      [javac] D:\Dev Wookie\trunk\features\build.xml:40: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

      BUILD FAILED
      D:\Dev Wookie\trunk\ant\ivy-java-common.xml:117: The following error occurred while executing this line:
      D:\Dev Wookie\trunk\build.xml:273: The following error occurred while executing this line:
      D:\Dev Wookie\trunk\features\build.xml:40: srcdir "D:\Dev Wookie\trunk\features\camera\features\camera\src" does not exist!

      It seems that the path is concatenating twice: trunk\features\camera\features\camera
      The same happens for the widgets (e.g.: trunk\widets\bubbles\widgets\bubbles)
      The xml files look fine:
      <src path="$

      {wookie.features.dir}

      /$

      {feature.shortname}

      /src" />
      I've check the two variables and they are fine...I have no clue where the doubling occurs.

      1. WOOKIE-152.patch
        0.8 kB
        Michael Aherne

        Issue Links

          Activity

          Hide
          Michael Aherne added a comment -

          It also works with Ant 1.7.1 and 1.8.2 on Windows 7.

          Show
          Michael Aherne added a comment - It also works with Ant 1.7.1 and 1.8.2 on Windows 7.
          Hide
          Scott Wilson added a comment -

          ... however I can confirm that Martin's fix for the portable version doesn't break anything on Mac OS X+Ant 1.8.2

          Show
          Scott Wilson added a comment - ... however I can confirm that Martin's fix for the portable version doesn't break anything on Mac OS X+Ant 1.8.2
          Hide
          Scott Wilson added a comment -

          D'oh, now this issue is verified I can't reopen it!

          Show
          Scott Wilson added a comment - D'oh, now this issue is verified I can't reopen it!
          Hide
          Martin Hawksey added a comment -

          Resolution doesn't work for portable version using ant 1.8.2

          F:\wookie\features\build.xml:40: srcdir "F:\ant\bin\features\camera\src" does no
          t exist!

          changed $

          {user.dir}

          to $

          {wookie.root.dir}

          and it worked

          Show
          Martin Hawksey added a comment - Resolution doesn't work for portable version using ant 1.8.2 F:\wookie\features\build.xml:40: srcdir "F:\ant\bin\features\camera\src" does no t exist! changed $ {user.dir} to $ {wookie.root.dir} and it worked
          Hide
          Steve Lee added a comment -

          Can confirm successful update, clean, build and run on OS X with Ant 1.8.2. Thanks for solving this.

          Show
          Steve Lee added a comment - Can confirm successful update, clean, build and run on OS X with Ant 1.8.2. Thanks for solving this.
          Hide
          Scott Wilson added a comment -

          Verified on Mac, Linux and Windows with Ant 1.7.1 and 1.8.2

          Show
          Scott Wilson added a comment - Verified on Mac, Linux and Windows with Ant 1.7.1 and 1.8.2
          Hide
          Michael Aherne added a comment -

          You're right, Ross - I did check that the features were working, but don't think I did a clean build. Glad it's fixed now!

          Show
          Michael Aherne added a comment - You're right, Ross - I did check that the features were working, but don't think I did a clean build. Glad it's fixed now!
          Hide
          Scott Wilson added a comment -

          Thanks Michael and Ross for working on this - I can confirm it works now on Mac OS X with Ant 1.8.2

          Show
          Scott Wilson added a comment - Thanks Michael and Ross for working on this - I can confirm it works now on Mac OS X with Ant 1.8.2
          Hide
          Ross Gardler added a comment -

          Thanks for the patch Michael. Whilst this appears to work it doesn't actually do so. However, I did take your inspiration to create a full fix.

          The difference was that we also need to add the $

          {user.dir}

          to the appropriate paths in the deploy target as well. This one didn't cause an error it just copied shared files to the wrong place and thus widgets using features didn't work.

          I suspect you missed this as you either didn't do a clean build and had the artefacts left from previous successful builds or you didn't actually try and run one of the widgets that used the features.

          Show
          Ross Gardler added a comment - Thanks for the patch Michael. Whilst this appears to work it doesn't actually do so. However, I did take your inspiration to create a full fix. The difference was that we also need to add the $ {user.dir} to the appropriate paths in the deploy target as well. This one didn't cause an error it just copied shared files to the wrong place and thus widgets using features didn't work. I suspect you missed this as you either didn't do a clean build and had the artefacts left from previous successful builds or you didn't actually try and run one of the widgets that used the features.
          Hide
          Michael Aherne added a comment - - edited

          Attached patch works for me with both Ant 1.7.1 and 1.8.2 on Windows XP (SP3), Wookie trunk rev 1087011

          Show
          Michael Aherne added a comment - - edited Attached patch works for me with both Ant 1.7.1 and 1.8.2 on Windows XP (SP3), Wookie trunk rev 1087011
          Hide
          Karsten Lundqvist added a comment -

          I can confirm this bug on Ubuntu 10.10 running ant 1.8

          Show
          Karsten Lundqvist added a comment - I can confirm this bug on Ubuntu 10.10 running ant 1.8
          Hide
          Steve Lee added a comment -

          So a solution would be to specify an abs path to <src> element. Does ant have predefined constants or a function for cwd?

          Show
          Steve Lee added a comment - So a solution would be to specify an abs path to <src> element. Does ant have predefined constants or a function for cwd?
          Hide
          Steve Lee added a comment -

          Here are some observations that may help solve this

          • The error seems to be the ant javac task fstating the generated srcdir before calling the compiler
          • The error is definitely in the conversion of a relative path in the src sub element to an absolute one (doesn't happen if you prefix with /)
          • Using srcdir attribute makes no difference
          • Using sourcepath="" has no effect
          • To convert to abs path it prefixes with /Users/stevelee/wookie/features/camera/ which is strange as the base dir can be expected to be /Users/stevelee/wookie or Users/stevelee/wookie/features/ as that is where those build files live and cwd is the former. There seems no reason for the camera bit at all.
          • It's possible to hypothesise that ant 1.8 cwds for a subant task but that still doesn't explain the camera bit.
          • <project basedir= has no effect.

          Finally I notice that wookie.features.dir is defined in the features build file but that definition is ignored. Also the parent build uses it but doesn't not define it. So perhaps its in an included file in parent and inherited so local definition in child doesn't get used? Is this what inherit all does?

          • perhaps something is define the base dir to be /Users/stevelee/wookie/features/camera/ but what?
          Show
          Steve Lee added a comment - Here are some observations that may help solve this The error seems to be the ant javac task fstating the generated srcdir before calling the compiler The error is definitely in the conversion of a relative path in the src sub element to an absolute one (doesn't happen if you prefix with /) Using srcdir attribute makes no difference Using sourcepath="" has no effect To convert to abs path it prefixes with /Users/stevelee/wookie/features/camera/ which is strange as the base dir can be expected to be /Users/stevelee/wookie or Users/stevelee/wookie/features/ as that is where those build files live and cwd is the former. There seems no reason for the camera bit at all. It's possible to hypothesise that ant 1.8 cwds for a subant task but that still doesn't explain the camera bit. <project basedir= has no effect. Finally I notice that wookie.features.dir is defined in the features build file but that definition is ignored. Also the parent build uses it but doesn't not define it. So perhaps its in an included file in parent and inherited so local definition in child doesn't get used? Is this what inherit all does? perhaps something is define the base dir to be /Users/stevelee/wookie/features/camera/ but what?
          Hide
          Scott Wilson added a comment -

          Updated title - its Ant, not Windows

          Show
          Scott Wilson added a comment - Updated title - its Ant, not Windows
          Hide
          Steve Lee added a comment - - edited

          I have the same issue on OS X 1.6.6 with Ant 1.8.2 and suggest this bug's title should changed to reflect this

          Show
          Steve Lee added a comment - - edited I have the same issue on OS X 1.6.6 with Ant 1.8.2 and suggest this bug's title should changed to reflect this
          Hide
          Scott Wilson added a comment -

          Fix for 0.8.2; there is a current workaround that needs adding to the FAQ

          Show
          Scott Wilson added a comment - Fix for 0.8.2; there is a current workaround that needs adding to the FAQ
          Hide
          Scott Wilson added a comment -

          Auro Tripathy on the mailing list noted this same problem is affecting builds on FC13

          Show
          Scott Wilson added a comment - Auro Tripathy on the mailing list noted this same problem is affecting builds on FC13
          Hide
          Franck Perrin added a comment -

          Just tried it on a Windows Server 2008 R2 distribution and the problem persists with Ant 1.8.1 but not with Ant 1.7.1 (Java 1.6.0_21)

          Show
          Franck Perrin added a comment - Just tried it on a Windows Server 2008 R2 distribution and the problem persists with Ant 1.8.1 but not with Ant 1.7.1 (Java 1.6.0_21)
          Hide
          Scott Wilson added a comment -

          Looks like this is the same problem we had before with Ant 1.8

          Show
          Scott Wilson added a comment - Looks like this is the same problem we had before with Ant 1.8
          Hide
          Franck Perrin added a comment -

          I've just tried with Ant 1.7.1, Java 1.6.0_21 on Win7 and the problem seems to be gone

          Show
          Franck Perrin added a comment - I've just tried with Ant 1.7.1, Java 1.6.0_21 on Win7 and the problem seems to be gone
          Hide
          Sander van der Waal added a comment -

          I could reproduce it on WinXP sp2 / Java 1.6.0_17 / Ant 1.8.1

          When trying again with same config except using Ant 1.7.1 instead of 1.8.1 the problem went away.

          It appears Ant 1.8 is also guilty for the 'includeantruntime' warning according to [1]. Setting that to explicitly (either to true or false) made no difference for the error in this report so I guess they are different issues.

          [1] http://www.coderanch.com/t/503097/tools/warning-includeantruntime-was-not-set

          Show
          Sander van der Waal added a comment - I could reproduce it on WinXP sp2 / Java 1.6.0_17 / Ant 1.8.1 When trying again with same config except using Ant 1.7.1 instead of 1.8.1 the problem went away. It appears Ant 1.8 is also guilty for the 'includeantruntime' warning according to [1] . Setting that to explicitly (either to true or false) made no difference for the error in this report so I guess they are different issues. [1] http://www.coderanch.com/t/503097/tools/warning-includeantruntime-was-not-set
          Hide
          Paul Sharples added a comment -

          I could not reproduce this problem either. (Tried on windows vista sp2 against java 1.6.0_17.)

          Show
          Paul Sharples added a comment - I could not reproduce this problem either. (Tried on windows vista sp2 against java 1.6.0_17.)
          Hide
          Scott Wilson added a comment -

          Thanks for the report, Franck. I can confirm seeing this on your machine, but it doesn't seem to happen on a Mac. Can someone running Windows try and replicate it?

          Show
          Scott Wilson added a comment - Thanks for the report, Franck. I can confirm seeing this on your machine, but it doesn't seem to happen on a Mac. Can someone running Windows try and replicate it?

            People

            • Assignee:
              Unassigned
              Reporter:
              Franck Perrin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development