On 12/15/06, Hilco Wijbenga wrote: > Ok, I got it working. :-) > > I should note that I have an extra requirement: I want to run Archiva > in the same JBoss instance. Both Continuum and Archiva use jdbc/users > so that clashes. I will change this to jdbc/continuum_users and > jdbc/archiva_users for Continuum and Archiva, respectively. > actually, they can use the same users database and just share them, the relevent roles duplicate roles will mesh together for things like System Admin, etc. jesse > I already got Archiva working (still with jdbc/users), see > > http://docs.codehaus.org/display/MAVENUSER/Archiva+on+JBoss > > (thanks Wendy!). > > On 12/15/06, Robert Dale wrote: > > Create a Derby datasource bound to java:comp/env/jdbc/continuum > > or dig through the configuration to change the binding name. > > The instructions below also include the setup of Archiva. Of course, > you can safely ignore those if you don't want to run Archiva. > > (Note that I'm running the 'default' JBoss configuration.) > > 1. copy derby-10.1.3.1.jar into $JBOSS_HOME/server/default/lib (it's > available in both continuum-webapp/src/main/webapp/WEB-INF/lib and > archiva-webapp/src/main/webapp/WEB-INF/lib); > > 2a. create $JBOSS_HOME/server/default/deploy/archiva-derby-ds.xml > (make sure the file name ends in '-ds.xml', the prefix is irrelevant) > > > > archiva_users > jdbc:derby:database/archiva_users;create=true > org.apache.derby.jdbc.EmbeddedDriver > sa > > 5 > 20 > 5 > > > > > 2b. create $JBOSS_HOME/server/default/deploy/continuum-derby-ds.xml > (again, make sure the file name ends in '-ds.xml', the prefix is > irrelevant) > > > > continuum > jdbc:derby:database/continuum;create=true > org.apache.derby.jdbc.EmbeddedDriver > sa > > 5 > 20 > 5 > > > > continuum_users > jdbc:derby:database/continuum_users;create=true > org.apache.derby.jdbc.EmbeddedDriver > sa > > 5 > 20 > 5 > > > > > 3a. cd into the main archiva directory and run from there > mvn clean > for FILE in $(find . -name '.svn' -prune -o -type f | xargs grep -l > 'jdbc/users'); do \ > sed -e 's/jdbc\/users/jdbc\/archiva_users/' $FILE >$FILE.new; \ > mv $FILE.new $FILE; \ > done > > 3b. cd into the main continuum directory and run from there > mvn clean > for FILE in $(find . -name '.svn' -prune -o -type f | xargs grep -l > 'jdbc/users'); do \ > sed -e 's/jdbc\/users/jdbc\/continuum_users/' $FILE >$FILE.new; \ > mv $FILE.new $FILE; \ > done > > 4a. edit archiva-webapp/src/main/webapp/WEB-INF/web.xml and add > > jdbc/archiva_users > javax.sql.DataSource > Container > > > 4b. edit continuum-webapp/src/main/webapp/WEB-INF/web.xml and add > > jdbc/continuum > javax.sql.DataSource > Container > > > jdbc/continuum_users > javax.sql.DataSource > Container > > > 5a. create archiva-webapp/src/main/webapp/WEB-INF/jboss-web.xml > > > > jdbc/archiva_users > java:/archiva_users > > > > 5b. create continuum-webapp/src/main/webapp/WEB-INF/jboss-web.xml > > > > jdbc/continuum > java:/continuum > > > jdbc/continuum_users > java:/continuum_users > > > > 6a. in archiva run 'mvn install' (to update the WAR with all our changes); > > 6b. in continuum run 'mvn install' (to update the WAR with all our changes); > > 7a. deploy the Archiva WAR (archiva-webapp/target); > > 7b. deploy the Continuum WAR (continuum-webapp/target); > > That's it, both Archiva and Continuum should work now. > > DISCLAIMER: I'm not, by any stretch of the word, an expert on JBoss so > this is probably not the *best* way to do it ... but it works. :-) > -- jesse mcconnell jesse.mcconnell@gmail.com