Skip to end of metadata
Go to start of metadata

Maven Continuum :: FAQ

Question Index

#How do I configure Continuum to use GMail as the SMTP server?
#What are some alternatives to Continuum?
#Can I run multiple Continuum instances on one server?
#How do I set up multiple Continuum instances as separate Windows services?
#Can I change the location of the log files for the Plexus runtime?
#Can I change the location of the log files in Tomcat?
#Why was my build cancelled?
#How do I fix out of memory errors?
#How do I unlock the admin account?
#How do I change the location of derby.log and the databases?
#Are passwords required?
#What is a 'Quiet Period' in a build schedule?
#How can I fix a corrupted system configuration?
#How can I modify the email templates?
#How can I specify the workspace in which builds are (checked-out and) built?
#How do I set up a weekly build schedule?

Answers

How do I configure Continuum to use GMail as the SMTP server?

In /path/to/continuum/conf/plexus.xml, use this:

What are some alternatives to Continuum?

Can I run multiple Continuum instances on one server?

Yes, just change the port in apps/continuum/conf/application.xml and the paths in the configuration. (Requires a restart).

IIRC, Continuum won't respect a change to the working directory for existing projects, it will still check them out in the old location. Until/unless this is fixed, be sure to make configuration changes before adding any projects, or delete them and re-add.

How do I set up multiple Continuum instances as separate Windows services?

TODO

Can I change the location of the log files for the Plexus runtime?

TODO

Can I change the location of the log files in Tomcat?

create a plexus.properties file in WEB-INF with the following content:

appserver.base=[full path to your tomcat installation dir]

this will stop continuum from creating an appserver.base dir and will force it to write the continuum.log into tomcat/logs

Why was my build cancelled?

org.apache.maven.continuum.execution.ContinuumBuildCancelledException:
The build was cancelled

By default, builds are allowed to run for XX seconds. If your builds take longer, increase the value in the build definition.

How do I fix out of memory errors?

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Java heap space
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.OutOfMemoryError: Java heap space
[INFO] ------------------------------------------------------------------------

Continuum uses Maven behind the scenes, so set MAVEN_OPTS=-Xmx512m (adjust as necessary) for the user under which Continuum is running.

By default, JDK 1.5 uses 1/4 of the physical memory on the box. (Actually it's the lesser of 1/4 physical memory or 1GB, but few of us have a 4GB box. See: gc-ergonomics)

How do I unlock the admin account?

1. Restarting the application will unlock the admin account.

2. Log in with another account that has the "User Administrator" role, and unlock it. You do have another admin account, right?

3. Try editing the database directly.

4. If you don't mind losing all of your user accounts, stop Continuum and delete the continuum-1.1/data/users/database directory. You will be prompted to create the admin account again, and from there you can set up your users and permissions. Be sure to make at least one other account a user administrator this time. (smile)

How do I change the location of derby.log and the databases?

Set the derby.system.home System property, as described here

For Tomcat, this can be done by adding a setenv.sh script in $TOMCAT_HOME/bin with the contents:
export JAVA_OPTS=-Dderby.system.home=/path/to/derby-files

On Windows: a $TOMCAT_HOME/bin/setenv.bat file containing
set JAVA_OPTS=-Dderby.system.home=c:\path\to\derby-files

Are passwords required?

No, but only an administrator can create an account with no password.

Why won't Continuum send any email when running on Tomcat 5.5.20?

Tomcat 5.5.20 is missing the MailSessionFactory class (and a few others.) Until Tomcat 5.5.21 is released, either use Tomcat 5.5.17, or use the workaround explained in Bug 40668.

You may see entries similar to the following in Continuum's log files:

2006-12-23 15:09:23,281 http-8080-Processor25 ERROR Mailer - Unable to send message, subject Welcome to Maven Continuum org.codehaus.plexus.mailsender.MailSenderException: Can't get mail session for component 'java:comp/env/mail/Session'.

Caused by: javax.naming.NamingException: Could not create resource factory instance org.apache.naming.factory.MailSessionFactory

What is a 'Quiet Period' in a build schedule?

A length of time (in seconds) after a scm update, during which a scheduled build will not be started.
It is intended to prevent starting a build in mid-commit. (This is not relevant for Subversion.)

How can I fix a corrupted system configuration?

If Continuum fails to start up completely (e.g. no page found at localhost:8080/continuum), this might be due to a corrupt database. One possibility here is that the system configuration database table became corrupted through the insertion of more than one configuration. checking conf/wrapper.log should confirm this, with an error message like:

org.apache.maven.continuum.store.ContinuumStoreException: Database is corrupted. There are more than one systemConfiguration object.

Before reinstalling continumm and manually adding back all the users, builds, etc, try this:
1) shut down Continuum
2) use derby's "ij" program to attach to the database
3) delete the offending row(s) with an SQL command

Derby can be downloaded from http://db.apache.org/derby. An example of connecting to the database and removing a record is as follows:
> db-derby-10.2.2.0-bin/bin/ij
ij> connect 'jdbc:derby:/home/3rdptysw/default/continuum-1.0.3/apps/continuum/database';
ij> delete from sa.systemconfiguration where systemconfiguration_id=6;
ij> exit;

If you're lucky, this will do the trick.

How can I modify the email templates?

The email templates are in WEB-INF/lib/continuum-core-x.x.jar under the package org/apache/maven/continuum/notification/mail/templates. You must modify them directly in that jar (or extract them, change them and replace them in the same directory within the jar).

How can I specify the workspace in which builds are (checked-out and) built?

TODO

How do I set up a weekly build schedule?

To set up a weekly schedule, you must use ? in the day of the month field in addition to filling in the day of week field.

How do modify the database to unlock the admin account?

(contributed by Anoop Kumar)

Here are the steps to follow if you have forgotten the password of the only 'Continuum Admin' on your system. It assumes you have at least one other user whose password is known. This user will be promoted to the role of Continuum Admin. And then log in as this user and reset the actual Continuum Admin's password. This method does not require you to go through the error prone process of sha1 hashing of the password etc..

   1. Install Derby db from http://db.apache.org/derby/derby_downloads.html
   2. Set DERBY_HOME like: export DERBY_HOME=~/derby/db-derby-10.2.2.0-bin/
   3. set classpath like this: export CLASSPATH=$DERBY_HOME/lib/derby.jar:$DERBY_HOME/lib/derbytools.jar
   4. Ensure that continuum is shut down. I use kill <pid of continuum.>  
   5. Then run ij to start the derby database, like this: ~/derby/db- derby-10.2.2.0-bin/bin/ij
   6. I got the ij> prompt.
   7. At the ij> prompt, start the db, like this: connect 'jdbc:derby:/usr/local/continuum- 1.0.3/apps/continuum/database';
   8. ij> connect 'jdbc:derby:/usr/local/continuum-1.0.3/apps/continuum/database';
      ij> select * from sa.continuumuser;
   9. Next modify the data using a simple sql, like this:
   (Basically I am setting GROUP_ID_OID to 1 for a normal user using the account_id to identify the user. If the  GROUP_ID_OID is set to 1 for a user, then that user becomes the Continuum Admin)

      ij> describe sa.continuumuser;
      COLUMN_NAME         |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
      ------------------------------------------------------------------------------
      ACCOUNT_ID           |INTEGER  |0   |10  |10    |NULL      |NULL      |NO    
      EMAIL                      |VARCHAR  |NULL|NULL|255   |NULL      |510       |YES   
      FULL_NAME               |VARCHAR  |NULL|NULL|255   |NULL      |510       |YES   
      GROUP_ID_OID        |INTEGER  |0   |10  |10    |NULL      |NULL      |YES   
      GUEST                     |CHAR     |NULL|NULL|1     |NULL      |2         |NO    
      HASHED_PASSWORD|VARCHAR  |NULL|NULL|255   |NULL      |510       |YES   
      MODEL_ENCODING   |VARCHAR  |NULL|NULL|255   |NULL      |510       |YES   
      USERNAME               |VARCHAR  |NULL|NULL|255   |NULL      |510       |YES   

      8 rows selected
     
      ij> UPDATE SA.CONTINUUMUSER set GROUP_ID_OID=1 where ACCOUNT_ID = 6;
      1 row inserted/updated/deleted
      ij> commit;
      ij> exit;
   10. Now start continuum and log in as the user (whose account_id = 6). This user is now a Continuum admin and has the capability to change the password for any Continuum user.
   (You may want to repeat the above process to revert back the user's role to a normal role)
 

  • No labels