15 Replies Latest reply on Nov 18, 2009 11:07 PM by Xavier Agnetti

    test fails during build - flex-pmd-ruleset

    TexMags

      Hi, I have followed the developer documentation for how to build the project, on step 7 it fails because the following tests are failing inside flex-pmd-ruleset:

       

      Failed tests:
        testProcessViolatingFiles(com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRuleTest)
        testBuildMessageName(com.adobe.ac.pmd.rules.core.EmptyRuleTest)
        testProcessViolatingFiles(com.adobe.ac.pmd.rules.naming.WronglyNamedVariableRuleTest)
        testProcessViolatingFiles(com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRuleTest)

       

      Tests run: 219, Failures: 4, Errors: 0, Skipped: 0

       

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] There are test failures.

       

      I'm not sure how to fix these failures, any clues as what the problem may be? I ran "mvn package" from the flex-pmd-parent from the command line.

       

      TIA,

      Magnus

        • 1. Re: test fails during build - flex-pmd-ruleset
          Xavier Agnetti Adobe Employee

          Did you check out trunk or a specific branch?

           

          Can you try to invoke mvn install?

           

          Xavier

          • 2. Re: test fails during build - flex-pmd-ruleset
            Xavier Agnetti Adobe Employee

            Both trunk and Rc3 branch are under continuous integration, and the build would be broken if any unittests were failing.

             

            I would try to launch mvn install.

             

            Xavier

            • 3. Re: test fails during build - flex-pmd-ruleset
              TexMags Level 1

              I checked out from the trunk, I assumed it's something in my environment. Funny thing is that I've tried to build it on two different machines and it fails with the same error on both machines.

               

              mvn install also fails with the same set of tests. Do you build it with Java 1.5 or 1.6? I'm using 1.6, just trying to think of anything that may explain my build problems.

               

              TIA,

              Magnus

              • 4. Re: test fails during build - flex-pmd-ruleset
                Xavier Agnetti Adobe Employee

                I indeed use 1.5 as a JVM.

                 

                Can you sync again, please?

                 

                Any differences using mvn install?

                 

                Xavier

                • 5. Re: test fails during build - flex-pmd-ruleset
                  TexMags Level 1

                  I was able to get much further using Java JDK 1.5.0_21. Perhaps it would be a good idea to farther down the line, try to move to 1.6 since 1.5 is nearing EOSL in October.

                   

                  I am getting a different error because it can't download one of the plugins:

                   

                  Downloading: http://repo1.maven.org/maven2/com/adobe/ac/as3Ncss-maven-plugin/1.1/as3Ncss-maven-plugin-1 .1.jar
                  [INFO] ------------------------------------------------------------------------
                  [ERROR] BUILD FAILURE
                  [INFO] ------------------------------------------------------------------------
                  [INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to downl
                  oad the artifact from any repository

                  Try downloading the file manually from the project website.

                  Then, install it using the command:
                      mvn install:install-file -DgroupId=com.adobe.ac -DartifactId=as3Ncss-maven-plugin -Dversion=1.1 -Dpackaging=maven-pl
                  ugin -Dfile=/path/to/file

                  Alternatively, if you host your own repository you can deploy the file there:
                      mvn deploy:deploy-file -DgroupId=com.adobe.ac -DartifactId=as3Ncss-maven-plugin -Dversion=1.1 -Dpackaging=maven-plug
                  in -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

                   

                  Any thoughts on how I can get past this?

                   

                  TIA,

                  Magnus

                  • 6. Re: test fails during build - flex-pmd-ruleset
                    Xavier Agnetti Adobe Employee

                    Try to resync against trunk, and should be good.

                     

                    About Java 1.6, I will see what I can do.

                     

                    HTH

                    • 7. Re: test fails during build - flex-pmd-ruleset
                      TexMags Level 1

                      Thanks, I was able to get a little further but ran into a different artifact issue when building the Flex PMD lib:

                       

                      Downloading: http://fna-v2.googlecode.com/svn/trunk/fna_m2_repository//com/adobe/flex/framework/datavis ualization/3.2.0.
                      3958/datavisualization-3.2.0.3958-en_US.rb.swc
                      [INFO] ------------------------------------------------------------------------
                      [ERROR] BUILD ERROR
                      [INFO] ------------------------------------------------------------------------
                      [INFO] Failed to resolve artifact.

                       

                      Missing:
                      ----------
                      1) com.adobe.flex.framework:datavisualization:swc:3.2.0.3958

                       

                        Try downloading the file manually from the project website.

                       

                       

                      Is it supposed to be in this repository?

                       

                      TIA,

                      Magnus

                      • 8. Re: test fails during build - flex-pmd-ruleset
                        Xavier Agnetti Adobe Employee

                        Getting there...

                         

                        This swc is not opensource (was not in this version). So it can't be published in a public repository. You can find in your FB installation, and install manually in your local repository.

                         

                        Xavier

                        • 9. Re: test fails during build - flex-pmd-ruleset
                          TexMags Level 1

                          Thanks, I got past that. Unfortunately I am still having a problem comiling the PMD Flex Lib, I get these errors:

                           

                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\Version.as:[1,1] Definition __AS3__.vec:Vector
                          could not be found.package{ public class Version { public static const BUILD_NUMBER : String = '1.0.RC4-SNAPSHOT'; publ
                          ic static const BUILD_TIME : String = '08:56:45'; public static const BUILD_DATE : String = '2009-09-16'; }}
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\Version.as:[1,1] Definition __AS3__.vec:Vector
                          could not be found.package{ public class Version { public static const BUILD_NUMBER : String = '1.0.RC4-SNAPSHOT'; publ
                          ic static const BUILD_TIME : String = '08:56:45'; public static const BUILD_DATE : String = '2009-09-16'; }}
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\com\adobe\ac\model\IDom ainModel.as:[1,1] Defin
                          ition __AS3__.vec:Vector could not be found./**
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\com\adobe\ac\model\IDom ainModel.as:[1,1] Defin
                          ition __AS3__.vec:Vector could not be found./**
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\com\adobe\ac\model\IPre sentationModel.as:[1,1]
                          Definition __AS3__.vec:Vector could not be found./**
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\com\adobe\ac\model\IPre sentationModel.as:[1,1]
                          Definition __AS3__.vec:Vector could not be found./**
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\com\adobe\ac\pmd\model\ ViolationPriority.as:[1
                          ,1] Definition __AS3__.vec:Vector could not be found./**
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\com\adobe\ac\pmd\model\ ViolationPriority.as:[1
                          ,1] Definition __AS3__.vec:Vector could not be found./**
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\com\adobe\ac\pmd\contro l\events\GetRulesetCont
                          entEvent.as:[1,1] Definition __AS3__.vec:Vector could not be found./**
                          [ERROR] C:\MyProgramming\Flex\FlexPMD\src\flex-pmd-flex-lib\src\main\flex\com\adobe\ac\pmd\contro l\events\GetRulesetCont
                          entEvent.as:[1,1] Definition __AS3__.vec:Vector could not be found./**
                          [INFO] ------------------------------------------------------------------------
                          [ERROR] BUILD ERROR
                          [INFO] ------------------------------------------------------------------------
                          [INFO] Error compiling!
                          [INFO] ------------------------------------------------------------------------
                          [INFO] For more information, run Maven with the -e switch
                          [INFO] ------------------------------------------------------------------------
                          [INFO] Total time: 1 minute 42 seconds
                          [INFO] Finished at: Wed Sep 16 08:56:47 CDT 2009
                          [INFO] Final Memory: 42M/508M
                          [INFO] ------------------------------------------------------------------------

                           

                           

                          Any ideas?

                           

                          TIA,

                          Magnus

                          • 10. Re: test fails during build - flex-pmd-ruleset
                            Xavier Agnetti Adobe Employee

                            Magnus,

                             

                            Sorry, I did not see this one...

                             

                            Did you resolve the issue?

                             

                            Xavier

                            • 11. Re: test fails during build - flex-pmd-ruleset
                              TexMags Level 1

                              I have not been able to resolve the issue. I'm sure it's something with my environment but I haven't been able to figure what. I have the same issue on two different machines with a different setup (XP vs Vista).

                              • 12. Re: test fails during build - flex-pmd-ruleset
                                TexMags Level 1

                                I realized that the error I'm getting seems to be related to the thread "
                                missing artifact when trying to build". This thread can probably be closed.

                                • 13. Re: test fails during build - flex-pmd-ruleset
                                  Efir Efir Efir

                                  TexMags, I solve this by copying "...   \FB Plugin\sdks\3.4.0\frameworks\libs\player\10\playerglobal.swc" to "...   \flexpmd\flex-pmd-flex-lib\target\classes\libraries\playerglobal.swc"

                                  • 14. Re: test fails during build - flex-pmd-ruleset
                                    m.eichstedt

                                    There are several dependencies to playerglobal in different versions. flexmojos-unittest-support-3.2.0 for example explicitly requires playerglobal version 9 - If you have the playerglobal version 9 in your repository, it will be downloaded and shadows the other one :|

                                     

                                    flex-pmd-ruleset-creator also crashes since the FileReference signature changed from 9 to 10.

                                     

                                    Besides, the flex-framework dependency is declared twice in flex-pmd-flex-lib/pom.xml, so the exclusion block in the first declaration doesn't work.

                                     

                                    Looking at the dependency tree explains a lot

                                     

                                     

                                    But why and where is the playerglobal.swc copied to target/classes/libraries? -compiler.external-library-path is referencing that ambiguous library instead using a 'versioned' one from the repository.

                                     

                                    --matthias

                                    • 15. Re: test fails during build - flex-pmd-ruleset
                                      Xavier Agnetti Adobe Employee

                                      Ok. So against trunk, the project can be compiled against JRE 1.5 AND JRE 1.6.

                                       

                                      FYI, there was a change in the order that a HashMap gets iterated.

                                       

                                      Thanks for raising this.

                                       

                                      Xavier