portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ate Douma <...@douma.nu>
Subject Re: Building Jetspeed2 Trunk
Date Mon, 16 Jun 2008 08:03:06 GMT
Hi Jeroen,

Jeroen van der Meer wrote:
> L.S.
> 
> I am testing the buildprocess of the Jetspeed2-trunk. 
> There is a mail from Ate Douma ( 1 april 2008
> http://mail-archives.apache.org/mod_mbox/portals-jetspeed-dev/200804.mbox/%3c47F18024.4060405@douma.nu%3e
> )
> The instructions are clear and the trunk is compiling.
> When I wanted to initialize and seed the database there was a problem
> with the maven plugin.
> 
> Has anyone a solution.
Yes, there is a solution :)

I forgot to mention to the list that the jetspeed-db:load plugin has been renamed to jetspeed-db:init
quite some time 
ago already.
I'm sorry I haven't put up a documentation page yet for the new Jetspeed-2.2 build, but we'll
be working on that shortly 
too.

For the time being here are the main instructions to build the trunk *and* the demo portal
(copy/pasting part of the 
previous instructions from April 1 as well):
-------------------------------------------------------------------------------------------------------------------------
Here are instructions how build/test the current trunk.
All the following instructions should to be run in the root project folder.

After a first clean checkout, first the plugins and jetspeed-portal-resources artifact need
to be build separately *if* 
you want/need to start out by running the tests right away.
(Note: for plain building without running the tests, just run: mvn install, and thereafter
the following won't be needed 
anymore either).

   mvn install -P init

Again: this only needs to be done once, is only needed for running the tests (initially) and
only as long as these 
artifacts are not yet available remote.

If you want to run the tests, first a test database needs to be (re)created:

   mvn jetspeed-db:init -P test-db

If you want to initialize the production database, use profile: -P prod-db

Note: the jetspeed-db:init plugin requires you to setup several specific properties in your
~/.m2/settings.xml, see the 
settings.xml.derby.minimal or the settings.xml.sample in the root folder.

BTW: you can run the jetspeed-db:init goal from within other sub modules too (as for example
used with the jetspeed-demo 
portal, see further below).

Building jetspeed without running tests is plain standard:

   mvn install

And for building/running the tests provide profile -P test:

   mvn install -P test

WARNING WARNING WARNING
For Jetspeed committers and other developers/testers who are required to do a full test build,
make sure to set the 
following evironment variable first to prevent running out of PermGen space:

   export MAVEN_OPTS="-XX:MaxPermSize=256m"


For building and deploying the demo jetspeed portal you will have to checkout and mvn install
the j2-admin portlet 
application first.
As the j2-admin portlet application has been moved out of the main portal svn tree, check
it out from here (as separate 
project):

   http://svn.apache.org/repos/asf/portals/jetspeed-2/applications/j2-admin/trunk

And just run

   mvn install

Then for building and deploying the demo jetspeed portal first cd to its project directory
(note, make sure to have done 
a full jetspeed-2.2 trunk install as described above):

   cd applications/jetspeed-demo

The demo portal pom.xml contains a few properties which you'll need to adjust/override in
our own ~/.m2/settings.xml, 
most notably "org.apache.jetspeed.server.home", which defaults to ${project.build.directory}/demo-deploy.
This property should be targeted at the root folder of a clean Tomcat installation (I still
use 5.5.23, later versions 
are *still* too buggy).

Furthermore, you need to have configured your own "org.apache.jetspeed.production.database.*"
properties, see the
settings.xml.derby.minimal or settings.xml.sample in the Jetspeed-2.2 trunk root folder.

Once you have that all setup, run the following 3 commands:

   mvn install
   mvn jetspeed-db:init -P demo
   mvn jetspeed-deploy:deploy -P demo

Then you can start Tomcat :)

The demo pom.xml also has an example "mixin" profile for setting up the portal to use dbpsml
instead of filesystem psml. 
If you want to try that, run the following 3 commands instead:

   mvn install -P dbpsml
   mvn jetspeed-db:init -P demo,demo-dbpsml
   mvn jetspeed-deploy:deploy -P demo

With the above, the portal will be configured to use database psml at runtime, and during
the deployment the filesystem 
psml will automatically be imported into the database.

If you review this demo pom.xml you'll notice it doesn't have a parent pom!
This means this pom.xml really is a "template" which you can use as basis for any custom jetspeed
portal, simply 
copy/paste it for your own purposes and start developing your own portal project.

That is how we intend custom jetspeed portal developement with maven-2: just a simple war
(overlay) project augmented 
with a few dedicated jetspeed maven plugins for configuration, seeding and deployment.
For this purpose, the applications/jetspeed project delivers a "base" portal war to be used
and augmented in custom 
portal projects.

How to setup the jetspeed maven plugins for different environments (like other webservers
etc.) and different portal 
configurations is something we'll start documenting very soon.

HTH,

Ate

> 
> Jeroen van der Meer
> 
> 
> sh-3.1$ mvn -e jetspeed-db:load -P test-db
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'jetspeed-db'.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Required goal not found: jetspeed-db:load in
> org.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: Required goal not found:
> jetspeed-db:load in
> org.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2-SNAPSHOT
> sh-3.1$ mvn -e jetspeed-db:load -P test-db
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'jetspeed-db'.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Required goal not found: jetspeed-db:load in
> org.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: Required goal not found:
> jetspeed-db:load in
> org.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2-SNAPSHOT
> at
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message