Hi Jim

If you do a google search on "liferay permgen" you will get a lot of results about it so this seems to be a general "issue".

I have been testing out several older versions of Liferay with Geronimo 1.1.1 and 2.0.2 and my experience with it is that Liferay is a real best, although a nice one ;) that likes a lot of memory so try bump up memory by setting it to something like -Xms128m -Xmx1024m -XX:MaxPermSize=128m in you java opts and hopefully it will stabilize.

Good luck with this, I am following it with great interest, unfortunately I have a buzzy time with work at the moment else I would have joined in this endeavour.

regards
  peter petersson

Jim Foster wrote:
djencks wrote:
On Mar 3, 2008, at 8:33 AM, Jim Foster wrote:

djencks wrote:
On Mar 1, 2008, at 10:02 AM, Jim Foster wrote:

djencks wrote:
Your plan works for me. I jar'ed up my sample and attached it to the wiki page. Could you see if you can detect the relevant difference?

thanks
david jencks

 <snip>


Hi David,

I think I see the point of confusion.

In your doc, you have this:

[3] Repackage the liferay war

mvn archetype:create \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DarchetypeArtifactId=maven-archetype-webapp \
  -DarchetypeVersion=1.0 \
  -DgroupId=com.liferay \
  -DartifactId=liferay-portal-lesslibs \
  -Dversion=4.4.1-NOLIB-SNAPSHOT
cd liferay-portal
rm -rf src


Shouldn't that artifactId be "liferay-portal"?

I don't think so.  Previously we've installed the liferay portal war
from liferay in the local maven repo as com.liferay/liferay-portal/
4.4.1/war so we don't want another project claiming to generate the
same artifactId.  In fact I tried this at first but just having a
different version between input and output doesn't work -- maven
objects.

Hi David,

I just don't see how in your documentation you can have this:

  mvn archetype:create \
    ...
    -DartifactId=liferay-portal-lesslibs \
    ...

followed by this:

  cd liferay-portal


There isn't a directory liferay-portal, but there is
liferay-portal-lesslibs, so one or the other must be out of sync.



Also, in your liferay-sample.jar, you have the directory structure

liferay-parent/
                     pom.xml

                     geronimo-jetty-liferay/
                                                      pom.xml

                     liferay-derby/
                                        pom.xml
                                        src/
                                             main/
                                                     plan/
                                                            plan.xml

                                                     resources/

                     liferay-jetty/
                                        pom.xml
                                        src/
                                             main/
                                                     plan/
                                                            plan.xml

                                                     resources/

                     liferay-portal/
                                         pom.xml



Where did the directory liferay-portal-lesslibs go?

And where did directory liferay-portal come from?
This is what happens without proper review :-). I started with calling my repackaged liferay liferay-portal but the duplicate artifactId didn't work. I then missed updating the name change in a lot of places.

Hopefully it's fixed now....  waiting for your review...

thanks
david jencks




Hi David,

I am glad that this is turning out to be a productive discussion.

I have some more review notes for you.

For reference:

  Constructing a special-purpose server using maven
http://cwiki.apache.org/confluence/display/GMOxDOC21/Constructing+a+special-purpose+server+using+maven [1] Preparation – find the artifacts
    [2] Set up a parent maven project
    [3] Repackage the liferay war
    [4] Build a database plugin
    [5] Build the liferay war plugin
    [6] Build an assembly
    [7] Run the project
Note:
In the following, I use the term "baseline" to mean your liferay-sample.jar
attached to your wiki doc, which builds as it should in maven (hence
"baseline"), and  "doc" to mean your wiki documentation.
[3] baseline has this:

      <version>4.4.1</version>

    whereas the doc has this:

      <version>${liferayVersion}</version>

    which produces an artifact not found error (i.e., there is no
liferayVersion defined at this point of the process).


[5] baseline has this:

      <dependency>
        <groupId>com.liferay</groupId>
        <artifactId>liferay-portal-lesslibs</artifactId>
        <version>${liferayVersion}-SNAPSHOT</version>
        <type>war</type>
        <scope>provided</scope>
      </dependency>

    whereas the doc has this:

      <dependency>
        <groupId>com.liferay</groupId>
        <artifactId>liferay-portal-lesslibs</artifactId>
        <version>${liferayVersion}</version>
        <type>war</type>
        <scope>provided</scope>
      </dependency>
which produces [INFO]
------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO]
------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.

      GroupId: com.liferay
      ArtifactId: liferay-portal-lesslibs
      Version: 4.4.1
[6] baseline has this:

      <properties>
        <geronimoVersion>2.1</geronimoVersion>
      </properties>

    whereas the mvn command generates this:

      <properties>
        <geronimoVersion>2.2-SNAPSHOT</geronimoVersion>
      </properties>
which produces

      [INFO]
------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO]
------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.

      GroupId: org.apache.geronimo.assemblies
      ArtifactId: assemblies
      Version: 2.2-SNAPSHOT

      Reason: Unable to download the artifact from any repository
[7] I see the same PermGen error.

I wonder if we built this using MySQL rather than the system database (as
the Liferay folks intended) we would be in better shape?
After all, that database (the MySQL version at least) is just shy of 60MB,
so it stands to reason that we are taxing resources here.
I would like to explore this. Could you please guide me? I think I have the basics down of what would be needed, but I don't think I
quite have it all down yet, and I would like to know for sure by hearing it
from you.
I would like to see us put this puppy to bed, you folks bless it for the
general public, and move on (Liferay portal is but the first of several apps
I am building on top of Geronimo - details of this project to be shared as
we go).
Thanks!
Jim


Reply via email to