4 Replies Latest reply: Aug 11, 2010 1:18 PM by gwright10 RSS

    Inspecting test tree

    gwright10 Community Member

      When I run FlexPMD 1.1 via Maven, it only checks the main source tree (src/main/flex).  How can I get it to also check the test source tree (src/test/flex)?

        • 1. Re: Inspecting test tree
          Tom Schober

          In your POM you can add a configuration option:

           

           

          <plugin>
               <groupId>com.adobe.ac</groupId>
               <artifactId>flex-pmd-maven-plugin</artifactId>
               <version>1.1</version>
               <configuration>
                    <ruleSet>${basedir}/your-flex-pmd-ruleset.xml</ruleSet>
                         <sourceDirectory>${basedir}/src</sourceDirectory>
               </configuration>
          </plugin>
          • 2. Re: Inspecting test tree
            gwright10 Community Member

            Tried that.  Build breaks and I get:

             

            [INFO] Error configuring: com.adobe.ac:flex-pmd-maven-plugin. Reason: ERROR: Can not override read-only parameter: sourceDirectory in goal: flex-pmd:report

            • 3. Re: Inspecting test tree
              Xavier Agnetti Adobe Employee

              We removed the read-only flag on this parameter. It is still  defaulted to the build sourceDirectory though.

              Tom's solution would now work then.

               

              The trunk and the snapshot repository have been updated.

               

              Cheers,

               

              Xavier

              • 4. Re: Inspecting test tree
                gwright10 Community Member

                This works as far as running the rules, but the pmd.xml reports the packages wrong (they all start with main.flex or test.flex).  Not a huge deal -- I can just add two executions, but then I'll end up with two files.