1 Reply Latest reply on Aug 3, 2011 12:08 PM by John Franey

    Trouble with running JSFUnit 2.0Beta1

    arun kumar Newbie

      Hi All,


      i am getting this error for "Getting strated" example for JSFUnit mvn -Pjetty-embedded test.


      Error is:

      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Minimal example for the Getting Started Guide
      [INFO]    task-segment: [test]
      [INFO] ------------------------------------------------------------------------
      [INFO] [resources:resources {execution: default-resources}]
      [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] skip non existing resourceDirectory C:\Arun_my_work\gettingstarted\src\main\resources
      [INFO] [compiler:compile {execution: default-compile}]
      [INFO] No sources to compile
      [INFO] [resources:testResources {execution: default-testResources}]
      [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] skip non existing resourceDirectory C:\Arun_my_work\gettingstarted\src\test\resources
      [INFO] [compiler:testCompile {execution: default-testCompile}]
      [INFO] Nothing to compile - all classes are up to date
      [WARNING] DEPRECATED [systemProperties]: Use systemPropertyVariables instead.
      [INFO] [surefire:test {execution: default-test}]
      [INFO] Surefire report directory: C:\Arun_my_work\gettingstarted\target\surefire-reports

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running org.jboss.jsfunit.example.hellojsf.HelloJSFTest
      Jul 7, 2011 1:15:52 PM org.jboss.arquillian.impl.client.container.ContainerRegistryCreator getActivatedConfiguration
      INFO: Could not read active container configuration: null
      Jul 7, 2011 1:15:52 PM org.eclipse.jetty.util.log.Slf4jLog info
      INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.eclipse.jetty.util.log) via org.eclipse.jetty.util.log.Slf4jLog
      Jul 7, 2011 1:15:52 PM org.jboss.arquillian.container.jetty.embedded_7.JettyEmbeddedContainer start
      INFO: Starting Jetty Embedded Server 7.0.2.v20100331 [id:30817849]
      Jul 7, 2011 1:15:52 PM org.eclipse.jetty.util.log.Slf4jLog info
      INFO: jetty-7.0.2.v20100331
      Jul 7, 2011 1:15:52 PM org.eclipse.jetty.util.log.Slf4jLog info
      INFO: Started SelectChannelConnector@localhost:9090
      Jul 7, 2011 1:15:54 PM org.jboss.shrinkwrap.resolver.impl.maven.LogTransferListerer transferFailed
      WARNING: Failed downloading com/sun/faces/jsf-api/2.0.4-b03/jsf-api-2.0.4-b03.pom from http://repo1.maven.org/maven2/, reason: org.apache.maven.wagon.Res
      rceDoesNotExistException: Could not find com/sun/faces/jsf-api/2.0.4-b03/jsf-api-2.0.4-b03.pom in http://repo1.maven.org/maven2
      Jul 7, 2011 1:15:54 PM org.jboss.shrinkwrap.resolver.impl.maven.LogRepositoryListener artifactDescriptorMissing
      WARNING: Missing artifact descriptor for com.sun.faces:jsf-api:jar:2.0.4-b03
      Jul 7, 2011 1:15:54 PM org.jboss.shrinkwrap.resolver.impl.maven.LogTransferListerer transferFailed
      WARNING: Failed downloading com/sun/faces/jsf-api/2.0.4-b03/jsf-api-2.0.4-b03.jar from http://repo1.maven.org/maven2/, reason: org.apache.maven.wagon.Res
      rceDoesNotExistException: Could not find com/sun/faces/jsf-api/2.0.4-b03/jsf-api-2.0.4-b03.jar in http://repo1.maven.org/maven2
      Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.951 sec <<< FAILURE!

      Results :

      Tests in error:
        org.jboss.jsfunit.example.hellojsf.HelloJSFTest: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.WebArchive org.jboss.j
      unit.example.hellojsf.HelloJSFTest.createDeployment()
        org.jboss.jsfunit.example.hellojsf.HelloJSFTest

      Tests run: 2, Failures: 0, Errors: 2, Skipped: 0

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

      Please refer to C:\Arun_my_work\gettingstarted\target\surefire-reports for the individual test results.
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5 seconds
      [INFO] Finished at: Thu Jul 07 13:15:54 IST 2011
      [INFO] Final Memory: 22M/54M
      [INFO] ------------------------------------------------------------------------

       

      any solutions?


      Thanks in Advance..


      -Arun

        • 1. Re: Trouble with running JSFUnit 2.0Beta1
          John Franey Novice

          The problem of course is the maven repositories you are using cannot satisfy the dependency: com.sun.faces:jsf-api:jar:2.0.4-b03.

           

          Maven has a timestamp file which prevents if from checking remote repositories too often.  I don't think this is the root cause, but if you had attempted reasonable changes to your repository settings, they won't activate until the time expires, or unless you remove the timestamp files.  All files in your local repositories with names ending in 'lastUpdated' are maven timestamp files.  It would be a good check to make sure one does not exist in: ~/.m2/repository/com/sun/faces/jsf-api/2.0.4-b03.

           

          The error message says your maven client is checking only  http://repo1.maven.org/maven2/.

           

          Currently, the trunk version of gettingstarted's pom.xml is pointing to the jboss repositories.  So, either you are not using the latest, or somehow disabled to repositories tag in the project's pom.