Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added xwork fix

...

  1. Download the 1.2.2 war file
  2. Expand it in the JBoss deploy directory. There's no need to rename it
  3. Create a jboss-web.xml file in the WEB-INF directory with the following content:
    No Format
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss-web PUBLIC
        "-//JBoss//DTD Web Application 5.0//EN"
        "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
    <jboss-web>
    
        <class-loading java2ClassLoadingCompliance='false'>
            <loader-repository>
                org.apache.archiva:loader=archiva
                <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
            </loader-repository>
        </class-loading>
    
        <context-root>archiva</context-root>
    
        <resource-ref>
            <res-ref-name>jdbc/users</res-ref-name>
            <jndi-name>java:/users</jndi-name>
        </resource-ref>
        <resource-ref>
            <res-ref-name>jdbc/archiva</res-ref-name>
            <jndi-name>java:/archiva</jndi-name>
        </resource-ref>
        <resource-ref>
            <res-ref-name>mail/Session</res-ref-name>
            <jndi-name>java:/Mail</jndi-name>
        </resource-ref>
    </jboss-web>
    
    Note that we use an external postgres database as described above, hence the resource-refs. Also, the JNDI name of the jdbc/users datasource resource-ref is more generic than the one described for JBoss 4.2 as we share this instance with Continuum.
  4. Remove the following jars from the WEB-INF/lib directory:

    geronimo-spec-jta-1.0.1B-rc2.jar

    provided by all JEE 1.2+ containers

    jsr-250-api-1.0.jar

    provided by all JEE 5+ containers

    jstl-1.1.2.jar

    provided by all JEE 1.4+ containers

    spring-*.jar

    see below

    stax-1.2.0.jar

    provided by all JEE 5+ containers

    stax-api-1.0.1.jar

    provided by all JEE 5+ containers

  5. Download the Spring Framework 3.0 distribution (currently RC1, and not yet available in the central repo). The Spring upgrade is necessary because the annotation scanner used in Spring 2.5.x is broken by JBoss 5.x's new VFS file system. See https://jira.springsource.org/browse/SPR-6146.
  6. Install the following Spring 3.0 jars:
    • org.springframework.asm-3.0.0.RC1.jar
    • org.springframework.beans-3.0.0.RC1.jar
    • org.springframework.context-3.0.0.RC1.jar
    • org.springframework.context.support-3.0.0.RC1.jar
    • org.springframework.core-3.0.0.RC1.jar
    • org.springframework.expression-3.0.0.RC1.jar
    • org.springframework.web-3.0.0.RC1.jar
  7. Replace xwork-2.0.5.jar with xwork-2.0.7.jar to rectify MRM-1206
  8. I also modified the WEB-INF/classes/log4j.xml, changing "${appserver.base}/logs" to "${jboss.server.log.dir}". This puts all the archiva logs in the jboss server logs directory.
    slf4j has a bit of a whinge when starting up, but logging seems to work OK.