Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing ANT with Flex, building dependent target fails
    primarykey
    data
    text
    <p>I have a flex project called <code>framework</code> and another one called <code>commons</code>. Commons depends on framework.</p> <p><strong>Build script for framework :</strong></p> <pre><code>&lt;project name="imanager-framework" basedir="."&gt; &lt;property name="src" location="src"/&gt; &lt;property name="dist" location="dist"/&gt; &lt;property name="FLEX_HOME" value="C:/Program Files (x86)/Adobe/Adobe Flash Builder 4.5/sdks/4.6.0"/&gt; &lt;taskdef resource="flexTasks.tasks" classpath="${basedir}/libs/flexTasksFlash4.jar"/&gt; &lt;target name="clean"&gt; &lt;delete dir="${dist}"/&gt; &lt;/target&gt; &lt;target name="dist"&gt; &lt;echo&gt;src dir: ${src}&lt;/echo&gt; &lt;mkdir dir="${dist}"/&gt; &lt;compc output="${dist}/${ant.project.name}.swc"&gt; &lt;source-path path-element="src" /&gt; &lt;library-path dir="libs" includes="*.swc" append="true"/&gt; &lt;include-sources dir="${src}" includes="*" /&gt; &lt;/compc&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p><strong>Build script for commons :</strong></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project name="imanager-commons" basedir="."&gt; &lt;property name="src" location="src"/&gt; &lt;property name="dist" location="dist"/&gt; &lt;property name="FLEX_HOME" value="C:/Program Files (x86)/Adobe/Adobe Flash Builder 4.5/sdks/4.6.0"/&gt; &lt;taskdef resource="flexTasks.tasks" classpath="${basedir}/libs/flexTasksFlash4.jar"/&gt; &lt;target name="clean"&gt; &lt;delete dir="${dist}"/&gt; &lt;/target&gt; &lt;target name="init"&gt; &lt;echo&gt;Running Target: init&lt;/echo&gt; &lt;echo&gt;Running ant dist on framework&lt;/echo&gt; &lt;!-- THIS PART FAILS --&gt; &lt;ant dir="../framework/" target="dist" inheritall="false"/&gt; &lt;copy file="../framework/dist/imanager-framework.swc" todir="libs"/&gt; &lt;/target&gt; &lt;target name="dist" depends="init"&gt; &lt;mkdir dir="${dist}"/&gt; &lt;compc output="${dist}/${ant.project.name}.swc"&gt; &lt;source-path path-element="src" /&gt; &lt;library-path dir="libs" includes="*.swc" append="true"/&gt; &lt;include-sources dir="${src}" includes="*" /&gt; &lt;/compc&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>Calling <code>&lt;ant&gt;</code> from the commons build file gives me spurious compile errors about bad imports and classes not being found. But running framework's build separately doesn't give any errors.</p> <p>Here's some of the output I get</p> <pre><code>Buildfile: E:\flexspace\imanager\commons\build.xml init: [echo] Running Target: init [echo] Running ant dist on framework Trying to override old definition of task asdoc Trying to override old definition of task compc Trying to override old definition of task mxmlc Trying to override old definition of task html-wrapper dist: [echo] src dir: E:\flexspace\imanager\framework\src [compc] Loading configuration file C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.6.0\frameworks\flex-config.xml ...some warnings from my code here... [compc] E:\flexspace\imanager\framework\src\com\iwobanas\controls\dataGridClasses\MDataGridColumn.as(72): col: 88 Error: Access of undefined property WildcardFilterEditor in package com.iwobanas.controls.dataGridClasses.filterEditors. [compc] filterEditor = new ClassFactory(com.iwobanas.controls.dataGridClasses.filterEditors.WildcardFilterEditor); [compc] ^ [compc] E:\flexspace\imanager\framework\src\com\iwobanas\controls\dataGridClasses\MDataGridColumn.as(24): col: 60 Error: Definition com.iwobanas.controls.dataGridClasses.filterEditors:WildcardFilterEditor could not be found. [compc] import com.iwobanas.controls.dataGridClasses.filterEditors.WildcardFilterEditor; [compc] ^ [compc] E:\flexspace\imanager\framework\src\org\syspire\erp\component\tooltip\components\ExtendedToolTip.as(3): col: 48 Error: Definition org.syspire.erp.component.tooltip.skins:ExtendedToolTipSkin could not be found. [compc] import org.syspire.erp.component.tooltip.skins.ExtendedToolTipSkin; [compc] ^ [compc] E:\flexspace\imanager\framework\src\org\astrika\shared\components\gridSearch\view\SearchDatePopup.mxml(14): Error: Type was not found or was not a compile-time constant: SearchDateView. [compc] &lt;gridSearch:SearchDateView id="searchDateView"/&gt; ...similar errors... BUILD FAILED E:\flexspace\imanager\commons\build.xml:17: The following error occurred while executing this line: E:\flexspace\imanager\framework\build.xml:17: compc task failed Total time: 4 seconds </code></pre> <p>What's going wrong here?</p> <p>Thanks</p> <p><strong>EDIT</strong></p> <p>As requested, here are the config dumps:</p> <p>Framework build using Flash Builder: <a href="http://pastebin.com/kLai6j7X" rel="nofollow">http://pastebin.com/kLai6j7X</a></p> <p>Framework build using ANT: <a href="http://pastebin.com/FGHBAXZX" rel="nofollow">http://pastebin.com/FGHBAXZX</a></p> <p>Framework build called from commons using ANT: (This is same as the previous dump)</p> <p><strong>UPDATE</strong> I ended up just changing the structure of my build files to eliminate the <code>&lt;ant&gt;</code> call. I now how one build.xml for all the projects, will all targets in it. Not pretty, but it works for me.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload