Ant task cyclic library refrence

Hello everyone,
I am using flex ant task from my Flash builder to compile application. Its working fine and I am able to get the output. But the problem is whenever I use a library in my main project which is refrencing other library than I am unable to find refrence of components in lib 2. Below is the structure
NewLib >> contains a NewLibGrid(which is a normal spark grid)
MainLib >> ExtPanel which includes NewLibGrid from NewLib .
MainApp >> This uses ExtPanel
No I am getting error during ant compilation
[compc] D:\Data\Flex\Projects\CompLib\src\ExtPanel.mxml: Error: Could not resolve <local:NewLibGrid> to a component implementation.
Here is part of antscript I am using
<target name="lib1" depends="lib2">
<compc output="${STAGE_DIR}/stagingDir/CompLib.swc"
   keep-generated-actionscript="${DEBUG}"
   debug="${DEBUG}"
   optimize="${OPTIMIZE}"
   target-player="${TARGET_FLASH_PLAYER}"
   include-classes="ExtPanel">
<runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/framework.swc">                                                                                              
<url rsl-url="framework_${FLEX_VERSION}.swf"/>                                                                                                        
<url rsl-url="framework_${FLEX_VERSION}.swz"/>                                                                                              
</runtime-shared-library-path>
<runtime-shared-library-path path-element="${PROJ_HOME}/NewLib/bin/NewLib.swc">                                                                                              
<url rsl-url="${PROJ_HOME}/NewLib/bin/NewLib.swf"/>                                                                                                        
<url rsl-url="${PROJ_HOME}/NewLib/bin/NewLib.swz"/>                                                                                              
</runtime-shared-library-path>
<compiler.library-path dir=".." append="true">
<include name="Common/libraries"/>
<exclude name="global_library.swc" />
</compiler.library-path>
<source-path path-element="../CompLib/src" />
</compc>
</target>
<target name="lib2">
<compc output="${STAGE_DIR}/stagingDir/NewLib.swc"
   keep-generated-actionscript="${DEBUG}"
   debug="${DEBUG}"
   optimize="${OPTIMIZE}"
   target-player="${TARGET_FLASH_PLAYER}"
   include-classes="NewLibGrid">
<runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/framework.swc">                                                                                              
<url rsl-url="framework_${FLEX_VERSION}.swf"/>                                                                                                        
<url rsl-url="framework_${FLEX_VERSION}.swz"/>                                                                                              
</runtime-shared-library-path>
<compiler.library-path dir=".." append="true">
<include name="Common/libraries"/>
<exclude name="global_library.swc" />
</compiler.library-path>
<source-path path-element="../NewLib/src" />
</compc>
</target>

    <mxmlc
         file="${project.name}/src/Test.mxml"
         output="${build.mxmlc.dir}/Test.swf"
         static-link-runtime-shared-libraries="true"
    >
          <load-config filename="${air.config}"/>
          <source-path path-element="${project.name}/src" />
         <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
         </runtime-shared-library-path>
         <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
         </runtime-shared-library-path>
    </mxmlc>
This also seems to work. AIR libraries are included in my output SWF. It all happens right when I have static-link-runtime-shared-libraries="true" . Why? Why does that not work when i have static-link-runtime-shared-libraries="false"  ??

Similar Messages

  • Ant tasks for creating ADF Library

    Created an ADF declarative component, exported it as an ADF library and got it working fine. The ADF Library jar was created within JDeveloper by setting up a Deployment profile. The created ADF Library file has the TLD file and TagHandler / Component class files created on the fly and packaged.
    Not sure of how We could get the same ADF library created by an Ant task. Are there Ant tasks for creating ADF library available? http://www.connotea.org/user/jdeveloper/tag/ant has some details on the JDeveloper based ant tasks but doesn't have details on creating ADF library.

    You can use the ojdeply executable to create and deploy your ADF Library from the commandline:
    <Jdev-install-location>/jdeveloper/jdev/bin/ojdeploy -workspace /mydirectory/yourworkspace.jws -profile yourprofile -project yourproject.jpr

  • Are the WLS 9.1 Web Service Ant Tasks ready for prime time?

    I am trying to create a Proof of Concept (POC) for Enterprise and B2B Services at Wendy's Int'l, Inc.
    As part of this POC, I created a WSDL for an in-house service and then used the wsdlc and jwsc Ant Tasks to translate this WSDL to Java classes and ultimately (I hoped) a deployable services.
    In this document, I describe the issues I encountered setting up what I consider to be a simple POC.
    I'll try to attach my WSDL file and build.xml so you can follow along.
    I'll also try to attach my CSS file so you can compare how the generated WSDL appears in the Browser to the way I want it to appear.
    If attachments are not allowed on these forums, then I will wait and see if there is interest in those documents before I paste them under this topic.
    Some preliminary information about my environment.
    Environment:
         Windows XP Pro SP2
         WebLogic 9.1
         Java 1.5.0_04
    Service Name:
         AppRelease
    Note: If I modify my WSDL (perhaps to add a new Operation or to change the definition of an element) and run wsdlc again, the AppReleaseSOAPPortImpl.java file is overwritten For this reason, I implemented my service logic in a class called AppReleaseServiceImple.java.
    Now, for the issues.
    1.     Bug:
    In the WSDL generated by wsdlc, the wsdl:part child of the wsdl:message tag is erroneously prefixed with a colon.
    This occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
    Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
    2.     Bug:
    In the WSDL generated by wsdlc, the wsdl:input and wsdl:output children of the wsdl:operation child of wsdl:portType tag are erroneously prefixed with a colon. Like 1 above, this occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
    Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
    The error message generated by Bugs 1 and 2 is not helpful in diagnosing the problem:
    [jwsc] Error at line:46 col:7 ':' expected [?! -- [CDATA[ ]
    3.     Bug:
    In the WSDL generated by wsdlc, the documentation elements have all of my html elements stripped out, as well as my xhtml and wsdl namespace references. This completely negates one of the best features of the documentation tag, being able to present the WSDL in a browser as a nicely formatted, human friendly document which is also the underlying WSDL that can be viewed when the person views the source document.
    I label this as a bug because it greatly reduces the functionality of the resulting WSDL.
    4.     Annoyance:
    The WSDL generated by wsdlc has all of my comments stripped out, except the comments in the xsd:schema section of the wsdl:types element. I would prefer that all my comments be left in the WSDL, but if comments must be stripped out then I think all of the comments should be stripped out.
    5.     Annoyance:
    The WSDL generated by wsdlc has my CSS specification stripped.
    Work around: I don’t know if adding the CSS back will do any good because I have not yet created a deployable service (see the last issue below).
    6.     Annoyance:
    The WSDL generated by wsdlc has different namespace prefixes than the ones I specified for my application's namespace and for the http://schemas.xmlsoap.org/wsdl/soap/ namespace.
    Work around: Perform a find/replace on namespace prefixes "s0" and "s1" to return them to my prefered values.
    Another thing I can do at this point is simply replace the generated WSDL in the jar file with my original WSDL. This would address issues 1 thru 6 above.
    7.     Annoyance:
    The java source files created by wsdlc are put into a jar file. This makes it annoying when working within a traditional IDE like Eclipse because there is no way to reference the source files within the jar as working source.
    Work around: Extract the source files from the jar and identify the resulting directory structure as part of the source structure of the project.
    8.     Bug:
    The jwsc task complains if the same parameter name is used in multiple operations. I received the following Errors from jwsc:
    [jwsc] C:\IDE\workspace\Acre-WL9.1\AppReleaseSOAPPort.java 0:0
    [jwsc] [ERROR] - Parameter element "{http://acre.services.wendys.com/AppRelease/}garRequest" is not unique across document/literal bare WebService.
    Since the operation names are unique, I see no reason to also require uniqueness in the parameter names used by those operations.
    Work around: Use unique element names for the input parameters of the services operations.
    9.     Bug:
    Once items 1, 2 and 8 above are taken care of, jwsc fails with the following error:
    java.lang.AssertionError: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.ApplicationBeanImpl
    This seems to be due to the weblogic.jar file not being in the System Classpath.
    However, I should note that when I set verbose="on" and debug="on" in the jwsc ant task, there was a message from the task which stated "[jwsc] [search path for class files: [big freakin’ jar list]". In the big freakin’ jar list, I did find weblogic.jar and weblogic.jar has the required ApplicationBeanImpl. This indicates to me that the jwsc task does not fully honor either its classpathref attribute, nor an embedded classpath element.
    Work around: Make sure the weblogic.jar is in the System Classpath.
    10.     Bug:
    I fixed bug #9 by running a setDomainEnv script and then ran my ant task. This time I received the following output:
    ant build-serviceBuildfile: build.xml
    build-service:
    [jwsc] 1 JWS files will be processed.
    [jwsc] Processing JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java
    [jwsc] JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java Validated.
    [AntUtil.deleteDir] Deleting directory <some temporary directory>
    BUILD FAILED
    java.lang.ExceptionInInitializerError
    At this point, I am completely stymied about how to proceed.
    I wonder what new issues await once this 10th issue is addressed.
    Really, is this tool set ready for prime time?

    <i>Sorry to hear you are having so many issues with using the WLS 9.1 web service Ant tasks, inside of Eclipse.
    I generally create a User Library for the couple weblogic jars needed, and use it (the User Library) in my Eclipse projects that I create JWSes in.</i><br>
    I also have a separate WebLogic Library in Eclipse (actually 2 libraries since I work with WL 8.1 and now WL 9.1). As you may know, one of the long-standing issues with the Ant integration within Eclipse is the fact that Ant, being an External Tool, does not receive the Project-specific Paths/Libraries. However, since most Java-relevant Ant tasks can take classpath and classpathref attributes, this is usually not an issue. In the case of the BEA-supplied wsdlc Ant task, it is apparent from the verbose/debug console output that wsdlc can see the jars in its classpathref, but it ignores those references when resolving class references and instead only uses the system classpath.
    <p>
    <i>I've only needed the weblogic.jar and xbean.jar, not all the ones you mentioned in an earlier thread of this post.</i><br>
    I have not tried to winnow down exactly which jars are required. I simply included all the jars that exist and were added to the system classpath by the setDomainEnv.bat file created by WebLogic 9.1.
    <p>
    <i>Afterwards, I create an Ant Builder to build the JWS Web Service EAR, as opposed to fiddlin' with Eclipse.</i><br>
    I too use Ant to build my deployable archives. Eclipse is simply my IDE of choice. I validated that all the issues I listed occurred when running Ant from the command line.
    <p>
    <i>If you are interested in how I do it, send me an e-mail (to [email protected]), and I'll send you a zip of one of these JWS projects. The build.xml script for the project, takes care of a lot of the "annoyances" you mentioned, one of which I think is not accurate. I have never had a situation where the wsdlc Ant task "overwrote" my XXXImpl.java file..</i><br>
    Since I'm doing a POC to determine how we want to proceed with developing Web Services and an SOA in general, I tried to perform the same tasks using Axis 2 1.0, the WebLogic 9.1 tools, and XFire 1.1. Overwriting the Impl class is a common failing in the tools which take a WSDL and create Java source files for all three frameworks.
    <p>
    Try my scenario. Add another operation to an existing WSDL, and run the wsdlc Ant Task. The old IMPL class will be over-written.
    <p>
    Because of this, I have a separate Impl class and I make sure that all its methods and annotations match the methods and annotations in the Skeleton Impl class created by wsdlc.
    <p>
    <i>Maybe that's because I use the <exec> Ant task with jar.exe (the xvf options) in my build.xml, to only get what I need out of the .jar/.zip the wsdlc generates. I'm typically only interest in the interface class that my XXXImpl.java file needs to implements, because I use XMLBeans for the input args (and return values) of my web service operations.</i><br>
    Perhaps. I am not using XMLBeans in any of the three frameworks because the resulting service seems to be lighter-weight in all three frameworks if XMLBeans is not used. I'm sure there will be scenarios where XMLBeans is preferred, but I have not encountered that case in this POC.
    <p>
    <i>Regards,
    Mike Wooten</i>
    Thanks for the follow-up.
    Mike McAngus

  • 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

  • How to include assigned .as files in MXMLC ant task ?

    When i use mxmlc ant task, i found that
    the tag <include-sources/> doesn't support !
    ( described by http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a63.html )
    neither SDK version 3.x nor 4.x
    Are they lying?!
    How to include assigned .as files ?
    Thank you !

    My understanding is that mxmlc will use all available resources in the source path, as needed. Instead of giving it individual resources to include, you simply need to give it the source-path that contains those resources. This is different from a library project, which may need to include individual classes that are never used in that library.

  • Does compiling an advanced datagrid using flex ant task require additional config other than the license property?

    Hi,
        I am trying to build my Flex app which uses the Advanced Data Grid in a couple of locations. Originally, when I built the app using the flex ant tasks, I noticed the Visualization Trial watermark show up on the screen. I then added the license tag with the serial number to my flex-config.xml and re-ran my ant build. The watermark goes away, but then when I look at the advanced datagrid, the datagrid shows up with the hierarchy, but the data does not display in the grid (only the group by nodes are visible, not the data for the leaf elements). This works fine when I build the app using my Flex Builder. Is there something I am missing or need to add to my flex ant task to make this work?
    Any help or guidance is much appreciated.
    The following is the ant task to build the module that uses the ADG:
        <target name="compile-modules" depends="compile-shared">
            <!-- Module 1 -->
            <echo>Compiling module 1...</echo>
            <mxmlc file="${modulesrc.dir}\ui\modules\mod1\Module1.mxml"
                    output="${dist.dir}\modules\mod1\Module1.swf"
                    actionscript-file-encoding="UTF-8"
                    incremental="true"
                    default-background-color="0xFFFFFF"
                    use-network="false"
                    load-externs="${extern-report-xml}">
                <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
                <source-path path-element="${FLEX_HOME}/frameworks"/>
                <!-- source paths -->
                <compiler.source-path path-element="${modulesrc.dir}"/>
                <!-- add external libraries -->
                <compiler.library-path dir="${main.dir}" append="true">
                    <include name="${lib.dir}"/>
                </compiler.library-path>
                <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs" />
                    <include name="locale/{locale}" />
                </compiler.library-path>
                <compiler.debug>true</compiler.debug>
            </mxmlc>
        </target>
    And here is the ant task for the main application:
        <target name="compile-ui" depends="compile-modules">
            <mxmlc file="${src.dir}/MainApp.mxml" output="${dist.dir}/MainApp.swf"
                    actionscript-file-encoding="UTF-8" keep-generated-actionscript="false"
                    fork="true" maxmemory="1024m">
                <jvmarg value="-XX:MaxPermSize=256m"/>
                <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                <source-path path-element="${FLEX_HOME}/frameworks"/>
                <source-path path-element="${src.dir}"/>
                <source-path path-element="${main.dir}/locale/{locale}"/>
                <!-- List of SWC files or directories that contain SWC files. -->
                <!--<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs" />
                    <include name="locale/{locale}" />
                </compiler.library-path>-->
                <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs/datavisualization.swc" />
                    <include name="libs/flex.swc" />
                    <include name="libs/framework.swc" />
                    <include name="libs/rpc.swc" />
                    <include name="libs/utilities.swc" />
                    <include name="locale/{locale}" />
                </compiler.library-path>
                <compiler.library-path dir="${main.dir}" append="true">
                    <include name="${lib.dir}"/>
                </compiler.library-path>
                <runtime-shared-library-path path-element="${FLEX_FRAMEWORK}/framework.swc">
                    <url rsl-url="framework_3.2.0.3958.swf"/>
                    <url rsl-url="framework_3.2.0.3958.swz"/>
                </runtime-shared-library-path>
                <compiler.debug>true</compiler.debug>
            </mxmlc>
        </target>
    Regards,
    Purush

    to remove watermark i have added license key in WEB-INF\flex\license.properties file as key = value

  • Compc ant task and external framework

    I'm writing an ant task to compile a couple of libraries into
    SWCs and then a shell app (that uses the libraries) into a SWF for
    deployment. If I compile the libraries by hand then run just the
    'mxmlc' part of my ant script it compiles fine. However when I try
    and first compile a library into a SWC with 'compc' it compiles but
    then the shell app complains that the classes from the library are
    missing. One thing that may be causing the problem is my library
    path (through flex builder) has it's framework.swc set to 'Link
    Type: External' and I'm not sure how to define that with 'compc'.
    The weird thing is the flex builder compiled and 'compc' compiled
    SWCs are the same size. Here's my target for 'compc':

        <mxmlc
             file="${project.name}/src/Test.mxml"
             output="${build.mxmlc.dir}/Test.swf"
             static-link-runtime-shared-libraries="true"
        >
              <load-config filename="${air.config}"/>
              <source-path path-element="${project.name}/src" />
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
        </mxmlc>
    This also seems to work. AIR libraries are included in my output SWF. It all happens right when I have static-link-runtime-shared-libraries="true" . Why? Why does that not work when i have static-link-runtime-shared-libraries="false"  ??

  • MXMLC ANT task not including AIR libraries

    Hi Guys,
    This is the MXMLC ant task which I am using the compile my test app. If i set the static-link-runtime-shared-libraries="true" , the AIR libraries gets merged into my output swf. But when this attribute is set to false, I dont see the AIR libraries added to my SWF file. As a result when I run the AIR version fo my project, I dont see the application launch right. I have so many RSL in my project and I wanted to have static-link-runtime-shared-libraries="false". Is there a way to have AIR libraries include in my output file and still have this static-link-runtime-shared-libraries="false".
    <mxmlc
        file="${project.name}/src/Test.mxml"
        output="${build.mxmlc.dir}/Test.swf"
        static-link-runtime-shared-libraries="true"
        >
         <load-config filename="${air.config}"/>
         <source-path path-element="${project.name}/src" />
         <source-path path-element="${flex.frameworks.dir}/libs/air"/>
        <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
        </runtime-shared-library-path>
        <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
        </runtime-shared-library-path>
       </mxmlc>
    My RSL are compiled using COMPC task and the AIR libraries are included into them using the below attributes of compc task.
    <source-path path-element="${basedir}/src" />
    <source-path path-element="${flex.frameworks.dir}/projects/airframework/src" />
    <source-path path-element="${flex.frameworks.dir}/projects/air/ServiceMonitor/src" />
    I am really stuck with this problem and not able to get my release build launch right. Again, any light on this problem will be of great help.!

        <mxmlc
             file="${project.name}/src/Test.mxml"
             output="${build.mxmlc.dir}/Test.swf"
             static-link-runtime-shared-libraries="true"
        >
              <load-config filename="${air.config}"/>
              <source-path path-element="${project.name}/src" />
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
        </mxmlc>
    This also seems to work. AIR libraries are included in my output SWF. It all happens right when I have static-link-runtime-shared-libraries="true" . Why? Why does that not work when i have static-link-runtime-shared-libraries="false"  ??

  • Swf, swc and the mxmlc, compc ant tasks

    I'm a bit confused on the end result of the mxmlc / compc ant
    tasks, or maybe the difference between swf and swc files. I have a
    library of 60 or so AS3 files used for
    serialization/deserialization of my Java backend (using GDS for
    serialization of data between java serverside and my flex front
    end). I first use the compc ant task on these AS3 files to create a
    swc file. This swc is 453316 bytes. With this flash library, I use
    the mxmlc ant task on my mxml file, which produces a 201,492-byte
    swf file.
    I have a couple questions related to the procedure above.
    Shouldn't the swf file include the swc file, and hence be bigger
    than the swc? I'm just wondering if I deploy the swf file, will it
    have all it needs in the swc file to perform the functions
    correctly?
    My second question relates to setting the
    keep-generated-actionscript="true" in the mxmlc task. When
    doing this, I see all the AS3 code generated. However, it does not
    include 55 of the 60 AS3 classes compiled in the swc. It only
    generated AS3 code for those AS3 classes explicitly declared in the
    mxml code (via import and actual declaration). Am I doing something
    wrong here or is this the way flex does its thing?
    The reason why I'm concerned about this is that I'm getting a
    "ArgumentError: Error #2004: One of the parameters is
    invalid" issue am I'm think its happening in the AS3 code (not
    the Java server side) and I don't know how to debug this.
    Any help would be appreciated. Thanks in advanced!
    -los

    I am also facing with the same problem.....
    Is there any resolution for this problem.?
    Not sure where i am going wrong.
    Any help will be appreciated.
    Thanks in advance.

  • 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

  • FlexUnit Ant task freeze at Reciving Data...

    Hello,
    I'm trying to use flex unit task and when I run it, get this on console and stay there for ever.
    "*****" is just to privacy
    this is my ant task
    <target name="UNIT TEST">
                        <echo>COMPILING TEST SWF..</echo>
                        <mxmlc output="${basedir}/bin/Test.swf" file="${basedir}/test-src/TestRunner.as">
                                  <target-player>${env.TARGET_PLAYER}</target-player>
                                  <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                                  <source-path path-element="${FLEX_HOME}/frameworks"/>
                                  <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                           <include name="libs" />
                    <include name="../bundles/{locale}" />
                        </compiler.library-path>       
                                  <source-path path-element="${env.WIP_CLIENT_COM_SRC_PATH}"/>
                                  <define name="CONFIG::FLASH_AUTHORING" value="false"/>
                                  <source-path path-element="${basedir}/test-src"/>
                                  <source-path path-element="${basedir}/src"/>
                                  <compiler.library-path dir="${basedir}" append="true">
                                 <include name="libs" />
                              </compiler.library-path>  
                                  <compiler.library-path dir="${env.WIP_CLIENT_COM_SRC_PATH}" append="true">
                                 <include name="libs" />
                              </compiler.library-path>  
                                  <compiler.external-library-path dir="${env.WIP_CLIENT_COM_SRC_PATH}/libs" append="true">
                                            <include name="GenericChat.swc"/>
                                  </compiler.external-library-path>
                         </mxmlc>
                        <echo>COMPILED TEST SWF..</echo>
                        <echo>Running Test Runner SWF</echo>
            <flexunit swf="${basedir}\bin\Test.swf"
                toDir="${basedir}\bin"
                haltonfailure="true"
                verbose="true"
                localTrusted="false"/>
            <echo>Ran Test Runner SWF</echo>
            <echo>Generate Readable Tests</echo>
            <junitreport todir="${basedir}\bin">
                <fileset dir="${basedir}\bin">
                    <include name="TEST-*.xml"/>
                </fileset>
                <report format="frames" todir="${basedir}\bin\html"/>
            </junitreport>
            <echo>Generated Readable Tests</echo>
              </target>
    Buildfile:******.xml
    UNIT TEST:
         [echo] COMPILING TEST SWF..
        [mxmlc] Cargando el archivo de configuración D:\Desarrollo\fdk\flex_sdk_4.5.1.21328\frameworks\flex-config.xml
        [mxmlc] D:\Proyectos\Bubble\Cliente\trunk\test-src\TestRunner.as: Advertencia: Esta unidad de compilación no tiene ninguna factoryClass especificada en los metadatos del fotograma para cargar las bibliotecas compartidas en tiempo de ejecución configuradas. Para compilar sin bibliotecas compartidas en tiempo de ejecución establezca la opción -static-link-runtime-shared-libraries en true o elimine la opción -runtime-shared-libraries.
        [mxmlc] *********Test.swf (50729 bytes)
         [echo] COMPILED TEST SWF..
         [echo] Running Test Runner SWF
    [flexunit] Validating task attributes ...
    [flexunit] Generating default values ...
    [flexunit] Using default working dir [****]
    [flexunit] Using the following settings for the test run:
    [flexunit]           FLEX_HOME: [*****fdk\flex_sdk_4.5.1.21328]
    [flexunit]           haltonfailure: [true]
    [flexunit]           headless: [false]
    [flexunit]           display: [99]
    [flexunit]           localTrusted: [false]
    [flexunit]           player: [flash]
    [flexunit]           port: [1024]
    [flexunit]           swf: [****\Test.swf]
    [flexunit]           timeout: [60000ms]
    [flexunit]           toDir: [********\bin]
    [flexunit] Setting up server process ...
    [flexunit] Starting server ...
    [flexunit] Opening server socket on port [1024].
    [flexunit] Waiting for client connection ...
    [flexunit] Executing 'rundll32' with arguments:
    [flexunit] 'url.dll,FileProtocolHandler'
    [flexunit] '********\Test.swf'
    [flexunit] The ' characters around the executable and arguments are
    [flexunit] not part of the command.
    [flexunit] Client connected.
    [flexunit] Setting inbound buffer size to [262144] bytes.
    [flexunit] Receiving data ...
    Thank you in advance.
    Javier

    I still have not been able to get FlexUnit running with AIR SDK 15. But I found a workaround:
    Compile the source code with SDK 15 into swc files.
    Set FlexUnit to use SDK 4.
    Do not include source code in the FlexUnit Ant task.
    Include the swc files in stead by adding another library dir parameter to the flexunit call.

  • Building from flex builder vs ant task

    I have a flex application written using flex builder. When I
    build it and run it using flex builder, or create an air file from
    flex builder and run that, then my application works just fine.
    However, I would like people without copies of flexBuilder
    installed to be able to build my application, so I am using the
    flex ant task (flex-mxmlc) to build my application. As far as I can
    tell I have the same configuration, and the same libraries included
    in the ant task. However, when I run the air file generated by the
    ant task nothing happens. If you look in the task manager, you can
    see that the application is running, but the main window for the
    application never appears.
    I tried running the swf through a debug version of flash to
    get some log output, and I am getting a bunch of exceptions, the
    first of which is:
    VerifyError: Error #1014: Class flash.display::NativeWindow
    could not be found.
    at flash.display::MovieClip/nextFrame()
    at mx.managers::SystemManager/deferredNextFrame()
    at
    mx.managers::SystemManager/preloader_initProgressHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    It seems like it might not be finding the main flex library
    (flexlib.swc), is that where that class would be? In my ant task I
    have an include-libraries tag that points to that file.
    Anyone have any ideas?

    I experienced a similar problem (although the class that
    could not be found was different for me). Googling around I found
    someone who had a similar problem and claimed that using the
    flexlib.swc library was the culprit.
    The root of the problem is that the Flex SDK that comes
    bundled with the Flex Builder has libraries (under frameworks/libs)
    that are NOT included in plain free Flex SDK that you and I are
    presumably using on our build machines.
    When flexlib.swc is linked in, it causes certain classes to
    be required at runtime. Apparently when you compile these classes
    are linked in if available, but when they are not the compilation
    still succeeds. Only you get a VerifyError when you run the thing.
    What worked for me was to copy all the additional .swc files
    found in my Flex Builder SDK's frameworks/libs directory to the
    same directory on my build machine. Also you will need to copy the
    additional files under frameworks/locale/en_US.
    Rebuild and clear your browser's cache and it should then
    work.

  • Compile project from Ant Task

    Hi,
    I saw that there are some Ant Tasks with the BPM, but couldn't find any task that is able to just compile and generate the .exp file of the proyect.
    We wanted to implement a continuous integration server that compile all the projects that we have (so we need to do this from the command line).
    Anyone know any way to do this?
    Thanks !
    Carlos

    Questions:
    So you have an external tool builder that is triggered by a build?
    Which build of Eclipse?
    What is the Ant perspective?
    Are you running the Ant build in the same VM as Eclipse? Which VM?
    What VM is being used from the commandline?
    Darins
    "Rod Macpherson" <[email protected]> wrote in message
    news:bn24o3$h8p$[email protected]..
    > I have a project that compiles from ANT but running the compile task from
    > the ANT perspective in Eclipse fails.
    >
    > compile:
    > [javac] Compiling 128 source files to \workspace\apps\tmp\class
    > [javac] C:\workspace\apps\framework\src\framework\Executive.java:13:
    package
    > org.apache.xerces.parsers does not exist
    > [javac] import org.apache.xerces.parsers.DOMParser;
    >
    > Building the project in Eclipse generates this error:
    >
    > "The project was not built due to 'Problems encountered while copying
    > resources.'. Fix the problem, then try refreshing this project and
    > rebuilding it since it may be inconsistent
    >
    > I have included xercesImpl.jar as the library so DOMParser is definitely
    > there. Any idea on what the problem is?
    >
    > TIA.
    >
    >

  • Maven Ant Tasks

    I have a build file as shown below (AFTER THE ERROR).
    When I try to run it I get the following error:
    Buildfile: build.xml
    BUILD FAILED
    /Users/abder-rahmanali/Desktop/Hibernate/build.xml:13: The following error occurred while executing this line:
    jar:file:/System/Library/Java/Extensions/maven-ant-tasks-2.0.9.jar!/org/apache/maven/artifact/ant/antlib.xml:4: taskdef A class needed by class org.apache.maven.artifact.ant.DependenciesTask cannot be found: org/apache/tools/ant/Task
    <?xml version="1.0"?>
    <project name="Harnessing Hibernate 3 (Developer's Notebook Second Edition)"
    default="db" basedir="."
    xmlns:artifact="antlibrg.apache.maven.artifact.ant">
    <!-- Set up properties containing important project directories -->
    <property name="source.root" value="src"/>
    <property name="class.root" value="classes"/>
    <property name="data.dir" value="data"/>
    <artifact:dependencies pathId="dependency.classpath">
    <dependency groupId="hsqldb" artifactId="hsqldb" version="1.8.0.7"/>
    <dependency groupId="hibernate" artifactId="hibernate"
    version="3.2.6.ga">
    <exclusion groupId="javax.transaction" artifactId="jta"/>
    </dependency>
    <dependency groupId="org.hibernate" artifactId="hibernate-tools"
    version="3.2.3.ga"/>
    <dependency groupId="org.apache.geronimo.specs"
    artifactId="geronimo-jta_1.1_spec" version="1.1.1"/>
    <dependency groupId="log4j" artifactId="log4j" version="1.2.15"/>
    </artifact:dependencies>
    <!-- Set up the class path for compilation and execution -->
    <path id="project.class.path">
    <!-- Include our own classes, of course -->
    <pathelement location="${class.root}" />
    <!-- Add the dependencies classpath -->
    <path refid="dependency.classpath"/>
    </path>
    <target name="db" description="Runs HSQLDB database management UI
    against the database file--use when application is not running">
    <java classname="org.hsqldb.util.DatabaseManager"
    fork="yes">
    <classpath refid="project.class.path"/>
    <arg value="-driver"/>
    <arg value="org.hsqldb.jdbcDriver"/>
    <arg value="-url"/>
    <arg value="jdbc:hsqldb:${data.dir}/music"/>
    <arg value="-user"/>
    <arg value="sa"/>
    </java>
    </target>
    </project>
    How can I deal with this error?
    Thanks.

    Please don't post the same topic more than once. You already have a thread on this subject: [http://forums.sun.com/thread.jspa?threadID=5365961]

  • Assemble ant task and dependencies

    We are in a process of moving from wasp 4.5 to OC4J R3.
    We want to be able to assemble (and deploy) a bottom-up java web service using ant.
    I look at the assemble ant task but I couldn't find out how to specify using that task the jars that will be copied to WEB-INF/lib or any other option like using a custom oracle-webservices.xml file to specify the dependencies or specifying a shard library to be used..
    The documentation is really unclear about the subject.

    What's your approach to pack the files?
    Just use the assemble task to create the war structure and then add all the dependencies?
    I'm new to OC4j but it seems a reasonable request to add dependencies with the ant task , just like when you use the input tag to specify which files should be in WEB-INF/classes.
    The oracle-webservices.xml is another way to specify the web service (if i remember correctly) and I gave it as another example of where I looked to solve to problem.
    It shouldn't be that hard to pack to war file myself... it's just annoying that when you come from WASP 4.5 which is over 3 years old and it's so easy and clear how to pack a bottom-up web service.
    Message was edited by:
    user564605

Maybe you are looking for

  • Getting rid of stupid animation

    Before I expire from old age I would love to know how to turn off that ridiculous animation whenever I browse for a file. You know that stupid, useless, horrible animation where the file list or whatever is conveyed to you via some Star Wars movie of

  • Error when running deployed application on AS

    When deploying an application to Oracle AS 10.1.3, I experience no problems. When running the application, I receive an error: Error getting property 'currentModule' from bean of type oracle.jheadstart.controller.jsf.bean.DynamicMenuBean: javax.faces

  • Alternative of  Function module NAMETAB_GET

    Hi all, Our equirment is to find the list of all field from a DDIC structure supply as input. For this we are using NAMETAB_GET.... but the function module seems obsolute.... Can anybody please suggest a Function Module to find the list fileld of a D

  • Photo's too big for sending

    I have a blackberry Z10 which is getting better and better with each update, if only I had a an app for google and RBS I would be proper sorted.  One other annoyance is that I use the camera a lot for work items that need to be emailed to people and

  • PHP/Spry Tabs/Pagination

    Hello all, I have a results page which contains tabs for separate query results from multiple DBs on one page.  I would like to include record set paging for each record set under each tab.  When I select a different tab, click on "Next" in the pagin