Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add more info on the mail/Session config required

...

  • Deploy the war file on your Glassfish server from the admin page (http://localhost:4848).
  • Go to Ressources -> JavaMail Sessions and create a new ressource, otherwise you will get "Error creating bean with name 'mailSession'" on startup.

MySQL console

  • Create the two needed databases:
    CREATE DATABASE users;
    CREATE DATABASE archiva;
  • Create account to access them:
    GRANT ALL PRIVILEGES ON users.* TO 'users'@'*' IDENTIFIED BY 'users' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON archiva.* TO 'archiva'@'*' IDENTIFIED BY 'archiva' WITH GRANT OPTION;

...

Edit the file <GLASSFISH_FOLDER>/domains/domain1/config/domain.xml to add the following tags:

  • Go to Ressources -> JavaMail Sessions and create a new ressource with jndi-name='mail/Session', otherwise you will get "Error creating bean with name 'mailSession'" on startup. Or add it to the config file:
    Code Block
    
    ...
    <resources>
        <mail-resource debug="false" enabled="true" from="me@email.example.com" 
    host="email.example.com" jndi-name="mail/Session" object-type="user" 
    store-protocol="imap" store-protocol-class="com.sun.mail.imap.IMAPStore" 
    transport-protocol="smtp" transport-protocol-class="com.sun.mail.smtp.SMTPTransport" 
    user="me"/>
    ...
    
  • Set appserver.base and appserver.home properties

    Code Block
    ...
    <java-config ...
        <jvm-options>-Dappserver.base=${com.sun.aas.installRoot}/domains/domain1</jvm-options>
        <jvm-options>-Dappserver.home=${com.sun.aas.installRoot}/domains/domain1</jvm-options>
    ...
    

...