How to Use flexpmd

Source: Internet
Author: User

Flexpmd includes Mac, command line, and ant. The following describes the usage of the two methods:

Command Line usage with custom rules: Java-xmx256m-jar flex-pmd-command-line-1.0.RC3.jar-s. /src/-o. -R custom_ruleset.xml; default usage: Java-xmx256m-jar flex-pmd-command-line-1.0.RC3.jar-s. /src/-o-r; the following three parameters are the as Directory, output directory, and rules.

Ant is mainly used to compile ant files:

<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <! -- ===================================================== ===============================< Br/> 10:41:53 </ p> <p> superpaneldemo <br/> description </P> <p> huangjx <br/> ================ ========================================================== ===============--> <br/> <project name = "superpaneldemo" default = "flexpmdwithdefaultruleset"> <br/> <property name = "src. dir "value =" $ {basedir}/src "/> <br/> <property name =" bin. dir "Val UE = "$ {basedir}/bin/"/> </P> <p> <property name = "flexpmd. version "value =" 1.0.rc4 "/> <br/> <property name =" flexpmd. dir "value =" $ {basedir}/Libs "/> </P> <p> <! --*************************************** * *********** <Br/> flexpmd <br/> ****************** ********************************** --> </P> <p> <taskdef name = "flexpmd" classname = "com. adobe. AC. PMD. ant. flexpmdanttask "classpath =" $ {flexpmd. dir}/flex-pMD-ant-task-$ {flexpmd. version }. jar "> <br/> <classpath> <br/> <pathelement location =" $ {flexpmd. dir}/flex-pMD-ruleset-API-$ {flexpmd. version }. jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/flex-pMD-ruleset-$ {flexpmd. version }. jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/flex-pMD-core-$ {flexpmd. version }. jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/as3-plugin-utils-$ {flexpmd. version }. jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/as3-parser-$ {flexpmd. version }. jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/pmd-4.2.2.jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/commons-lang-2.4.jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/flex-pMD-files-$ {flexpmd. version }. jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/as3-parser-api-$ {flexpmd. version }. jar "/> <br/> <pathelement location =" $ {flexpmd. dir}/plexus-utils-1.0.2.jar "/> <br/> </classpath> <br/> </taskdef> </P> <p> <target name =" flexpmdwithcustomruleset "> <br /> <mkdir dir = "$ {bin. dir} "/> <br/> <flexpmd sourcedirectory =" $ {SRC. dir} "outputdirectory =" $ {bin. dir} "ruleset =" $ {flexpmd. dir}/PMD. XML "/> <br/> </Target> </P> <p> <target name =" flexpmdwithdefaultruleset "> <br/> <flexpmd sourcedirectory =" $ {SRC. dir} "outputdirectory =" $ {bin. dir} "/> <br/> </Target> </P> <p> </Project>

Finally, a file of PMD. XML will be generated. Open this URL!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.