5 Replies Latest reply on Nov 28, 2012 6:55 AM by kenfinni

    GateIn Cookbook question on Chapter 1 Getting Started - building from source

    jpadula35

      Hi,

      I've tried a few times to build the source as described in Chapter 1 Getting Started but get an error. I'm not sure if SVN downloaded the source correctly.

       

      In order to follow along in the book, I have installed SVN 1.6.17 and Maven 3.0.4.

       

      I downloaded 3.2 source with SVN.

       

      I tried to build with mavan, using the command specified in the book.

       

      I have a couple of problems:

       

      1) Should I see a subfolder called "Applications/Apache Tomcat" ? I don't have anything like that in the source structure

       

      2) I am unable to successfully complete build, I get the following error, when I type the maven clean install ... command that you have in the book

      from the packaging folder.

       

      (At the very root folder, there is no pom.xml, so I tried to run command from packaging folder)

      C:\gatein-portal-3.2.0\packaging>mvn clean install -DskipTests -Dpkg-tomcat -Dexo.projects.directory.dependencies=/Appli

      cations/Apache Tomcat -Dexo.projects.app.tomcat.version=apache.tomcat-6.0.32

      [INFO] Scanning for projects...

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for org.exoplatform.portal:exo.portal.packag

      ing:pom:3.2.0-GA

      [WARNING] Detected profiles.xml alongside org.exoplatform.portal:exo.portal.packaging:3.2.0-GA, this file is no longer s

      upported and was ignored, please use the settings.xml instead

      [WARNING]

      [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

      [WARNING]

      [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

      [WARNING]

      [INFO]

      [INFO] ------------------------------------------------------------------------

      [INFO] Building GateIn Portal Packaging 3.2.0-GA

      [INFO] ------------------------------------------------------------------------

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 1.470s

      [INFO] Finished at: Fri Nov 23 20:30:13 EST 2012

      [INFO] Final Memory: 3M/247M

      [INFO] ------------------------------------------------------------------------

      [ERROR] Unknown lifecycle phase "Tomcat". You must specify a valid lifecycle phase or a goal in the format <plugin-prefi

      x>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate,

      initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generat

      e-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classe

      s, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deplo

      y, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]

      [ERROR]

      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

      [ERROR] Re-run Maven using the -X switch to enable full debug logging.

      [ERROR]

      [ERROR] For more information about the errors and possible solutions, please read the following articles:

      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException

      C:\gatein-portal-3.2.0\packaging>

       

      (I also tried just maven clean install, but that didn't work either.)

       

      Thanks for any help.

      -- Joe

        • 1. Re: GateIn Cookbook question on Chapter 1 Getting Started - building from source
          piergiorgiolucidi

          Hi Joe,

          1) Should I see a subfolder called "Applications/Apache Tomcat" ? I don't have anything like that in the source structure

          To build GateIn you should have a folder in your local file system that contains the Apache Tomcat bundle extracted.

          This bundle must be configured using the parameter -Dexo.projects.directory.dependencies  for building the GateIn Tomcat bundle.

           

          So I think that you have to follow these steps:

          1. Download separately the Apache Tomcat bundle
          2. Extract the bundle in your local machine
          3. Build GateIn configuring the folder of your Tomcat bundle extracted using -Dexo.projects.directory.dependencies

           

          Hope this helps.

          PJ

          1 of 1 people found this helpful
          • 2. Re: GateIn Cookbook question on Chapter 1 Getting Started - building from source
            jpadula35

            Thanks PJ. The command I used to download the GateIn 3.2 source from svn:

             

            svn checkout http://anansvn.jboss.org/repos/gatein/portal/tags/3.2.0-GA/ gatein-portal-3.2.0

             

            I had thought this would download GateIn with the Tomcat bundle also, I didn't realize that had to be downloaded separately. I guess I'll have to figure out how to download the source for Tomcat if that is the case.

            • 3. Re: GateIn Cookbook question on Chapter 1 Getting Started - building from source
              kenfinni

              Joe,

               

              You shouldn't need to download Tomcat sources, just a Tomcat binary distribution.

               

              The GateIn build is then wanting the location of that binary distribution.

               

              FYI, depending on what server you want to build GateIn against would determine whether you need AS7, Tomcat or Jetty binaries.  Also, the bundled downloads remove the need to build from source.

               

              Ken

              • 4. Re: GateIn Cookbook question on Chapter 1 Getting Started - building from source
                jpadula35

                Thanks guys. I've downloaded the binary distribution of Apache 6.0.32 to be consistent with example in your book. I extracted it to:

                C:\Applications\Apache Tomcat\apache-tomcat-6.0.32

                 

                The source for Gate is here:

                C:\gatein-portal-3.2.0

                 

                I think I have the correct mvn command:

                > mvn clean install -DskipTests -Dpkg-tomcat -Dexo.projects.directory.dependencies=C:\Applications\Apache Tomcat -Dexo.projects.app.tomcat.version=apache.tomcat-6.0.32

                 

                But I'm not sure where to run the command from. At the root of C:\gatein-portal-3.2.0 there is no pom.xml.

                 

                I tried running from the packaging folder and get the same error that I previously got. I've also tried it from:

                C:\gatein-portal-3.2.0\packaging\tomcat

                 

                I know, I can just unzip the binary distribution of GateIn but I'm trying to figure out how to build it with Maven, and still missing something.

                 

                Thanks for any advice.

                Joe

                • 5. Re: GateIn Cookbook question on Chapter 1 Getting Started - building from source
                  kenfinni

                  Joe,

                   

                  I think the problem is due to the path to Tomcat containing a space, which makes Maven think that "Tomcat" is actually a comand to it instead of part of the path.

                   

                  To fix it I would either rename "C:\Applications\Apache Tomcat" without a space, or include the quotes as I have here.  Either should solve the Maven issue.

                   

                  Ken