Flex PMD Developer Documentation

The purpose of this documentation is to help setting up your environment if you want to create your own rules or extend FlexPMD.

Requirements:
Java 1.5x

Here are the steps you will need to do:

1. Add a SubVersion client or SubEclipse

2. Install Maven locally
http://maven.apache.org/download.html

3. Add the the Maven binary directory to the path.

  • On Unix-based OS: In a command line, type PATH=$PATH\:/dir/path ; export PATH > ~/.profile
  • On Windows OS:
    • From the desktop, right-click My Computer and click properties.
    • In the System Properties window, click on the Advanced tab.
    • In the Advanced section, click the Environment Variables button.
    • Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.

4. Add a Maven eclipse plugin (m2)
http://m2eclipse.sonatype.org/update/

5. Check out the projects locally in a folder of your choice

6. Open a command line, change the current directory to <checkOutDirectory>

7. Type : cd flex-pmd-parent && mvn package amd make sure the build succeeds

8. Import the projects into Eclipse using SubEclipse.

9. Create a new workspace variable called FLEX_PMD_TEST_RESOURCES_LOCATION pointing to
<checkOutDirectory>/flex-pmd-test-resources/src/main/resources

10. Make sure the the build succeeds.

11. Run unit-tests for flex-pmd-ruleset, flex-pmd-ruleset-api, flex-pmd-core projects