build - Including configuration files while compiling a Flex application with MXMLC -


I am using: - Flex SDK 3.5.0 - Parsley 2.2.2. - Flash Builder 4

In my SRCOR folder (which is configured as part of the source path in the flash builder), I have a logging. XML that I configure via parsley I am:

  FlexLoggingXmlSupport.initialize (); XmlContextBuilder.build ("com / company / product / util / log / logging.xml");  

When I run my application through Flash Builder, XmlContentBuilder logging.XML (Implementation is a regular URL loader) detects.

When I compile my application using MXMLAC (whether ant or command line), and then run SWF, I get the following error:

Reason (0) : Error in loading com / company / product / usage / log / logging .xml: Error in URLLoader - Cause: Error # 2032: Stream Error Url: file: /// c | /workspace/folder01/product/target/com/company/product/util/log/logging.xml - Reason: Error # 2032: Stream Error Url: file: /// c | /workspace/folder01/product/target/com/company/product/util/log/logging.xml

The MXLLC tag here is in the ant:

  & lt; Mxmlc file = "$ {product.src.dir} /com/company/product/view/Main.mxml" output = "$ {product.target.dir} / $ {product.release .filename}" keep-generate- Verbs = "wrong" & gt; & Lt; Load-config filename = "$ {FLEX_HOME} / frames / flex-config.xml" /> & Lt ;! - Source path - & gt; & Lt; Source-path path-element = "$ {FLEX_HOME} / framework" /> & Lt; Compiler.source-path path-element = "$ {product.src.dir}" /> & Lt; Compiler.source-path path-element = "$ {product.locale.dir} / {locale}" /> & Lt; Compiler.library-path dir = "$ {product.basedir}" append = "true" & gt; & Lt; Include name = "libs" / & gt; & Lt; /compiler.library-path> & Lt; Warning & gt; False & lt; / Warning & gt; & Lt; Debug & gt; False & lt; / Debug & gt; & Lt; / Mxmlc & gt;  

And here is the command line:

  \ mxmlc.exe -output "C: \ temp \ rap.swf" -load-config "C: \ Program Files \ Adobe \ Adobe Flash Builder \ plugins \ sdks \ 3.5.0 \ frameworks \ flex-config.xml "-source-path" C: \ Program Files Adobe \ Adobe Flash Builder 4 Plug-ins \ Sdks \ 3.5.0 \ frameworks "C: \ workspace \ folder01 \ product \ src C: \ workspace \ folder 01 \ product \ locale \ en_US -library-path + = C: \ workspace \ folder01 \ product \ libs -file-specs C: \ Workspace \ folder01 \ product \ src \ com \ company \ product \ view \ main.mxml  

Now maybe I'm not right of this, but as far as I can go to SWF Mjta I should be compiled with all the resources of the path, which I as a source-path Maksmelsi. For some reasons it seems that the XML file is not compiled in SWF, so the relative path of the XML content builder is not located successfully.

I could not find any argument to provide to MXMLAC which can be solved with

I try to use the Dump-Config option with the Flash Builder Compiler Of that, MXMLAC was given to that configuration, but it also does not work.

I tried to make it available with a full path XmlContentBuilder when I compiled with MXMLAC with ant, but still did not work, I did the right thing even when I used to write MXLLC I will be happy to be enlightened here, about all the subjects - using MXMLC, accessing resources with relative path, logging in parsley C configure etc.

Many thanks in advance, Daniel

Good, only now I want to understand CCMA What's happening is:

The URL loader inside the XmlContextBuilder tried to access the file locally (file: //).

The Flash Builder has copied the file from its original location ('src' folder) to the target location ('bin-debug' folder), and then it was detected by the URL loader.

When I compiled SWF, I did not copy my target location (file in the 'target' folder shown in the error message) This is the reason why it was not found ...

Now, I think I need a better understanding of how to properly access an XML file ...


Comments