Question

I have an ant script to compile and generate an AIR file, and it runs well. Now, I am trying asDocs also into the ant script in order to auto generate documentation whenever I am generating a new AIR file.

Though the mxmlc task which is creating my swf file runs smoothly, my asdoc task in ANT is throwing up errors. I keep getting errors like:

compileASDoc: [asdoc] Loading configuration file D:\4.1\4.1\frameworks\air-config.xml
[asdoc] ALPHA.as(3): col: 35 Error:
The definition of base class Panel was not found.
[asdoc]
[asdoc] public class ExtendPanel extends Panel
[asdoc] ^
[asdoc]
[asdoc] XYZABC.mxml(-1): Error: Duplicate function definition.
[asdoc]
[asdoc] < ?xml version="1.0" encoding="utf-8"?>
[asdoc]
[asdoc] XYZABC.mxml(-1): Error: A conflict exists with definition linkbutton1 in namespace internal.
[asdoc]
[asdoc] < ?xml version="1.0" encoding="utf-8"?>
[asdoc]
[asdoc] GHIJKL.mxml(-1): Error: A conflict exists with definition linkbutton1 in namespace internal.
[asdoc]
[asdoc] < ?xml version="1.0" encoding="utf-8"?>
[asdoc]

I am at a loss to understand why these errors are coming up. My ant script is very similar to the one below:

<!-- Run the ASDoc executable and generate the ASDocs to the new output folder -->
<target name="compileASDoc" depends="clean, init">

    <condition property="asdoc.jvm.args" value="-Xmx384m">
        <os family="windows"/>
    </condition>

    <condition property="asdoc.jvm.args" value="-Xmx512m">
        <os family="mac"/>
    </condition>

    <condition property="asdoc.jvm.args" value="-Xmx512m">
        <os family="unix"/>
    </condition>

    <asdoc output="${Asdoc.dir}" lenient="true" failonerror="true" warnings="false" 
        strict="false" fork="true"
        left-frameset-width="300"
        main-title='${Main.title}'
        footer="${Footer.text}"
        window-title="Custom asdoc documentation" >

        <doc-sources path-element="${SRC_DIR}" />
        <doc-sources path-element="${IMAGES_DIR}" />
        <doc-sources path-element="${SOME_LOCALE}/en_US" />
        <doc-sources path-element="${SOME_LOCALE}/ar_AE" />

        <load-config filename='${FLEX_HOME}/frameworks/air-config.xml'/>

        <!-- top level class to include in asdoc -->
        <doc-classes class="AIRFrameworkClasses"/>
        <doc-classes class="AIRSparkClasses"/>
        <doc-classes class="FlexClasses"/>
        <doc-classes class="SparkClasses"/>
        <doc-classes class="FrameworkClasses"/>
        <!--    <doc-classes class="HaloClasses"/> -->
        <doc-classes class="OSMFClasses"/>
        <doc-classes class="SparkSkinsClasses"/>
        <doc-classes class="RPCClasses"/>
        <doc-classes class="flashx.textLayout.CoreClasses"/>
        <doc-classes class="flashx.textLayout.EditClasses"/>
        <doc-classes class="flashx.textLayout.ConversionClasses"/>

        <!-- source path for asdoc -->
        <compiler.source-path path-element="${flexlib}/projects/airframework/src"/>
        <compiler.source-path path-element="${flexlib}/projects/airspark/src"/>
        <compiler.source-path path-element="${flexlib}/projects/flex/src"/>
        <compiler.source-path path-element="${flexlib}/projects/spark/src"/>
        <compiler.source-path path-element="${flexlib}/projects/framework/src"/>
        <compiler.source-path path-element="${flexlib}/projects/sparkskins/src"/>
        <compiler.source-path path-element="${flexlib}/projects/osmf/src"/>
        <compiler.source-path path-element="${flexlib}/projects/rpc/src"/>
        <compiler.source-path path-element="${flexlib}/projects/textLayout/src"/>

        <!-- namespaces to include in asdoc -->
        <doc-namespaces uri="http://www.adobe.com/2006/airmxml"/>
        <doc-namespaces uri="http://www.adobe.com/2006/airspark"/>
        <doc-namespaces uri="library://ns.adobe.com/flex/spark"/>
        <doc-namespaces uri="http://www.adobe.com/2006/mxml"/>
        <doc-namespaces uri="http://www.adobe.com/2006/rpcmxml"/>
                    <doc-namespaces uri="library://ns.adobe.com/flashx/textLayout"/>  
                    <doc-namespaces uri="http://ns.adobe.com/mxml/2009"/>
        <namespace uri="library://ns.adobe.com/flashx/textLayout" manifest="${flexlib}/projects/textLayout/manifest.xml"/>

        <!-- namespace declaration for asdoc -->
        <namespace uri="http://www.adobe.com/2006/airmxml" manifest="${flexlib}/projects/airframework/manifest.xml"/>
        <namespace uri="http://www.adobe.com/2006/airspark" manifest="${flexlib}/projects/airspark/manifest.xml"/>
        <namespace uri="http://www.adobe.com/2006/rpcmxml" manifest="${flexlib}/projects/rpc/manifest.xml"/>
        <namespace uri="http://www.adobe.com/2006/mxml" manifest="${flexlib}/mxml-manifest.xml"/>
        <namespace uri="library://ns.adobe.com/flex/spark" manifest="${flexlib}/projects/spark/manifest.xml"/>
        <namespace uri="library://ns.adobe.com/flex/mx" manifest="${flexlib}/mxml-manifest.xml"/>  
                    <namespace uri="http://ns.adobe.com/mxml/2009" manifest="${flexlib}/mxml-2009-manifest.xml"/>

        <library-path/>

        <external-library-path dir="${flexlib}/libs">
            <include name="*.swc" />
        </external-library-path>

                    <external-library-path dir="${flexlib}/libs/air">
            <include name="*.swc" />
        </external-library-path>

        <external-library-path dir="${LIBS_DIR}">
            <include name="*.swc" />
        </external-library-path>

        <external-library-path dir="${LOCALE_DIR}">
            <include name="*.swc" />
        </external-library-path>

        <external-library-path dir="${AR_LOCALE_DIR}">
            <include name="*.swc" />
        </external-library-path>

        <jvmarg line="${asdoc.jvm.args}"/>

        <define name="CONFIG::debug" value="false"/>
        <define name="CONFIG::release" value="true"/>
        <define name="CONFIG::FLASH_10_1" value="false"/>
        <define name="CONFIG::LOGGING" value="false"/>
    </asdoc>
    <echo>Docs creation complete</echo>
</target>

I wrote this script after looking at the build.xml inside the asdoc folder in FLEX_HOME folder.

Any hints on why I am getting the errors and how I can resolve them will be greatly appreciated!

Regards,
Ravi.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top