1 2 3 Previous Next 38 Replies Latest reply on Jul 7, 2011 10:57 AM by wolfgangknauf Go to original post
      • 15. Re: Trouble with running JSFUnit 2.0Beta1
        ssilvert

        Wolfgang Knauf wrote:

         


        So, what is the correct "-P" argument to build the full JSFUnit source bundle?


        If you are going to build everything and run all the tests then you need to combine all the relevant profiles.  The simplest combination would be:

         

        mvn -Ptest,myfaces1.1,jetty-embedded install

         

        Stan

        • 16. Re: Trouble with running JSFUnit 2.0Beta1
          ssilvert

          Wolfgang Knauf wrote:

           

          The JSFUnit pom.xml all point to http://repository.jboss.org/maven2, too. But they all still build.

           

          The JSFUnit main pom.xml does include the deprecated repo.  But if you look at the first listing you will see the new one as well:

            <repository>
                <id>jboss-public-repository-group</id>
                <name>JBoss Public Repository Group</name>
                <url>http://repository.jboss.org/nexus/content/groups/public/</url>
                <layout>default</layout>
                <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                </releases>
                <snapshots>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                </snapshots>
              </repository>
          

           

          Maybe if you try that it will help.

           

          Stan

          • 17. Re: Trouble with running JSFUnit 2.0Beta1
            wolfgangknauf

            Hi Stan,

             

            thanks for the help. Unfortunately, the pom.xml of my sample now looks the same as yours, including the repositories. But before reaching this state, I had used some other repositories (found e.g. in the Arquillian docs). Might it happen that Maven "caches" data from an invalid repository? Any chance to force a refresh of this (besides deleting the complete maven cache)?

            I will give my project another try this evening and hope that after a day of idle time, Maven will refresh itself...

             

            To sum up the problems from my last two posts:

             

            a) the page http://www.jboss.org/jsfunit/building-jsfunit.html seems to contain the instructions for JSFUnit 1.3, am I right? E.g. for JBoss 6, the "-P" value seems to be ""mvn.bat -Pjbossas-remote-6". Could you add also the JSFUnit2 profiles? And what is the full maven call to build JSFUnit2 against a remote JBoss 6 with Mojarra 2.0?

             

            b) When using "mvn.bat -Pjbossas-remote-6 ...", the sample at "jsfunit-2.0.0.Snapshot\examples-arquillian\hellojsf" does not compile (see above) You fixed a similar issue in the "gettingstarted" sample - where the repo was wrong.

             

            c) the old repository "http://repository.jboss.org/maven2" can be removed from all pom.xml files.

             

            Sorry to be so annoying, but doing first Maven steps in combination with a project in beta state is quite a tough combination ;-)

             

            Best regards

             

            Wolfgang

            • 18. Re: Trouble with running JSFUnit 2.0Beta1
              ssilvert

              Wolfgang Knauf wrote:

               

              a) the page http://www.jboss.org/jsfunit/building-jsfunit.html seems to contain the instructions for JSFUnit 1.3, am I right? E.g. for JBoss 6, the "-P" value seems to be ""mvn.bat -Pjbossas-remote-6". Could you add also the JSFUnit2 profiles? And what is the full maven call to build JSFUnit2 against a remote JBoss 6 with Mojarra 2.0?

              The -P values are still valid for everything except the modules that use Arquillian.  Those are under /examples-arquillian and /gettingstarted.  To run those tests under remote JBoss 6, you would:

              • start an instance of JBoss AS6
              • mvn -Pjbossas-remote-6 test

              Note that in the above case, "test" is the Maven goal where in the Cactus-based tests I have a profile named "test".

               

               

              Wolfgang Knauf wrote:

               

              b) When using "mvn.bat -Pjbossas-remote-6 ...", the sample at "jsfunit-2.0.0.Snapshot\examples-arquillian\hellojsf" does not compile (see above) You fixed a similar issue in the "gettingstarted" sample - where the repo was wrong.

               

              Compiles for me.  I'm not sure which "above" you are referring to.

               

               

              Wolfgang Knauf wrote:

               

              c) the old repository "http://repository.jboss.org/maven2" can be removed from all pom.xml files.

               

              Sorry to be so annoying, but doing first Maven steps in combination with a project in beta state is quite a tough combination ;-)

              Yea, you are probably right about the repo.   And you're not annoying.  I realize that this Beta was put out too quickly and with too little documentation.  Not your fault.

               

              Stan

              • 19. Re: Trouble with running JSFUnit 2.0Beta1
                wolfgangknauf

                Hi Stan,

                 

                well, the "JBoss switches off an old repository" really causes trouble... I killed my old ".m2\repository" directory, and now I receive those errros when trying to build the "gettingstarted" sample (command line: "mvn.bat test -Pjbossas-remote-6"):

                 

                [ERROR] Failed to execute goal on project gettingstarted: Could not resolve dependencies for project org.jboss.jsfunit:gettingstarted:war:2.0.0-SNAPSHOT: Failed to collect dependencies for [javax.enterprise:cdi-api:jar:1.0-SP1 (provided), junit:junit:jar:4.8.1 (test), org.jboss.arquillian:arquillian-junit:jar:1.0.0.Alpha5 (test), com.sun.faces:jsf-api:jar:2.0.4-b03 (provided), jboss.web:servlet-api:jar:3.0.0-beta-2 (provided), org.jboss.jsfunit:jsfunit-arquillian:jar:2.0.0-SNAPSHOT (test), org.jboss.arquillian.container:arquillian-jbossas-remote-6:jar:1.0.0.Alpha5 (test), org.jboss.jbossas:jboss-as-client:pom:6.0.0.Final (compile)]: Failed to read artifact descriptor for trove:trove:jar:2.1.1: Could not transfer artifact trove:trove:pom:2.1.1 from/to repository.jboss.org (http://repository.jboss.org/maven2): Access denied to: http://repository.jboss.org/maven2/trove/trove/2.1.1/trove-2.1.1.pom -> [Help 1]

                 

                I know that I have to build JSFUnit itself before trying to build the sample, but there are a whole lot of other "unfound" dependencies, so I assume it would not be fixed by building core JSFUnit.

                 

                Do you have any idea? When it works again, I will hopefully stop asking questions about the "-P" options - I think I got it now ;-).

                 

                Best regards

                • 20. Re: Trouble with running JSFUnit 2.0Beta1
                  wolfgangknauf

                  Hi Stan,

                   

                  did you find the time to look at this repository mess?

                   

                  Best regards

                   

                  Wolfgang

                  • 21. Re: Trouble with running JSFUnit 2.0Beta1
                    jaikiran

                    Wolfgang Knauf wrote:

                     

                    A new problem :-(: did the JBoss guys switch off http://repository.jboss.org/maven2 (probably a deprecated repository)? I get a 403 when running a build.

                    Yes, that repo has been officially removed this week http://community.jboss.org/en/build/blog/2011/06/01/blocking-repositoryjbossorgmaven2

                    • 22. Re: Trouble with running JSFUnit 2.0Beta1
                      jaikiran

                      Hi Wolfgang,

                      Wolfgang Knauf wrote:

                       


                      Hope I don't have to kill my complete repository - my internet is poorly slow - this would be one hour of downloading again :-(.

                      When Maven builds a project and encounters a dependency, it first checks your local repo (on your filesystem) for that specific, {groupid, artifactid, version, type} combination. If it finds that artifact in your local repo, then it will  not go looking for the artifact in the remote repo (the one hosted by jboss.org or Maven central). So artifacts which are already downloaded won't be downloaded again, even if the remote repo is deleted or moved, unless ofcourse you force maven to do so by cleaning your local repo.

                      • 23. Re: Trouble with running JSFUnit 2.0Beta1
                        wolfgangknauf

                        Thanks for your reply and for your Maven basics explanation. This confirms my understanding of this tool.

                         

                        It seems the new repository does not contain Trove (whatever this is ;-), but it seems some JSFUnit dependency requires it)? This directory contains only some checksum files: https://repository.jboss.org/nexus/content/groups/public/trove/trove/

                         

                        Best regards

                         

                        Wolfgang

                        • 24. Re: Trouble with running JSFUnit 2.0Beta1
                          ssilvert

                          Can you post your latest error?  I can't find where anything in JSFUnit is depending on Trove.

                           

                          Stan

                          • 25. Re: Trouble with running JSFUnit 2.0Beta1
                            wolfgangknauf

                            Attached is the log file that is generated when running "mvn.bat test -Pjbossas-remote-6" for the gettingstarted sample.

                            I fear it will not help much.

                             

                            Currently, the JSFUnit 2.0 jars are not in my local repository, because I cannot build them. But I will try to start a full JSFUnit maven build and post the log here, too.

                             

                            Best regards

                             

                            Wolfgang

                            • 26. Re: Trouble with running JSFUnit 2.0Beta1
                              wolfgangknauf

                              I have "installed" JSFUnit2 now by using "mvn.bat install". But the "gettingstarted" sample still fails with the same error messagtes.

                              • 27. Re: Trouble with running JSFUnit 2.0Beta1
                                ssilvert

                                I figured out where your Trove dependency is coming from.  Since you are running with jbossas-remote-6, you are using the jboss-as-client, which pulls in everything but the kitchen sink.

                                 

                                Give this a try for gettingstarted:

                                mvn clean

                                mvn -Pjetty-embedded test

                                 

                                I see something else that's strange about Trove.  Your output is looking for Trove 2.1.1, which is the incorrect version (see link).  When I ask for the dependencies, I get the correct version, which is 1.0.2.

                                 

                                If you want to see the full dependency graph, do this from the gettingstarted directory:

                                mvn -Pjbossas-remote-6 dependency:tree test

                                 

                                Stan

                                • 28. Re: Trouble with running JSFUnit 2.0Beta1
                                  wolfgangknauf

                                  So, to get the incorrect Trove version, one would have to add the repository "https://repository.jboss.org/nexus/content/repositories/deprecated/" to pom.xml?

                                   

                                  About the jboss-client dependency: do you know  this Arquillian article? http://community.jboss.org/en/arquillian/blog/2011/04/05/trim-your-dependencies-when-using-jboss-as-6-remote (seems you need one more dependency, see comments for the article)

                                  Maybe this also works around the Trove problem.

                                   

                                  I will give those two a try this evening.

                                   

                                  Wolfgang

                                  • 29. Re: Trouble with running JSFUnit 2.0Beta1
                                    ssilvert

                                    Wolfgang Knauf wrote:

                                     

                                    About the jboss-client dependency: do you know  this Arquillian article? http://community.jboss.org/en/arquillian/blog/2011/04/05/trim-your-dependencies-when-using-jboss-as-6-remote (seems you need one more dependency, see comments for the article)

                                    Maybe this also works around the Trove problem.

                                     

                                    I hadn't seen that.  Thanks for the link.  I'll have to give that a try on my end too.

                                     

                                    Did you get Jetty working?

                                     

                                    Stan