0 Replies Latest reply on Jul 30, 2010 2:14 AM by NewFlo

    FlexBuilder 4 - Problem using Ant-Script to build ASDoc

    NewFlo Level 1

      Hi, Guys!

       

      I am trying to write a ant script to create the ASDoc for my project.

       

      Now i ran into some problems! I get lots of this error msgs:

      Error: The private attribute may be used only on class property definitions.

      I guess the problem is that ant doesn't understand that the AS-Classes producing that errors are not used as

      standalone-classes. To divide my mxml and AS-Code i import external AS-Classes to my MXML

      like that <mx:Script source="ascodeClass.as" />

       

      Is there a solution allowing me to use this pattern and still compile my asDoc with ant?

      It confuses me a little, because Ant-Scripts worked to compile the project swf's.

       

      Thanks in advance!

      Florian

       

      My Ant-Script producing that error:

      <project name="Generate ASDoc" basedir=".">
          <description>
             Creates the ASDoc
          </description>
          <property file="FlexbuilderASDocAntTask.properties" />
          <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
         
          <target name="cleanAndCreateASDoc"
                  depends="cleanASDoc, compileASDoc"
                  description="Cleans and creates Actionscript-Documentation"
                  />
                 
              <!-- Delete the existing output folder and files and then regenerate the output folder -->
                  <target name="cleanASDoc">
                      <echo>Deleting ASDoc Directory...</echo>
                          <!--Delete the folder specified for the Asdoc.dir variable-->
                          <delete dir="${Asdoc.dir}" failOnError="false" includeEmptyDirs="true" />
                          <echo>Deleted ASDoc Directory</echo>
                          <echo>Creating ASDoc Directory...</echo>
                          <!--Creates the folder specified for the Asdoc.dir variable-->
                          <mkdir dir="${Asdoc.dir}" />
                      <echo>Created ASDoc Directory</echo>
                  </target>
                 
              <!-- Run the ASDoc executable and generate the ASDocs to the new output folder -->
                  <target name="compileASDoc">
                     
                      <echo>ASDoc Compiling...</echo>
                          <exec executable="${AsDocs.executable}" failonerror="true">
                         
                          <!--THIS SEEMS TO SOLVE THE WINDOWEDAPPLICATION AND FOLLOWING VECTOR ERROR -->   
                              <arg line="-load-config ${FLEX_HOME}/frameworks/air-config.xml" />
                              <arg line="-target-player 10.0.0" />

                          <!--THIS SEEMS TO SOLVE THE WINDOWEDAPPLICATION AND FOLLOWING VECTOR ERROR -->
                             
                          <!--Main title for the top of all ASDoc pages-->
                              <arg line="-main-title '${Main.title}'" />
                             
                          <!--Prefix Title of the window-->
                              <arg line="-window-title '${Window.title}'" />
                             
                          <!--Defines the output directory for the ASDoc-Files-->
                              <arg line="-output '${Asdoc.dir}'" />
                             
                          <!--Footer added to each ASDoc page-->
                              <arg line="-footer '${Footer.text}'" />
                             
                          <!--Adding the source folders the ASDoc should be created from (Start)-->
                              <arg line="-doc-sources '${ModuleBaseDir}/source'" />

                          <!--Adding the source folders the ASDoc should be created from (End)-->
                             
                          <!--Adding the folders for external Libraries needed to compile the application(Start)-->
                              <arg line="-external-library-path '${ModuleBaseDir}/libs'" />

                          <!--Adding the folders for external Libraries needed to compile the application(End)-->
                          </exec>
                      <echo>ASDoc Compile Complete!</echo>
          </target>
      </project>