0 Replies Latest reply on Nov 24, 2010 4:58 AM by beginur

    customizing rulset of flexPMD 1.2

    beginur Level 1

      Hi,

      I am totally new to FlexPMD and iam happy that i got succeeded in executing FlexPMD commandline tool version 1.2 for my flex project and take care of the warnings.forum.PNG

       

      I just wanted to customize or add some extra rules in addition to the existing ruleset available with version 1.2

       

      I read the instructions given in http://opensource.adobe.com/wiki/display/flexpmd/Get+Source+Code to download the source code and followed as per mentioned.

       

      I got the entire source code (including branch, trunk,..etc)..As I mentioned before since i wanted to customize the rule available with version 1.2, i thought  i need to edit the project flex-pmd-ruleset of 1.2 which is found inside "trunk" folder.

       

      Before doing that, Iam supposed to make the environment ready as mentioned in http://opensource.adobe.com/wiki/display/flexpmd/Developer+Documentation.

       

      while i tried to execute the mvn package command into flex-pmd-parent folder, i did not have internet access to my machine..

      is the command internally access any resource from net in order to build the project?

      i got the following error msg after a long list of warnings......

       

      [INFO] ------------------------------------------------------------------------
      [INFO] Building Adobe Flex PMD Java Parent 1.2
      [INFO] ------------------------------------------------------------------------
      Downloading: http://repository.codehaus.org/org/apache/maven/plugins/maven-compi
      ler-plugin/maven-metadata.xml
      Downloading: http://mc-repo.googlecode.com/svn/maven2/releases/org/apache/maven/
      plugins/maven-compiler-plugin/maven-metadata.xml
      Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compil
      er-plugin/maven-metadata.xml
      [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-compiler-pl
      ugin/maven-metadata.xml from dist.codehaus.org (http://dist.codehaus.org): No co
      nnector available to access repository dist.codehaus.org (http://dist.codehaus.o
      rg) of type legacy using the available factories WagonRepositoryConnectorFactory

       

      [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-compiler-pl
      ugin/maven-metadata.xml from repository.codehaus.org (http://repository.codehaus
      .org): Error transferring file: repository.codehaus.org
      [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-compiler-pl
      ugin/maven-metadata.xml from mc-release (http://mc-repo.googlecode.com/svn/maven
      2/releases): Error transferring file: mc-repo.googlecode.com
      [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-compiler-pl
      ugin/maven-metadata.xml from central (http://repo1.maven.org/maven2): Error tran
      sferring file: repo1.maven.org
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] Adobe Flex PMD Java Parent ........................ FAILURE [5.375s]
      [INFO] As3 Parser API .................................... SKIPPED
      [INFO] As3 Maven plugin Utils ............................ SKIPPED
      [INFO] Adobe Flex PMD RuleSet test resources ............. SKIPPED
      [INFO] Adobe Flex PMD Files .............................. SKIPPED
      [INFO] As3 Parser ........................................ SKIPPED
      [INFO] Adobe Flex PMD RuleSet API ........................ SKIPPED
      [INFO] Adobe Flex PMD RuleSet ............................ SKIPPED
      [INFO] Adobe Flex CPD (Copy and Past Detector) ........... SKIPPED
      [INFO] Adobe Flex CPD Ant task ........................... SKIPPED
      [INFO] Adobe Flex PMD Core ............................... SKIPPED
      [INFO] Adobe Flex CPD Maven plugin ....................... SKIPPED
      [INFO] Adobe Flex PMD Command line API ................... SKIPPED
      [INFO] Adobe Flex CPD Command line ....................... SKIPPED
      [INFO] Adobe Flex PMD Ant task ........................... SKIPPED
      [INFO] Adobe Flex PMD Maven plugin ....................... SKIPPED
      [INFO] Adobe Flex PMD Command line ....................... SKIPPED
      [INFO] Adobe Flex Metrics ................................ SKIPPED
      [INFO] Adobe Flex Metrics command line ................... SKIPPED
      [INFO] Adobe Flex Metrics Ant task ....................... SKIPPED
      [INFO] Adobe Flex Metrics Maven plugin ................... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 18.985s
      [INFO] Finished at: Wed Nov 24 18:07:50 IST 2010
      [INFO] Final Memory: 3M/6M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-compi
      ler-plugin' from the repositories [local (C:\Documents and Settings\pcuser\.m2\r
      epository), dist.codehaus.org (http://dist.codehaus.org), repository.codehaus.or
      g (http://repository.codehaus.org), mc-release (http://mc-repo.googlecode.com/sv
      n/maven2/releases), central (http://repo1.maven.org/maven2)]: Plugin not found i
      n any plugin repository -> [Help 1]

       

       

      I even tried the same mvn package command for flex-pmd-parent for version 1.1 inside trunk for which i got the following error....

       

      [ERROR] The build could not read 26 projects -> [Help 1]
      [ERROR]
      [ERROR]   The project com.adobe.ac:as3-parser:1.1 (F:\FlexPMD Source code\tags\1
      .1\as3-parser\pom.xml) has 1 error
      [ERROR]     Non-resolvable parent POM: Could not transfer artifact com.adobe.ac:
      flex-pmd:pom:1.1 from central (http://repo1.maven.org/maven2): Error transferrin
      g file: repo1.maven.org and 'parent.relativePath' points at wrong local POM @ li
      ne 8, column 11: Unknown host repo1.maven.org -> [Help 2]
      [ERROR]
      [ERROR]   The project com.adobe.ac:as3-parser-api:1.1 (F:\FlexPMD Source code\ta
      gs\1.1\as3-parser-api\pom.xml) has 1 error
      [ERROR]     Non-resolvable parent POM: Could not transfer artifact com.adobe.ac:
      flex-pmd:pom:1.1 from central (http://repo1.maven.org/maven2): Error transferrin
      g file: repo1.maven.org and 'parent.relativePath' points at wrong local POM @ li
      ne 7, column 11: Unknown host repo1.maven.org -> [Help 2]

       

      .

      .

       

      i also tried opening the project files in eclipse galileo without executing mvn package command ...i noticed many errors in import statements where the actual package referred does not even exist in the code...pls refer the attached image..is the source code downloaded is unstable...

       

      where am i going wrong...pls help me with a detailed procedure to set the environment so that i can customize the ruleset...