So I switched to the 1.4M3 WAR and read up a bit more on:

https://cwiki.apache.org/ARCHIVA/archiva-on-geronimo-202-with-mysql-backend.html

The first thing I stumbled across was that there is a deployment plan creator tool in the Geronimo Web Console under Applications / Plan Creator. By feeding it the archiva WAR file, it spit out a geronimo-web.xml that I could then copy and edit for future attempts. So while I don't completely understand what I'm doing, the following should be fairly accurate.

According to the wiki link, commons-collections and commons-lang must be in the Geronimo Repository. I had to add these as dependencies on the deployment file. Geronimo 3.0.0 includes 2.6 of commons-lang and 3.2.1 of commons-collections.

<dep:dependency>
    <dep:groupId>commons-lang</dep:groupId>
    <dep:artifactId>commons-lang</dep:artifactId>
    <dep:version>2.6</dep:version>
    <dep:type>jar</dep:type>
</dep:dependency>
<dep:dependency>
    <dep:groupId>commons-collections</dep:groupId>
    <dep:artifactId>commons-collections</dep:artifactId>
    <dep:version>3.2.1</dep:version>
    <dep:type>jar</dep:type>
</dep:dependency>

You will need to create a database pool using Resources / Datasources / create a new database pool "Using the Geronimo database pool wizard". For my initial testing, I went with "Derby embedded" with the pool named as "archiva".

This requires another dependency to be added (the artifactId should match the name of the database pool that you created).

<dep:dependency>
    <dep:groupId>console.dbpool</dep:groupId>
    <dep:artifactId>archiva</dep:artifactId>
</dep:dependency>

Plus you need to create the actual database inside of Derby / MySQL / PostgreSQL / whatever. For Derby, this is done under the Advanced View, Application Server, Derby Server, Manager.

---------------------------------------------------------------

However, at this point, I'm stuck on deploying with a error that looks like:

ERROR [DeployTool] Error:
org.apache.geronimo.common.DeploymentException: Operation failed: start of org.apache.maven.archiva/apache-archiva-js-1.4-M3/1349657158172/war failed
        Unknown start exception
Configuration org.apache.maven.archiva/apache-archiva-js-1.4-M3/1349657158172/war failed to start due to the following reasons: The service J2EEApplication=null,j2eeType=WebModule,name=org.apache.maven.archiva/apache-archiva-js-1.4-M3/1349657158172/war did not start because ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[0.0.0.0].StandardContext[/archiva]] java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[0.0.0.0].StandardContext[/archiva]] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:898) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:310) at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:567)

---------------------------------------------------------------
Current geronimo-web.xml deployment file looks like:
---------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>

<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
        <dep:moduleId>
            <dep:groupId>org.apache.maven.archiva</dep:groupId>
            <dep:artifactId>apache-archiva-js-1.4-M3</dep:artifactId>
            <dep:type>war</dep:type>
        </dep:moduleId>

        <dep:dependencies>
            <dep:dependency>
                <dep:groupId>org.apache.geronimo.configs</dep:groupId>
                <dep:artifactId>system-database</dep:artifactId>
                <dep:version>3.0.0</dep:version>
                <dep:type>car</dep:type>
            </dep:dependency>
            <dep:dependency>
                <dep:groupId>org.apache.geronimo.configs</dep:groupId>
                <dep:artifactId>javamail</dep:artifactId>
                <dep:version>3.0.0</dep:version>
                <dep:type>car</dep:type>
            </dep:dependency>
            <dep:dependency>
                <dep:groupId>commons-lang</dep:groupId>
                <dep:artifactId>commons-lang</dep:artifactId>
                <dep:version>2.6</dep:version>
                <dep:type>jar</dep:type>
            </dep:dependency>
            <dep:dependency>
                <dep:groupId>commons-collections</dep:groupId>
                <dep:artifactId>commons-collections</dep:artifactId>
                <dep:version>3.2.1</dep:version>
                <dep:type>jar</dep:type>
            </dep:dependency>
            <dep:dependency>
                <dep:groupId>console.dbpool</dep:groupId>
                <dep:artifactId>archiva</dep:artifactId>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>

    <!-- URL -->
    <context-root>/archiva</context-root>

<nam:resource-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2";>
        <nam:ref-name>jdbc/users</nam:ref-name>
        <nam:resource-link>archiva</nam:resource-link>
    </nam:resource-ref>

<nam:resource-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2";>
        <nam:ref-name>mail/Session</nam:ref-name>
        <nam:resource-link>mail/MailSession</nam:resource-link>
    </nam:resource-ref>
</web-app>

Reply via email to