I notice on flex SDK 4.0.0.7219 a docs folder.
How can I generate this docs for my own SWCs?
Asdoc? Does it need any special parameter?
VELO
Hi VELO,
Yes, we generate the docs using asdoc. The xml files are consumed by Flash builder to show asdoc in the editor.
If you run asdoc with -keep-xml=true and -skip-xsl=true, it will generate the xml files and then you will have to manually package them into the swc.
For reference you can look at the build.xml for the framework project in svn trunk.
It looks like:
<target name="doc" depends="clean-temp-docs" description="updates framework.swc with asdoc xml">
<!-- Load the <asdoc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/lib/flexTasks.jar"/>
<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>
<!-- Call asdoc to generate dita xml files -->
<asdoc output="${FLEX_HOME}/tempDoc" lenient="true" failonerror="true" keep-xml="true" skip-xsl="true" fork="true">
<compiler.source-path path-element="${basedir}/src"/>
<doc-classes class="FrameworkClasses"/>
<doc-namespaces uri="http://www.adobe.com/2006/mxml"/>
<namespace uri="http://www.adobe.com/2006/mxml" manifest="${basedir}/manifest.xml"/>
<jvmarg line="${asdoc.jvm.args}"/>
</asdoc>
<!-- updates framework.swc with asdoc xml -->
<zip destfile="${FLEX_HOME}/frameworks/locale/en_US/framework_rb.swc" update="true">
<zipfileset dir="${FLEX_HOME}/tempDoc/tempdita" prefix="docs">
<include name="*.*"/>
<exclude name="ASDoc_Config.xml"/>
<exclude name="overviews.xml"/>
</zipfileset>
</zip>
</target>
<target name="clean-temp-docs">
<delete dir="${FLEX_HOME}/tempDoc" failonerror="false" includeEmptyDirs="true"/>
</target>
Thanks,
Gaurav Jain
Flex SDK Team
Hi,
While I was trying to include DITA asdoc on flexmojos I got the following error:
Text for description in org.sonatype.flexmojos.it:AClass is not valid.
Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath
Text for description in main is not valid.
Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath
Text for description in org.sonatype.flexmojos.it.null is not valid.
Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath
Text for description in .null is not valid.
Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath
Text for description in main/aVar is not valid.
Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath
Text for description in main/main is not valid.
Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath
Any idea? I see no saxon9-dom on flex SDK, but including it on my classpath fixed the problem.
VELO
I just add "-keep-xml=true" and "-skip-xsl=true" to mine ASDoc.asdoc() invocation....
Should xalan.jar cover saxon9-dom.jar?
FWIW, I do rename all jars when I include they on maven environment. Can that be related to the problem?
I only change the jars names. It will be like xalan-4.0.0.7219.jar
VELO
My classpath does include all jar files available on flex SDK lib dir...
asc:jar:4.0.0.7219:compile,
asdoc:jar:4.0.0.7219:compile,
batik-all-flex:jar:4.0.0.7219:compile,
commons-collections:jar:4.0.0.7219:compile,
commons-discovery:jar:4.0.0.7219:compile,
commons-logging:jar:4.0.0.7219:compile,
compc:jar:4.0.0.7219:compile,
copylocale:jar:4.0.0.7219:compile,
digest:jar:4.0.0.7219:compile,
fcsh:jar:4.0.0.7219:compile,
fdb:jar:4.0.0.7219:compile,
flex-compiler-oem:jar:4.0.0.7219:compile,
flex-messaging-common:jar:4.0.0.7219:compile,
fxgutils:jar:4.0.0.7219:compile,
mxmlc:jar:4.0.0.7219:compile,
optimizer:jar:4.0.0.7219:compile,
saxon9:jar:4.0.0.7219:compile,
swfutils:jar:4.0.0.7219:compile,
velocity-dep-1.4-flex:jar:4.0.0.7219:compile,
xalan:jar:4.0.0.7219:compile,
xercesImpl:jar:4.0.0.7219:compile,
xercesPatch:jar:4.0.0.7219:compile,
xmlParserAPIs:jar:3.2.0.3958:compile,
Is that a problem?
North America
Europe, Middle East and Africa
Asia Pacific