1 2 Previous Next 28 Replies Latest reply on Oct 16, 2014 8:03 AM by abhishekkumar Go to original post
      • 15. HowTo setup a new GateIN Portal?
        skau

        Hi Rich and good morning.

         

        Thanks for your reply.

         

        No I don’t change any configurations for database.
        The changes I have done can you read above.

        I was thinking by default GateIn use the Java Derby Database.

        Today I lookin the Reference-Guide for changing the database to MySQL but I don’t understand the steps. Why should I change files in the deployed project? Where can I change these settings in my Eclipse project?

        I think this is the best practice to configure and manage all settings with one IDE.

         

        Cheers,

        Steffen

        • 16. HowTo setup a new GateIN Portal?
          rraposa

          Hi Steffen,

           

          I would suggest you download GateIn at http://www.jboss.org/gatein/downloads, unzip it, and run it without any modifications. This should work, and you will at least have a running instance of GateIn to use.

           

          Out of the box, GateIn uses the Hypersonic DB. You will want to change this to MySQL at some point, and that will involve editing the text file /conf/gatein/configuration.properties, a file that is not a part of your Eclipse project (or any Eclipse project).

           

          All I can say about editing configuration files directly is "Welcome to JBoss!"

           

          Rich

          • 17. HowTo setup a new GateIN Portal?
            skau

            Hi Rich,

             

            I will try this solution.

            I think I had an understanding problem what is the portal and what is only a portlet in GateIn.

            I will try to customize the portal to meet the needs without deploy the whole portal inEclipse.

            I was thinking that I need to deploy GateIn within Eclipse to get better opportunity to debug my whole project.

             

            Thanks foryour help.

            Steffen

            • 18. HowTo setup a new GateIN Portal?
              rraposa

              Nope - you don't need to deploy GateIn from within Eclipse to debug your applications.

               

              Let us know when you get everything working! It shouldn't take you long now.

              • 19. HowTo setup a new GateIN Portal?
                markonamac

                Hi Rich & Steffen,

                I hope its ok, I decided to take a reply on this thread. I just fetched the GateIn trunk today (3/25), hoping to build it against AS6, and ran into the exact same issues that Steffen did. I tried two different set of instructions found here in the forums, then backed up and tried to simply build GateIn (trunk) with a standard config. Each time the result was the same... just as Steffen describes... with both Maven 2 and 3.

                 

                Any chance there is a solution that doesn't involve importing into Eclipse? With M2, at least, it looks like just a maven dependency issue somewhere in the common-logging pom. I'll start chasing it down, but it seems like it is preventing trunk from building at all. I'm new to building GateIn, so I'm thinking I am missing something (that can no longer be fetched) in my local m2 repository... that others may already have... so they don't have this issue.

                 

                Thanks,

                Mark

                • 20. HowTo setup a new GateIN Portal?
                  rraposa

                  Hi Mark,

                   

                  There are known dependency issues with Maven 2. Did you try the trunk with Maven 3?

                   

                  Rich

                  • 21. Re: HowTo setup a new GateIN Portal?
                    markonamac

                    Hi Rich,

                     

                    Yes. My results with M3 were also identical to Steffen's M3 results (as my M2 results were the same has his). I've been using M3 more since I have a fairly substancial Errai project underway. Really looking forward to Errai with SA6 myself... but the boss is a big GateIn fan. I am building on Linux Mint. Actually kinda glad to hear you say I 'should' be using M3... I'll dig into that stack instead. Any insight would be greatly appreciated... as I am kinda new to this.

                     

                    Thanks,

                    Mark

                    • 22. Re: HowTo setup a new GateIN Portal?
                      rraposa

                      I am not a Maven expert, so I won't be much help there. But I use GateIn all the time! Why don't you just download the latest stable version from the website? You could have GateIn up and running in 3 minutes.

                      • 23. HowTo setup a new GateIN Portal?
                        markonamac

                        Thanks Rich. It is very tempting. but, that means having AS5 for GateIn, and AS6 for Errai. I was hoping to pull all three together. We actually do have the 'release' GateIn up and running. But deploying my Errai projects to it, means missing out on those features in AS6 that Errai will take advantage of.

                         

                        It is clear from various posts here in the forum, that others have been successful. So, I'll fight the good fight and post back if I find anything of value. It just struck me that, whatever the issue is, Steffen and I are both seeing exactly the same thing building the current GateIn trunk.

                         

                        I very much appreciate your support. Thanks again,

                        Mark

                        • 24. HowTo setup a new GateIN Portal?
                          markonamac

                          I fetched the gatein trunk several times today (3/27) in an effort to understand why Steffen and I are seeing the same errors when attempting to build it from Maven. The good news is, after two days of trial and error, I now have a successful build and packaging with AS6. The process I had to use, however, to get a successful build is... worthy of this post.

                           

                          I believe now that the errors we are seeing, and that Steffen reported at the top of this thread, are because we are both clearing the .M2 local repository before starting the build... in that way proving the pom files by forcing a fetch of all dependencies. Hopefully, someone more familiar with the GateIn source will try it, and see if they end up with the same issues we did.

                           

                          The first set of errors posted by Steffen were the result from Maven 2. The second set of errors were from Maven 3. I have both installed as well. I've renamed the scripts from "mvn" to "mvn2" and mvn3" respectively.

                           

                          As I am trying to build GateIn against Jboss 6, I used procedures from two sources:

                          Marko Strukelj's excellent instructions in the forum thread: Running GateIn on JBoss AS 6,

                          http://community.jboss.org/message/573030

                          and

                          $FETCHED_TRUNK/packaging/jboss-as6/README.txt

                           

                          In the README, the section called "== Build integration ==" describes building GateIn, and packaging GateIn (with AS6), in two steps. Doing this, I did finally get a successful build.

                           

                          Here is the fun part... using Maven 2 alone fails with the errors Steffen reported... using Maven 3 alone also fails with the (second set of) errors Steffen reported...

                           

                          Using them BOTH... 2 first (until the error occurs), then 3... WORKS! (no kidding)

                           

                          Here are the steps I used:

                          1) rename ~/.M2/repository to ~/.M2/repository.sav

                          2) svn co http://anonsvn.jboss.org/repos/gatein/portal/trunk gatein (in ~/nd)

                          3) mkdir ~/nd/gatein/packaging/servers

                          4) copy AS6, folder and content, to this new directory (~/nd/gatein/packaging/servers/jboss-6.0.0.Final)

                          (NOTE: I chose this folder because it is the default according to the README. Marko does it slightly different.)

                          5) modify the two XML file parameters per Marko's instructions.

                          6) Edit ~/nd/gatein/pom.xml, and add repository (and plugin repository):

                          http://repository.exoplatform.org/content/groups/public

                          (This is eluded to by someone below Marko's instructions in the same thread... and I found that it was indeed necessary, or the build would fail even sooner. i.e. as soon as Maven tried to retrieve anything from exoplatform.org)

                          7) mvn2 clean install -DskipTests -Dgatein.checkout.dir=~/nd/gatein -Dmaven.test.skip.exec=true

                          (until the errors Steffen reported occur, then...)

                          8) mvn3 clean install -DskipTests -Dgatein.checkout.dir=~/nd/gatein -Dmaven.test.skip.exec=true

                          (SUCCESS!)

                           

                          The README then goes on to say I should perform the packaging by:

                          cd packaging/jboss-as6

                          mvn (or in my case mvn2)

                           

                          This failed as well, with both Maven 2 & 3. Was hoping the same trick would work, but it didn't. Both Maven versions reported the same error... can't find gatein.portal.component.wsrp 3.2.0-Beta01-SNAPSHOT. Browsing the exoplatform.org repository, did indeed turn up this dependency. I'm not sure why it couldn't be fetched. Chalk it up to my own lack of Maven-fu. So I grabbed a pom and jars with the browser, and manually added it to my local M2...

                           

                          mvn2 install:install-file -DgroupId=org.exoplatform.portal -DartifactId=gatein.portal.component.wsrp -Dversion=3.2.0-Beta01-SNAPSHOT -Dpackaging=jar -Dfile=~/Downloads/gatein.portal.component.wsrp-3.2.0-Beta01-20110315.111020-278.jar -Dsources=~/Downloads/gatein.portal.component.wsrp-3.2.0-Beta01-20110315.111020-278-sources.jar -DpomFile=~/Downloads/gatein.portal.component.wsrp-3.2.0-Beta01-20110315.111020-278.pom

                           

                          Once done, "mvn2" (in packaging/jboss-as6) ran to successful completion.

                           

                          All that's left is to get it running. For that, I'll refer back to Marko Strukelj's instructions, and hope for the best. I hope this helps Steffen, and others.

                           

                          Mark

                          • 25. HowTo setup a new GateIN Portal?
                            mstruk

                            It's nice to hear someone refer to something I wrote as excellent .

                             

                            I actually wrote both of those instructions:

                             

                            http://community.jboss.org/message/573030 and $FETCHED_TRUNK/packaging/jboss-as6/README.txt (http://anonsvn.jboss.org/repos/gatein/portal/trunk/packaging/jboss-as6/README.txt)

                             

                            I consider the first way of building obsolete. The preferred way to build is using 'Build integration' instructions in README.txt:

                             

                            cd $FETCHED_TRUNK

                            mvn install -Ppkg-jbossas6 -Dexo.projects.directory.dependencies=DEPENDENCIES_DIR

                             

                             

                            -DskipTests is equivalent to -Dmaven.test.skip.exec, so no need to use both of them. This setting tells maven to build the tests but not execute them.

                            -Dmaven.test.skip is even better, it tells maven to skip even building the tests - that may be problematic for a first time build, as there used to be dependencies on test modules, so this option may break the first time, but is good to use after you've built GateIn once.

                             

                            JBossAS6 support is still in the making, and things are a bit fluid. The crucial issue here is obviously a reference to wsrp component SNAPSHOT, it's a mistake on our part that broke the build.

                             

                            You could build that artifact from source (if you only knew how to get it):

                            svn co http://anonsvn.jboss.org/repos/gatein/components/wsrp/trunk

                             

                            Maven2 / Maven3 issue is something that popped up recently ...

                             

                            A build using a clean maven repository takes a very long time, so we obviously don't practice it often, and that's why issues like this can pass unnoticed for quite a while.

                             

                            Keep an eye on $FETCHED_TRUNK/README.txt (http://anonsvn.jboss.org/repos/gatein/portal/trunk/README.txt) as we'll be updating it with the latest instructions on how to build. We should probably also describe somewhere the overal organization of the project - might help you work around the issue.

                             

                            I wonder, is there some other link you used as instructions and didn't work for you or seems obsolete? Things are moving, and forum posts especially  can quickly become old stuff ...

                            • 26. HowTo setup a new GateIN Portal?
                              markonamac

                              Marco! wow! How great to hear from you. I tried so many different things, in so many combinations... thank goodness for the bash history. To answer your question, I did not run into any more than the two references to integrating GateIn with AS6... except for... what I believe was a mailing list entry (that Google pointed me to), that contained the explicit path to the exoplatform repository that I added to get the build to succeed: (http://repository.exoplatform.org/content/groups/public). I am not sure why the exoplatform repository already defined in the POM was not enough.

                               

                              The idea to try M2, followed by M3, with no clean step between... was one of those 4 in the morning, "I haven't tried this yet" things . LOL. Rich had suggested M3, but then I read in another post that GateIn was still "officially" using M2. Meanwhile, Thomas Heute, over in the Errai forum, had said that M3 was the way to go with Errai. I think we are just at that point in time... where Maven 3 is beginning to get a foothold... but M2 still rules.

                               

                              Thank you for the insight into the build process. I will indeed keep an eye on the main README, and I will define -Dmaven.test.skip until I am comfortable with the build. Now I have a question for you... since I have not yet tried to run what I've built...

                               

                              Do I still need to follow the "post-build" steps you mentioned in the 573030 thread (or should I be good with it "as built" now)?

                               

                              Many thanks,

                              Mark

                              • 27. HowTo setup a new GateIN Portal?
                                mstruk

                                No, if build succeeds it's good to go. If it doesn't work, then it's broken.

                                 

                                cd packaging/jboss-as6/pkg/target/jboss/bin

                                ./run.sh

                                • 28. Re: HowTo setup a new GateIN Portal?
                                  abhishekkumar

                                  Can you please tell me that  how can i setup my new project using gatein i.e.

                                  1 Create new project in eclipse and with steps that how i can configure my project to run it on jboss 7

                                  2.Database Configuration.

                                  I just need a demo project that which files are used for which purpose and where they should be placed?

                                  1 2 Previous Next