Flexunit 4.1 beta 1 ant task fails if SDK or project dir contains spaces

downloaded FlexUnit 4.1 beta 1 for its directory scanning and test loading support.  found a problem - if either the SDK dir (e.g. C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0) or the project dir (e.g. C:\Documents and Settings\flexuser\My Documents\mike\Adobe Flash Builder 4\AntFlexUnit4.1betaSampleCIProject) contain spaces, the flexunit ant task will fail, as the following output indicates:
<snip>
[flexunit] '+flexlib'
[flexunit] 'C:\Program'
[flexunit] 'Files\Adobe\Adobe'
[flexunit] 'Flash'
[flexunit] 'Builder'
[flexunit] '4\sdks\4.0.0\frameworks'
[flexunit] '-output'
[flexunit] 'C:\Documents'
[flexunit] 'and'
[flexunit] 'Settings\flexuser\My'
[flexunit] 'Documents\mike\Adobe'
[flexunit] 'Flash'
[flexunit] 'Builder'
[flexunit] '4\AntFlexUnit4.1betaSampleCIProject\target\bin\TestRunner.swf'
<snip>
BUILD FAILED
C:\Documents and Settings\flexuser\My Documents\mike\Adobe Flash Builder 4\AntFlex
Unit4.1betaSampleCIProject\build.xml:72: Compilation failed:
command line: Error: default arguments may not be interspersed with other options
everything worked fine if i relocated both the SDK and project dir.  unfortunately most of our developers use SDK and project directories with spaces.
what's the ETA for beta 2 ;-) ?  anxious to integrate this excellent new feature once the spacing problem is resolved.
thanks.
-mike

@mike - Ok I've updated my fork @ http://github.com/blegros/flexunit with the fix.  If you don't want to build from source, you can download the flexunit.zip file from my fork and just pull the Ant task out to use temporarily.  You can find the artifact from my fork's build @ http://flexunit.digitalprimates.net:8080/view/Contributors/job/blegros/lastSuccessfulBuild /artifact/flexunit.zip.
Let me know if this works out for you.
-Brian

Similar Messages

  • flexunit 4.1 B3 Ant task fails to run Air-based tests

    Folks,
    I am using FlexUnit4.1 Beta 3 and am seeing the <flexunit> Ant task fail when running tests that use the Air libraries. The project in question used to test just fine with version 4.0 earlier this year, but I just dusted it off after a branch change and tried re-running with 4.1and started seeing the failure.Here is the relevant console output:
    [com.djte.library:flexunit] Validating task attributes ...
    [com.djte.library:flexunit] Generating default values ...
    [com.djte.library:flexunit] Using default working dir [C:\EclipseWorkspace3.5\report.renderer_tests_2\Source\Flex]
    [com.djte.library:flexunit] Using the following settings for the test run:
    [com.djte.library:flexunit]     FLEX_HOME: [C:\iFABS_DE\dev\vert-d3flxcmn24\204100.32.0.20100926233508_d3flxcmn24]
    [com.djte.library:flexunit]     haltonfailure: [false]
    [com.djte.library:flexunit]     headless: [false]
    [com.djte.library:flexunit]     display: [99]
    [com.djte.library:flexunit]     localTrusted: [true]
    [com.djte.library:flexunit]     player: [air]
    [com.djte.library:flexunit]     port: [1024]
    [com.djte.library:flexunit]     swf: [C:\EclipseWorkspace3.5\report.renderer_tests_2\build\report.renderer.tests.unit.swf]
    [com.djte.library:flexunit]     timeout: [1800000ms]
    [com.djte.library:flexunit]     toDir: [C:\EclipseWorkspace3.5\report.renderer_tests_2\build\reports\xml]
    [com.djte.library:flexunit] Setting up server process ...
    [com.djte.library:flexunit] Starting server ...
    [com.djte.library:flexunit] OS: [Windows]
    [com.djte.library:flexunit] Opening server socket on port [1024].
    [com.djte.library:flexunit] Waiting for client connection ...
    [com.djte.library:flexunit] Launching player:
    [com.djte.library:flexunit] Found AIR version: 1.5
    BUILD FAILED
    C:\public\JavaTools\DJTE\latest\DjteLibrary\library.xml:57: The following error occurred while executing this line:
    : Error launching the test runner.
    The error message is not very specific... The last output seen before the failure is "Found AIR version: 1.5". This makes me wonder if the problem is related to how I have Air installed on my Windows XP machine. Come to think of it, I am not sure exactly how the host machine should be configured to run FlexUnit tests that require Air.  Do I really need Air to be installed?  I have Air 2.0.3.13070 installed, but the <flexunit> task thinks it found version 1.5 - hmmm...  I also have the debug Flash 10 player, and SWF appplications are configued to run using this player. Flex tests run fine, just not Air tests.  What am I missing?
    I see that 4.1 RC1 is now out, so I will grab that and give it a try.
    If anyone who tests air more often has any advice - I am all ears!
    Thanks,
    Trevor

    Thanks for your responses, Brian!
    Yes, I think I see the immediate problem.  The problem is that there is no Air runtime in our customized Flex SDK (based on 3.2), even though it appears to have the Air compile libraries. I had been attempting to use this custom SDK to run FlexUnit with, and I think that needs to change.
    Why was I doing this?
    Well, I had tripped over some problems with 4.1 earlier on when I attempted to run it without having FLEX_HOME set in the environment. So, now I have been setting FLEX_HOME programmatically in my code before calling the <flexunit> task. And I had figured that it would be a good idea to set FLEX_HOME to the same SDK that the tests had been built with, i.e. our customized one.  Now I am thinking that this is not necessary, since our end users will never have access to this SDK. I now think that I should be able to install a new stock Adobe Flex SDK on my CI server, install the Air runtime into it, and then use that location when I set FLEX_HOME.  Is that how others are doing it?  If anyone could validate this approach, I would be grateful.
    One question that arises in my mind now: How does the Air runtime get into the Flex SDK? I have installed the Air runtime using the installer from Adobe some time ago, so I am not quite sure what all that did.  I assume the  Air installer finds all the Flex SDKs on your machine and inserts the runtime in each location appropriately? Again, pardon my ignorance...
    I have just tried out the above idea, i.e. setting FLEX_HOME to a different SDK that has Air runtime, and the <flexunit> task worked when I ran it!  An Air window opened, the tests ran, and reports were generated. So, it would appear my problem is solved! Cool beans!
    Brian, you made some comments about another possible issue with the "custom app descriptor".  I am not sure if that applies to me or not.  How would I know whether or not we need that support?  Again, I know it would help if I was the developer who had actually written the Flex tests, but I am not...
    Anyway, I hope this thread helps other folks who are having similar issues.  I am going to reinstall a fresh Adobe SDK and the Air installer on a clean machine next, and see if the tests will run there.
    Before ending this thread, I do want to point out that the ant task might have need of improvement in the case in which the user attempts to run the air "player" but the Air runtime is not setup in the SDK. On Windows, the ant process simply hung at this point, apparently thinking that the launch of the player had been successful, but in reality, the message about the air runtime being not found had occurred. It might be nice if it exited gracefully with a warning message instead of hanging. Just a suggestion...
    Brian, as always, thanks again for your help with this issue.You guys are doing a great job with this project. Please keep it up!
    Thanks,
    Trevor

  • ANT Tasks Fail with Flex 4.5 SDK

    Hi, I am trying to build the StrobeMediaPlayback project with the build.xml found in the trunk. I am using the ant -v to show you the output here:
    compile.unittest:
        [mkdir] Created dir: /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build/StrobeMediaPlaybackTest
        [mxmlc] Loading configuration file /Users/dave/Code/svn/StrobeMediaPlayback/trunk/player/StrobeMediaPlaybackTest/StrobeMedia PlaybackTest-build-config.xml
        [mxmlc] /Applications/Adobe Flash Builder 4/plugins/com.adobe.flexbuilder.flexunit_4.0.1.277662/flexunitframework/libs/version4libs /Common/flexunit_0.9.swc(mx.core:ScrollControlBase)
        [mxmlc]
        [mxmlc] Error: Declaration of style 'textDecoration' conflicts with previous declaration in /Developer/SDKs/flex_sdk_4/frameworks/libs/spark.swc(spark.components.supportClasses:Grou pBase).
        [mxmlc]
        [mxmlc] /Applications/Adobe Flash Builder 4/plugins/com.adobe.flexbuilder.flexunit_4.0.1.277662/flexunitframework/libs/version4libs /Common/flexunit_0.9.swc(mx.controls:Button)
        [mxmlc]
        [mxmlc] Error: Declaration of style 'textDecoration' conflicts with previous declaration in /Developer/SDKs/flex_sdk_4/frameworks/libs/spark.swc(spark.components.supportClasses:Grou pBase).
        [mxmlc]
      [antcall] Exiting /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml.
      [antcall] Exiting /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml.
    BUILD FAILED
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:45: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:55: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:100: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    Caused by: /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:55: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:100: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    ... 17 more
    Caused by: /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:100: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:397)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    ... 30 more
    Caused by: /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at flex.ant.FlexTask.executeInProcess(Unknown Source)
    at flex.ant.FlexTask.execute(Unknown Source)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
    ... 42 more
    --- Nested Exception ---
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:55: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:100: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    Caused by: /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:100: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:397)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    ... 30 more
    Caused by: /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at flex.ant.FlexTask.executeInProcess(Unknown Source)
    at flex.ant.FlexTask.execute(Unknown Source)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
    ... 42 more
    --- Nested Exception ---
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:100: The following error occurred while executing this line:
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:397)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    Caused by: /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at flex.ant.FlexTask.executeInProcess(Unknown Source)
    at flex.ant.FlexTask.execute(Unknown Source)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
    ... 42 more
    --- Nested Exception ---
    /Users/dave/Code/svn/StrobeMediaPlayback/trunk/build.xml:220: mxmlc task failed
    at flex.ant.FlexTask.executeInProcess(Unknown Source)
    at flex.ant.FlexTask.execute(Unknown Source)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    Total time: 30 seconds
    dave$

    the flex tasks for 4.6 are pretty unreliable for me when deploying to networks

  • DesignWebCenterSpaces clean-stage ant task failed with error

    I followed the WC PS4 Developer Guide to Extend WC Spaces. For this I modified my config.properties and did as was mentioned in the guide. However when I run the ant "clean-stage" on build.xml I get the below error :-
    Can someone help to get this resolved ?
    Note: I have included antcontrib.jar in the specified location ${jdeveloper.install.home.directory}/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar
    Error:
    Buildfile: C:\JDeveloper\mywork\DesignWebCenterSpaces\DesignWebCenterSpaces\WebCenterSpacesExtensionLibrary\build.xml
    clean:
    [echo] ----------------------------
    [echo] ----Cleaning deploy directory ---
    [echo] ----------------------------
    init:
    pre-compile:
    [echo] ----------------------------
    [echo] ----Updating the manifest file with the
    correct version specification and implementation version
    [echo] ----------------------------
    BUILD FAILED
    C:\JDeveloper\mywork\DesignWebCenterSpaces\DesignWebCenterSpaces\WebCenterSpacesExtensionLibrary\internal-targets.xml:73: if doesn't support the nested "bool" element.
    Total time: 0 seconds

    internal-targets.xml
    <?xml version="1.0" encoding="US-ASCII" ?>
    <project name="WebCenterSpacesSharedLibExtensionInternal" default="init" basedir="."
    xmlns:wls="oracle.webcenter.tools.wls">
    <import file="internal-targets.xml"/>
    <property file="../config.properties"/>
    <property file="build.properties"/>
    <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
    <pathelement location="${jdeveloper.install.home.directory}/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar"/>
    </classpath>
    </taskdef>
    <taskdef name="ojdeploy"
    classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask"
    uri="oraclelib:OJDeployAntTask"
    classpath="${oracle.jdeveloper.ant.library}"/>
    <target name="init">
    <tstamp/>
    <mkdir dir="${output.dir}"/>
    <mkdir dir="${custom.profile.attribute.home}/classes"/>
    <mkdir dir="${custom.oam.task.flow.home}/classes"/>
    <mkdir dir="${custom.jar.custompagegstaskflow.home}/classes"/>
    <mkdir dir="${custom.rulebased.resource.home}/classes"/>
    <mkdir dir="${custom.java.code.home}/classes"/>
    <mkdir dir="${extending.spaces.home.dir}/RuleBasedResources/classes"/>
    <mkdir dir="${extending.spaces.home.dir}/JavaCodeAndSessionTimeout/classes"/>
    </target>
    <target name="clean" description="Cleans the project">
    <echo> ----Cleaning deploy directory ---</echo>
    <delete includeemptydirs="true" quiet="true">
    <fileset dir="${extending.spaces.home.dir}/deploy" includes="**/*"/>
    <fileset dir="${output.dir}" includes="**/*"/>
    <fileset dir="${custom.jar.custompagegstaskflow.out.dir}" includes="**/*"/>
    <fileset dir="${custom.profile.attribute.out.dir}" includes="**/*"/>
    <fileset dir="${custom.oam.task.flow.out.dir}" includes="**/*"/>
    <fileset dir="${oracle.jdeveloper.deploy.dir}" includes="**/*"/>
    <fileset dir="${custom.profile.attribute.home}/classes" includes="**/*"/>
    <fileset dir="${custom.oam.task.flow.home}/classes" includes="**/*"/>
    <fileset dir="${custom.jar.custompagegstaskflow.home}/classes" includes="**/*"/>
    <fileset dir="${extending.spaces.out.dir}" includes="**/*"/>
    <fileset dir="${extending.spaces.home}/classes" includes="**/*"/>
    <fileset dir="${extending.spaces.home.dir}/RuleBasedResources/deploy" includes="**/*"/>
    <fileset dir="${extending.spaces.home.dir}/JavaCodeAndSessionTimeout/deploy" includes="**/*"/>
    <fileset dir="${extending.spaces.home.dir}/RuleBasedResources/classes" includes="**/*"/>
    <fileset dir="${extending.spaces.home.dir}/JavaCodeAndSessionTimeout/classes" includes="**/*"/>
    </delete>
    </target>
    <target name="clean-local-manifest-file"
    description="This target cleans up the locally created manifest
    properties file">
    <delete file="manifestImpl.properties" quiet="true"/>
    </target>
    <target name="pre-compile" description="Specifies the version number for the manifest file">
    <property value="${restart.implementation.version.suffix}" name="restartVer"/>
    <if>
    <length string="${restartVer}" when="greater" trim="true" length="30" />
    <then>
    <property name="propValue" value="1"/>
    </then>
    <else>
    <property name="propValue" value="${restartVer}"/>
    </else>
    </if>
    <if>
    <!--Checking if the manifest file is available -->
    <available file="manifestImpl.properties" property="propavailable"/>
    <then>
    <property file="manifestImpl.properties"/>
    <!--Getting the larger of the 2 numbers, from the properties
    and the local manifest file -->
    <property value="${lastNumber}" name="lastCount"/>
    <if>
    <bool>
    <isgreaterthan arg1="${lastCount}" arg2="${propValue}"/>
    </bool>
    <then>
    <property name="valueToConsider" value="${lastCount}"/>
    </then>
    <else>
    <property name="valueToConsider" value="${propValue}"/>
    </else>
    </if>
    </then>
    <else>
    <!--Setting the property file if it does not exist-->
    <propertyfile file="manifestImpl.properties"
    comment="Implementation Version">
    <entry key="implVersion" value="${default.implementation.version}"/>
    </propertyfile>
    <property name="valueToConsider" value="${propValue}"/>
    </else>
    </if>
    <!--From the obtained value incrementing the value by one-->
    <var name="op1" value="${valueToConsider}"/>
    <var name="op2" value="1"/>
    <var name="op" value="+"/>
    <math result="result" operand1="${op1}"
    operation="${op}" operand2="${op2}" datatype="int"/>
    <!--Setting the value in properties file-->
    <propertyfile file="manifestImpl.properties">
    <entry key="lastNumber" type="int" value="${result}"/>
    </propertyfile>
    <property file="manifestImpl.properties"/>
    <property name="tempManifestImpelVersion" value="${implVersion}.${result}"/>
    <propertyfile file="manifestImpl.properties">
    <entry key="manifest.implementation.version"
    value="${tempManifestImpelVersion}"/>
    </propertyfile>
    <copy file="${manifest.template.directory}/MANIFEST.MF.TEMPL"
    tofile="${manifest.file.directory}/MANIFEST.MF"
    overwrite="true">
    <filterset>
    <filter token="IMPLEMENTATION_VERSION"
    value="${tempManifestImpelVersion}"/>
    <filter token="LIBRARY_NAME"
    value="${customer.library.name}"/>
    <filter token="CUSTOMER_NAME"
    value="${customer.name}"/>
    </filterset>
    </copy>
    <path id="custom.profile.attribute.classpath">
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-crawl-spi.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-admin.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-auth-plugin.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-auth-share.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-crawl-ses.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-crawl-ucm.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-api.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-adapter.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-service-view.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-skin.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/searchlet.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/activity-streaming-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/security-extension.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/peopleconnections-preference-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/peopleconnections-profile-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/serviceframework.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/modules/javax.jsp_1.2.0.0_2-1.jar"/>
    <pathelement path="${extending.spaces.home.dir}/ProfileCrawler/classes"/>
    </path>
    <path id="library.JSF.1.2">
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.jsf_1.2.9/glassfish.jsf_1.0.0.0_1-2-15.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.jsf_1.2.9/glassfish.jstl_1.2.0.1.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.jsf_1.2.9/javax.jsf_1.1.0.0_1-2.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.jsf_1.2.9/wls.jsf.di.jar"/>
    </path>
    <path id="library.WebCenter.Common">
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/command-api.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/command-spi.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/generalsettings-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/lifecycle-client.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/lifecycle-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/lifecycle-service.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/lock-service-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-api.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-adapter.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/search-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/scope-service-model.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/security-extension.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/serviceframework.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/wc-concurrent.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.portlet.server_11.1.1/oracle-portlet-api.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.portlet.server_11.1.1/wsrp-container.jar"/>
    </path>
    <path id="library.WebCenter.Spaces.Client">
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/webcenter-core-api.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/spaces-api.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/jdeveloper/webcenter/modules/oracle.webcenter.framework_11.1.1/spaces-webservice-client.jar"/>
    </path>
    <path id="library.ADF.Common.Runtime">
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.view_11.1.1/trinidad-api.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share_11.1.1/adf-share-support.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share.ca_11.1.1/adf-share-ca.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share.ca_11.1.1/adf-share-base.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share_11.1.1/adfsharembean.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share_11.1.1/adflogginghandler.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.idm_11.1.1/identitystore.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.javacache_11.1.1/cache.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.security_11.1.1/adf-share-security.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.security_11.1.1/adf-controller-security.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle/modules/javax.activation_1.1.0.0_1-1.jar"/>
    </path>
    <path id="library.Webcenter-app-core-model.jar">
    <pathelement location="../SourceFiles/lib/webcenter-app-core-model.jar"/>
    </path>
    <path id="library.Spaces-model.jar">
    <pathelement location="../SourceFiles/lib/spaces-model.jar"/>
    </path>
    <path id="library.Spaces-model-web.jar">
    <pathelement location="../SourceFiles/lib/spaces-model-web.jar"/>
    </path>
    <path id="library.MDS.Runtime">
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.mds_11.1.1/mdsrt.jar"/>
    </path>
    <path id="library.MDS.Runtime.Dependencies">
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.mds_11.1.1/oramds.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share_11.1.1/adf-share-support.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share_11.1.1/adflogginghandler.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share.ca_11.1.1/adf-share-ca.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share.ca_11.1.1/adf-share-base.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/modules/javax.servlet_1.0.0.0_2-5.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/modules/javax.jsp_1.2.0.0_2-1.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/wlserver_10.3/server/ext/jdbc/oracle/11g/ojdbc6_g.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/jlib/commons-cli-1.0.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share_11.1.1/commons-el.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share_11.1.1/jsp-el-api.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.adf.share_11.1.1/oracle-el.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.bali.share_11.1.1/share.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.xmlef_11.1.1/xmlef.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.dms_11.1.1/dms.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle/modules/javax.activation_1.1.0.0_1-1.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.xdk_11.1.0/xml.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.javacache_11.1.1/cache.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.ucp_11.1.0.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.odl_11.1.1/ojdl.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.javatools_11.1.1/javatools-nodeps.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.jmx_11.1.1/jmxframework.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/oracle_common/modules/oracle.jmx_11.1.1/jmxspi.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/modules/javax.management_1.2.1.jar"/>
    <pathelement location="${jdeveloper.install.home.directory}/modules/javax.management.j2ee_1.0.jar"/>
    </path>
    <path id="classpath">
    <path refid="library.JSF.1.2"/>
    <path refid="library.WebCenter.Common"/>
    <path refid="library.WebCenter.Spaces.Client"/>
    <path refid="library.ADF.Common.Runtime"/>
    <path refid="library.Webcenter-app-core-model.jar"/>
    <path refid="library.Spaces-model.jar"/>
    <path refid="library.Spaces-model-web.jar"/>
    <path refid="library.MDS.Runtime"/>
    <path refid="library.MDS.Runtime.Dependencies"/>
    <path refid="custom.profile.attribute.classpath"/>
    </path>
    <echo> ----Pre custom java code ---</echo>
    <javac destdir="${custom.java.code.home}/classes" classpathref="classpath"
    debug="${javac.debug}" nowarn="${javac.nowarn}"
    deprecation="${javac.deprecation}" encoding="Cp1252" source="1.6"
    target="1.6">
    <src path="${custom.java.code.home}/src"/>
    </javac>
    <patternset id="copy.java.code.patterns">
    <include name="**/*.gif"/>
    <include name="**/*.GIF"/>
    <include name="**/*.jpg"/>
    <include name="**/*.JPG"/>
    <include name="**/*.jpeg"/>
    <include name="**/*.JPEG"/>
    <include name="**/*.png"/>
    <include name="**/*.PNG"/>
    <include name="**/*.properties"/>
    <include name="**/*.xml"/>
    <include name="**/*.ejx"/>
    <include name="**/*.xcfg"/>
    <include name="**/*.cpx"/>
    <include name="**/*.dcx"/>
    <include name="**/*.sva"/>
    <include name="**/*.wsdl"/>
    <include name="**/*.ini"/>
    <include name="**/*.tld"/>
    <include name="**/*.tag"/>
    <include name="**/*.xlf"/>
    <include name="**/*.xsl"/>
    <include name="**/*.xsd"/>
    </patternset>
    <copy todir="${custom.java.code.home}/classes">
    <fileset dir="${custom.java.code.home}/src">
    <patternset refid="copy.java.code.patterns"/>
    </fileset>
    </copy>
    </target>
    <target name="stage" description="Deploy JDeveloper profiles"
    depends="init, pre-compile">
    <echo> ----Compiling Custom Java Code ---</echo>
    <ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
    executable="${oracle.jdeveloper.ojdeploy.path}"
    ora:buildscript="${custom.java.code.out.dir}/ojdeploy-build.xml"
    ora:statuslog="${custom.java.code.out.dir}/ojdeploy-statuslog.xml">
    <ora:deploy>
    <ora:parameter name="workspace"
    value="${oracle.jdeveloper.workspace.path}"/>
    <ora:parameter name="project"
    value="JavaCodeAndSessionTimeout"/>
    <ora:parameter name="profile"
    value="custom_webcenter_spaces_customJavaCode"/>
    <ora:parameter name="nocompile" value="false"/>
    <ora:parameter name="outputfile"
    value="${custom.java.code.jar.name}"/>
    </ora:deploy>
    </ora:ojdeploy>
    <echo> ----Compling Custom WebCenterSpaces ---</echo>
    <ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
    executable="${oracle.jdeveloper.ojdeploy.path}"
    ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
    ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml">
    <ora:deploy>
    <ora:parameter name="workspace"
    value="${oracle.jdeveloper.workspace.path}"/>
    <ora:parameter name="project"
    value="${oracle.jdeveloper.project.name}"/>
    <ora:parameter name="profile"
    value="custom_webcenter_spaces_war"/>
    <ora:parameter name="nocompile" value="false"/>
    <ora:parameter name="outputfile"
    value="${oracle.jdeveloper.deploy.outputfile}"/>
    </ora:deploy>
    </ora:ojdeploy>
    <echo> Wrote the war to the following
    location ${oracle.jdeveloper.deploy.dir}/${shared.library.name} </echo>
    <mkdir dir="${oracle.jdeveloper.deploy.dir}/exploded"/>
    <mkdir dir="${oracle.jdeveloper.deploy.dir}/exploded/${customer.library.name}.war"/>
    <unzip src="${oracle.jdeveloper.deploy.dir}/${shared.library.name}"
    dest="${oracle.jdeveloper.deploy.dir}/exploded/${customer.library.name}.war"/>
    </target>
    <target name="init-wls">
    <path id="wls.classpath">
    <pathelement path="${wls.home}/server/lib/weblogic.jar"/>
    <pathelement path="${wls.home}/server/lib/xqrl.jar"/>
    </path>
    <taskdef name="wldeploy" classpathref="wls.classpath"
    classname="weblogic.ant.taskdefs.management.WLDeploy"/>
    </target>
    </project>

  • Clientgen Ant Task fails with "ClassNotFoundException: [B"

    I'm trying to run the clientgen Ant Task and I get weird error: a java.lang.ClassNotFoundException: [B
    Maybe Im missing something on my classpath but the cryptic message is preventing me from determining what exactly.
    Do you guys have any ideas?
    Extract build.xml:
    <clientgen ear="${expl.dir}"
    serviceName="SwiftcomInterfaceService"
    packageName="com.jnj.gtsc.swiftcom2.business.swiftcom.business.webservice.client"
    useServerTypes="True"
         warName="InterfaceWS"
         savewsdl="true"
    clientJar="${dist.dir}/swiftcomWS_client.jar" >
    <classpath refid="wsclient-classpath" />
    </clientgen>
    wsclient-classpath:
    contains only Weblogic 8.1 sp 6 webservice.jar and webserviceclient.jar
    Stacktrace:
    [clientgen] Generating client jar for swiftcom2Ear(SwiftcomInterfaceService) ...
    [clientgen] weblogic.webservice.server.ConfigException: unable to load class:[ java.lang.ClassNotFoundException: [B
    [clientgen] at weblogic.webservice.server.WebServiceFactory.loadClass(WebServiceFactory.java:1295)
    [clientgen] at weblogic.webservice.dd.MethodDescriptor.<init>(MethodDescriptor.java:45)
    [clientgen] at weblogic.webservice.server.WebServiceFactory.registerOperation(WebServiceFactory.java:813)
    [clientgen] at weblogic.webservice.server.WebServiceFactory.initOperations(WebServiceFactory.java:633)
    [clientgen] at weblogic.webservice.server.WebServiceFactory.createFromMBean(WebServiceFactory.java:220)
    [clientgen] at weblogic.webservice.tools.build.internal.WSDLGenImpl.getWebServiceRuntime(WSDLGenImpl.java:240)
    [clientgen] at weblogic.webservice.tools.build.internal.WSDLGenImpl.run(WSDLGenImpl.java:135)
    [clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.doClientGenFromEAR(ClientGenImpl.java:454)
    [clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.run(ClientGenImpl.java:348)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.doClientGen(ClientGenTask.java:352)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:208)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:341)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:309)
    [clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [clientgen] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    [clientgen] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:341)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:309)
    [clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [clientgen] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    [clientgen] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:341)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:309)
    [clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:196)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:235)

    I found out what the problem was: wrong version of JDK.
    I was calling my Ant script from Maven and it was executing the Ant script with the Java 6. Once I set the JAVA_HOME in the Maven call to a 1.4 JDK it worked.
    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.2</version>
                        <executions>
                             <execution>
                                  <id>run-ant</id>
                                  <phase>package</phase>
                                  <goals>
                                       <goal>exec</goal>
                                  </goals>
                             </execution>
                        </executions>
                        <configuration>
                             <executable>cmd.exe</executable>
                             <commandlineArgs>/X /C ${env.ANT_HOME}/bin/ant build-all</commandlineArgs>
                             <environmentVariables>
                                  <JAVA_HOME>${jdk-1.4}</JAVA_HOME>
                             </environmentVariables>
                        </configuration>
                   </plugin>

  • Jwsc Ant task fails with exception java.lang.AssertionError: java.io.IOExce

    I have the following task in my Ant file:
         <target name="build-service">
              <jwsc srcdir="src" destdir="${ear-dir}">
                   <jws file="examples/webservices/hello_world/HelloWorldImpl.java" />
              </jwsc>
         </target>The 'HelloWorldImpl.java' file is the following:
    package examples.webservices.hello_world;
    import javax.jws.WebService;
    @WebService(name = "HelloWorldPortType", serviceName = "HelloWorldService")
    public class HelloWorldImpl {
        public String sayHelloWorld(String message) {
            System.out.println("sayHelloWorld:" + message);
            return "Here is the message: '" + message + "'";
    }When I run 'build-service' And target I get the following error:
    ...build.xml:24: java.lang.AssertionError: java.io.IOExceptionI've tried to find this problem resolution but unsuccessfully.
    Could anyone help this or give a reasonable advice about this exception reason.

    Was getting this exception because of weblogic-container-binding.jar+ library missing. Added this library to classpath and the issue released.

  • SSIS script task failing when deployed as project in SSIS 2012

    Yes , it's the classic "my package works inside SSDT but dies when I deploy it". I  have a fairly good idea what the problem is. I have a line of code that looks in a directory. My guess is that the account that is used to run packages out
    of SSISDB doesn't have access to the directory in question. My question is, what exactly needs to be set properly in order for packages to run properly in the package deployment model.
    Error message: Exception has been thrown by the target of an invocation.
    Code:
    using System;
    using System.Data;
    using System.IO;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
     public void Main()
                String FilePath;
                FilePath = Dts.Variables["InitialDirectoryFullPath"].Value.ToString();
                if (Directory.GetFiles(FilePath).Length == 0)
                    Dts.Variables["FilesExist"].Value = false;
                else
                    Dts.Variables["FilesExist"].Value = true;
                Dts.TaskResult = (int)ScriptResults.Success;
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure

    You need to give the account which is executing package the access to the directory. If its from SQL Agent job, it might be using SQL Agent service account by default. Then you've to give it required permissions
    Alternatively you can create a proxy account with required permissions and configure the job to use it
    http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
    Also you've not posted error message. Whatever I've suggested is by assuming that its a permission issue. If you can post error message we might be able to confirm on the actual cause of error.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Webdav fails whenever connecting to a url containing spaces

    Whenever I attempt to connect to a webdav server that has spaces in the path, finder throws me an error.
    EG,
    1) Go->connect to server-> http://mywebdav.host.com/useraccount/documents/
    works fine
    2) Go->connect to server-> http://mywebdav.host.com/useraccount/my stuff/
    fails with
    *"There was an error connecting to the server “mywebdav.host.com”. Check the server name or IP address, and then try again.*
    *If you are unable to resolve the problem contact your system administrator."*
    It also fails if I try it with %20
    http://mywebdav.host.com/useraccount/my%20stuff/
    I've tested this on osx 10.6.6 and 10.6.7. It works correctly on 10.5.x.
    Has anyone else seen this?

    We are seeing the same problem. Not working for us. Tried both with and without trailing slashes, and also with and without %20 in the URL

  • [svn] 3105: SDK-15764, SDK-15765 -- Two long standing Ant task bugs.

    Revision: 3105
    Author: [email protected]
    Date: 2008-09-04 15:05:39 -0700 (Thu, 04 Sep 2008)
    Log Message:
    SDK-15764, SDK-15765 -- Two long standing Ant task bugs.
    - Ant Tasks fail when setting fork="true" and there are spaces in the path name
    - Setting fork="true" in Ant Tasks leads to warning
    The issue with spaces is that forked tasks construct a stringified commandline, since Java doesn't allow you to pass real String[] to a new process. When not forking, we can pass the original String[], which makes spaces irrelevent. So the fix uses a Commandline.toString(String[]) which is designed to wrap arguments with spaces correctly with quotes, so the commandline tokenizes correctly.
    Bugs: SDK-15764 SDK-15765
    QA: This affects ant calls for _all_ FlexTasks where fork=true. It would be great if we have tests for both fork="true" and "false" where we tested paths and arguments with and without spaces -- off the top of my head, good ones to try: +flexlib=/path/with spaces/, -define=CONFIG::foo,"bar with spaces", and any other arguments you can think of. Also very important: Test passing space arguments without quotes, with single quotes, with double quotes, with a mixture (illegal), and with a mixture escaping the inner set of quotes (not sure if this should work or not, probably a stupid case to test unless quotes are allowed in paths).
    Doc: No
    Reviewer: Pete
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-15764
    http://bugs.adobe.com/jira/browse/SDK-15765
    http://bugs.adobe.com/jira/browse/SDK-15764
    http://bugs.adobe.com/jira/browse/SDK-15765
    Modified Paths:
    flex/sdk/branches/3.0.x/modules/antTasks/src/flex/ant/FlexTask.java

  • Ant task to include Halo theme

    Hi,
    I recently migrated from Flex 3.4 to Flex 4. Everything works fine when I compile the application using Flash Builder 4. But I am having issues making our automated ant builds pick up the Halo theme over the Spark theme.
    In FB4, I just used the "Flex Theme" options under Project -> Properties to define the Halo theme as the default theme.Before that I used the -theme compiler argument. Both work fine.
    For our ant task, I tried adding:
      <compiler.theme dir="${FLEX_HOME}/frameworks" append="false">
                 <include name="/themes/Halo/halo.swc" />
      </compiler.theme>
    Unfortunately that does not seem to work and the result still shows the Spark theme. I also tried making "theme" a task attribute and the other options according to Flex 4 docs ( http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a63.html ), but to no avail.
    I have very limited experience with ant and would appreciate some input.
    Thanks!

    I just ran into this same issue yesterday, Here's what worked for me, placed between the <mxmlc>   </mxmlc> tags
    <theme dir="${FLEX_HOME}/frameworks/themes/Halo">
           <include name="halo.swc" />
    </theme>

  • Ant tasks and SSL

    Hi-
              I create my domain using the ant tasks (wlserver and wlconfig) but I can't figure out how to tell the domain to enable SSL and use a specific port. Doing this in the console is simple but I can't find any docs showing how to do this with the ant tasks.
              Anyone know how to do this for WL 8.1?
              Thanks!
              Dave

    Hello,
    The OracleAS 10g Web Services Ant tasks are documented in the OracleAS Web Services Developer Guide, these tasks allow you to do the various WS developement operation such as create a service using bottom-up approach, create clients, ...
    Also OracleAS 10g 1.0.1.3 provides Ant tasks for deployment of application to the container, this is documente in the OracleAS Deployment Guide
    Regards
    Tugdual Grall

  • Java.lang.NullPointerException running flexunit ant task in 4.1 Beta 2

    Hello,
    After trying to debug this all day, I thought I would ask the community.
    I am trying out the new FU4.1 Beta 2 (3.5) from the downloads page.  We have a working CI system set up with 4.0, and I thought trying out 4.1 beta 2 would simply be a matter of replacing the binaries in my lib folder and re-running the ant script.  Evidently not, or else I am missing something.
    After updating to the 4.1 Beta 2 binaries, if I re-run a sample project in Eclipse, the build fails with a java NullPointerException when the <flexunit> ant task is invoked. We have an involved setup that uses the groovy AntBuilder and other esoteric constructs, so I thought I would create a very simple test script similar to the sample CI project to see if that would work.  Unfortunately, I am still seeing the NPE.  The worst part is that there is absolutely no debug information provided - no message, no traceback.  I even attached the Ant source and debugged it. I could see the NPE being caught, but it contained a null message and null traceback.
    Here is the simplified ant script:
    <project name="tests" basedir=".">
        <target name="test-init" depends="">
            <mkdir dir="${build.dir}"/>
            <mkdir dir="${reports.dir}"/>
            <mkdir dir="${reports.xml}"/>
            <mkdir dir="${reports.html}"/>
            <!-- Setup Flex and FlexUnit ant tasks -->
            <!-- You can set this directly so mxmlc will work correctly, or set
            <taskdef resource="flexUnitTasks.tasks" classpath="${lib}/flexUnitTasks-4.1.0-beta2.18.jar" />
        </target>
        <target name="run-flex-tests" depends="test-init">
          <sequential>
            <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
            <flexunit
                swf="${build.dir}/TestRunner.swf"
                toDir="${reports.xml}"
                haltonfailure="false"
                verbose="true"
                localTrusted="true"
                timeout="60000"/>
            <!-- Generate readable JUnit-style reports -->
            <junitreport todir="${reports.xml}">
                <fileset dir="${reports.xml}">
                    <include name="TEST-*.xml" />
                </fileset>
                <report format="frames" todir="${reports.html}" />
            </junitreport>
          </sequential>   
        </target>
    </project>
    The output is:
    Buildfile: C:\EclipseWorkspace\tests\Source\Flex\build_test.xml
    test-init:
    run-flex-tests:
    [flexunit] Validating task attributes ...
    BUILD FAILED
    C:\EclipseWorkspace\tests\Source\Flex\build_test.xml:23: java.lang.NullPointerException
    Total time: 297 milliseconds
    Is there something obvious I am missing?
    Thanks for any help!
    Trevor

    Brian,
    OK, a colleague worked with me (thanks, John!) to debug the problem a little further, and I think we found the fundamental problem.  I wanted to post that info to save you some time...
    Aside: One thing we did have to do was to rebuild the flexUnitTasks.jar to include debug information, since the binary in the 4.1 beta 2 package did not have debug=true.  I'd suggest that we might want to change the build script to build the binaries with debug moving forward.
    Back to the problem.
    The NullPointerException is thrown in TaskConfiguration::validateSharedProperties(), when equals() is invoked. Here is the code snippet:
       //if we can't find the FLEX_HOME and we're using ADL or compilation
       if((flexHome == null || !flexHome.exists()) && (testRunConfiguration.getPlayer().equals("air") || shouldCompile()))
          throw new BuildException("Please specify, or verify the location for, the FLEX_HOME property.  "
                + "It is required when testing with 'air' as the player or when using the 'testSource' element.  "
                + "It should point to the installation directory for a Flex SDK.");
    In my case, I do not have a FLEX_HOME property set in Ant currently.  I'll bet most folks have this set, so the logic would run differently for them. For my case, the (flexHome == null) check is true.  That means that the testRunConfiguration.getPlayer().equals("air")check will occur next, and here is the problem. The "player" member is not set in the testRunConfiguration yet at this point, so testRunConfiguration.getPlayer() returns null. testRunConfiguration.setPlayer() is called in generateDefaults().  But generateDefaults() is not called until after validateSharedProperties() is called.  So, if properties initialization could be improved here and I think this code will run more robustly.
    I can work-around my issue temporarily by just setting a FLEX_HOME property in Ant.  But I hope you will agree that the initialization issue with "player" still should be addressed. Would you like me to open a bug report, or is this thread enough?
    Thanks,
    Trevor

  • Can i reference external flex-config in flexunit ant task?

    flexunit gurus,
    i'm trying to figure out how to best specify the compiler arguments for the flexunit ant task in flexunit 4.1 beta 1.  from the documentation i see this sample flexunit usage:
    <flexunit workingDir="${bin.loc}" toDir="${report.loc}"
    haltonfailure="false" verbose="true" localTrusted="true">
    <testSource dir="${main.src.loc}" />
    <testSource dir="${test.src.loc}">
    <include name="**/*Test.as" />
    </testSource>
    <library dir="${lib.loc}" />
    </flexunit>
    in this example, the source and library paths are explicitly listed.  in this simple example all the needed libraries reside within a single directory.
    when i build my application, i use a custom flex-config.xml file, as the following snippet shows:
            <mxmlc file="${application.file}" output="${swf.debug.file}" debug="true" headless-server="${headless.server}">
                <load-config filename="${flex.config.file}" />
            </mxmlc>
    in that custom flex-config.xml file i list all the build options (e.g. source dirs, library paths, theme, etc.) appropriate for building the application.  the libraries i reference are in a number of different directories (in general each 3rd party library is in a different directory).
    in the flexunit task, i could individually reference all the same libraries that are in the flex-config.xml, but that'd be a pain to keep them in sync.  i suppose i also could parse the flex-config.xml to extract the library information and use that to populate the library argument.  really what i want to say in the flexunit task is "build all source and tests as indicated in flex-config.xml, then run the tests", perhaps with a syntax like the following:
    <flexunit workingDir="${bin.loc}"  toDir="${report.loc}"
    haltonfailure="false" verbose="true" localTrusted="true">
                <load-config filename="${flex.config.file}" />
    <testSource dir="${test.src.loc}">
    <include name="**/*Test.as" />
    </testSource>
    <library dir="${flexunit.lib}" />
    </flexunit>
    i'd rather keep the flex-config.xml file free of any test specific information, so ideally i'd specify the path to the flexunit swc's and the test path in the flexunit task (as in the above example).
    is there support for such usage currently or planned for in the future?  recommendations on how best to accomplish my goal of not duplicating library information already present in a custom flex-config.xml?
    thanks.
    -mike

    hi brian,
    thanks for your response.
    i understand the desire to avoid re-implementing the flex sdk ant tasks.  i'm not sure that can reasonably be accomplished wihen the TestRunner is dynamically generated from within the flexunit task.  in addition to the source path and library path, the theme setting and namespaces settings can affect successful compilation, and the runtime-shared-library-path setting can affect whether the produced swf runs correctly.
    perhaps there's an alternative.  what if we separate the creation of the TestRunner.mxml from the compilation and the execution of the tests.  if flexunit offers an ant task that can produce (but not run) a TestRunner.mxml, i can write the mxmlc task that compiles it properly, and then i can invoke the old style flexunit specifying the swf argument.  this would still accomplish my primary goal of not needing to manually enumerate every test file in a TestRunner.mxml that i have to maintain (and which neither Flash Builder nor maven builds require).  to compile the TestRunner.mxml, i'd load in my custom flex-config.xml, then append to the source path and library path to include my test directory and flexunit libraries.
    maybe something like the following to create the TestRunner:
    <generatetestrunner output="${bin.loc}/TestRunner.mxml">
              <testSource dir="${test.dir}">
                 <include name="**/*Test.as" />
              </testSource>
    </generatetestrunner>
    thoughts?
    one other thing i noticed about the current library argument to flexunit is that it assumes a directory even if you provide an explicit path to an swc (i tried switching <library dir...> to <library file...> but that didn't seem to make a difference).  in my case, there are specific swc's i need in the library path, and the task assuming i mean a directory when i specify an explicit swc is problematic.  the directory my swc libraries are contained in sometimes contain multiple and conflicting versions of a library (each library directory contains various snapshot builds of the library).  i need a way to explicitly indicate which library to use.
    finally, could you point me to the java source for the flexunit ant tasks?  i've found the flexunit action script source ok but haven't found where the java ant task is defined.
    thanks.
    -mike

  • Flexunit ant task on CI Server - rundll32.exe causing problems

    My team is using flexunit and a CI server running Hudson. On a development system, everything runs fine, and we get the reports just like we need them. It also works fine on the CI server when just the flexunit task is run, but the build fails when the CI server tries to run a full build - the build tries to run the tests and clean to prepare for the next build, but the clean fails because there is a "rundll32.exe" process using one of the files and it can't be deleted. We tracked this process down to the one run by the flexunit task.
    Our task is:
        <target name="xci-test" depends="set-flex-coverage-home, prepare-domain-metadata-to-war, prepare-sounds-to-war, prepare-domain-metadata-for-testing, compile-unit-test-flex">
            <echo>**** The flexunit target requires that you have the standalone flash player installed and configured to run .swf files automatically! ****</echo>
            <mkdir dir="${dir.flexgui.test.output}"/>
        <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
        <!-- Please see http://docs.flexunit.org/index.php?title=Ant_Task -->
        <flexunit workingDir="${dir.flexgui.test.output}"   
                  swf="${dir.flexgui.build.war}/${flex.swf.name}test.swf"
                  toDir="${dir.flexgui.test.output}"
                  haltonfailure="false" verbose="true" localTrusted="true"
                                port="11028" timeout="40000"/>
            <!-- Generate readable JUnit-style reports -->
            <junitreport todir="${dir.flexgui.test.output}">
                <fileset dir="${dir.flexgui.test.output}">
                    <include name="TEST-*.xml"/>
                </fileset>
                <report format="frames" todir="${dir.flexgui.test.output}/"/>
            </junitreport>
            <sleep seconds="10"/>
        </target>
    I can reproduce this behavior on my dev machine by running "ant xci-test clean". We tried putting a sleep in to give the process time to shut down, no change. We attempted to use the 'command' option to the flexunit task to bypass the use of rundll32.exe, but then the flash player just hangs onto the file and the clean still fails. Since "ant xci-test" followed by "ant clean" works, we also tried running ant from within ant in order to force the process to stop, but that also didn't work. Any help on this would be greatly appreciated.
    Thanks for your time,
    Linden

    @Linden - Have not heard of this side effect from anyone as of yet, but good to know.  Sounds like the file lock is coming from the Flash Player and causing the spawning process (rundll32.exe) to hang around as well.  The FlexUnit team runs on Hudson using the FlexUnit Ant task, but we don't seem to encounter the same issue.  What's the longest interval you've tried to use with the sleep task?  Does the FP ever release its handle to the test SWF on your development machines?
    Not sure this is a problem with the FlexUnit Ant task, but in 4.2 we could try to explicitly kill the rundll32 process since we'll have the PID when the task launches it.  Head on over to JIRA and file a feature request for us and I'll see what I can do in the new year.  In the short term though, maybe try upgrading your version of the stand alone debug flash player to see if that helps.  Has anyone else seen this issue?  Could you possible just move the clean target to be called before the xci-test target is run?  Just some suggestions.
    -Brian

  • Passing extra compiler options to flexunit ANT task?

    Hi,
    Is there a way to send any extra compiler options to the <flexunit> ANT task?
    I'm using conditional compilation and compilation (mxmlc) is failing from the <flexunit> task:
    "Error: Access of undefined property DEBUG.
    CONFIG::DEBUG {"
    I tried sneaking "-define+=CONFIG::DEBUG,false" in with one of the other compiler options you can set on the <flexunit> task, but that just doesn't work or results in a validation error like this:
    "One of the directories specified as a 'testSource' element does not exist."
    Let me know if this is possible at all.
    Thanks,
    Wijnand

    Hi Brian,
    legrosb wrote:
    @Wijnand - Sorry for the belated response.
    Not late at all! I think a response within a day on a forum is quite fast!
    legrosb wrote:
    I thought I had captured this on the wiki, but it looks like I haven't, so thank you for the heads up.
    I'll also update the wiki @ http://docs.flexunit.org/index.php?title=Ant_Task to be more detailed regarding compilation so other don't have to dig. 
    Did you just do an update on that Wiki page or did I completely miss the part that explained the <flexunit> parameters?
    legrosb wrote:
    In 4.2, which is super pre-alpha right now, I've added support to accept a series of flex-config.xml files provided by the user.  Not sure if conditional compilation can be tackled with a custom flex-config.xml file, but if so then that'd be the feature that may help you.
    Yes, being able to add (+=) a custom config file will solve this problem for me. You can define properties and values like this:
    <flex-config>
        <compiler>
            <define>
                <name>CONFIG::DEBUG</name>
                <value>false</value>
            </define>
        </compiler>
    <flex-config>
    So in your AS code you can use:
    CONFIG::DEBUG {
        // Do something that only should be done in debug mode.
    I have another question, I ran into this one during testing my SWF with flexunit.
    unittest.xml:82: java.util.concurrent.ExecutionException: command [<testcase classname='com.tuenti.video.unittest.testcase.player::MockPlayerCase' name='loadPlayer' time='0.000'  status='success'/>] not understood
    I had a look at the FlexUnitSocketThread.parseInboundMessages method that throws this error and it looks like that your defined END_OF_SUCCESS doesn't entirely match what the SWF is spitting out. They are of by 1 space: END_OF_SUCCESS is defined as: "status=\"success\" />", whereas my SWF spits out the following: "status='success'/>" (single quotes and no space before the closing of the tag).
    It looks like I'm not the only one with the ExecutionException as it is reported on StackOverflow as well: http://stackoverflow.com/questions/3953677/flexunittasks-error-of-command-not-understood
    Cheers,
    Wijnand

Maybe you are looking for