Share & Learn

Tuesday, August 19, 2008

Building ASDoc with Maven-Flex Plugin

Problem: Building ASDoc with Maven

Solution: Paste the following <plugin> information under the <plugins> </plugins> section of your pom.xml

<echo>Generating asDoc documentation</echo>
<mkdir dir="${basedir}/target/apiDocs" />
<property file="${basedir}/src/main/asDoc/" />
<exec executable="${flex.home}/bin/asdoc.exe" failonerror="false" >
<arg line="-doc-sources '${srcdoc}'" />
<arg line="-library-path+='${flex.home}/frameworks/libs'"/>
<arg line="-main-title '${main.title}'" />
<arg line="-window-title '${window.title}'" />
<arg line="-output '${output.dir}'" />
<arg line="-footer ${footer}" />
<arg line="-left-frameset-width ${leftFramesetWidth}" />
<arg line="-source-path '${srcdoc}'" />
<!-- If you are using any external libraries such as Cairngorm.swc or flexlibs.swc then you need to specify them in this manner -->
<!-- <arg line="-external-library-path '${flexlib}'" />
<arg line="-external-library-path+='${cairngorm}'" /> -->

It took me 20 mins to get this done, for you it should take 2 mins. If this helps you let me know. file contains the following

srcdoc ='${basedir}/src'
main.title = Priyank Examples
window.title = Priyank Examples
output.dir ='${basedir}/target/apiDocs'
footer ="© 2008 Priyank Examples"

blog comments powered by Disqus
blog comments powered by Disqus