This server will be upgraded to the latest 2.9 milestone around 6am Sydney time Monday the 28th of July and will experience downtime.

IntelliJ IDEA Setup Guide

Crowd 1.2 Documentation

Index

Atlassian does not support customised Crowd source

This document is intended to serve as an IntelliJ IDEA setup guide for those who have a Crowd source license and wish to customise Crowd 1.2.2 or later. For support beyond this document, please refer to our online forum.

Prerequisites

  1. IntelliJ IDEA 6 or greater is installed.
  2. JDK 1.5 or greater is installed.
  3. Tomcat 5 or greater is installed. We will refer to the Tomcat root folder as TOMCAT.
  4. MySQL 5 or greater is installed. Any Crowd-supported database server will work. This guide will assume you are using MySQL.
  5. MySQL Connector/J 5.1 JDBC or greater is downloaded. We will refer to the extracted archive path as JDBC.
  6. Maven 2.0.7 or greater is installed.
  7. Download Sun's JTA Class Files 1.0.1B zip file.
  8. Install the JTA library into your Maven 2.0.7 or greater repository by running the following command:

    mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/jta-1_0_1B-classes.zip


    Replace /path/to/jta-1_0_1B-classes.zip with the actual path to the zip file.

  9. Download Sun's Javamail 1.3.2 library. Unzip the downloaded file.
  10. Install the Javamail library into your Maven 2.0.7 or greater repository by running the following command:

    mvn install:install-file -DgroupId=javax.mail -DartifactId=mail -Dversion=1.3.2 -Dpackaging=jar -Dfile=/path/to/mail.jar


    Replace /path/to/mail.jar with the actual path of mail.jar. This jar is located in the expanded javamail-1_3_2-upd.zip file.
    directory.

  11. Download Sun's Java Activation Framework 1.1
  12. Install the Java Activation Framework library into your Maven 2.0.7 or greater repository by running the following command:

    mvn install:install-file -DgroupId=javax.activation -DartifactId=jaf -Dversion=1.1 -Dpackaging=jar -Dfile= -Dfile=/path/to/activation.jar


    Replace /path/to/activation.jar with the actual path of activation.jar. This jar is located in the expanded jaf-1_1-fr.zip file.
    directory.

  13. The latest Crowd source (version 1.2.2 or greater) is downloaded and extracted. We will refer to this extracted archive path as SOURCE.

Step 1. Configure MySQL

  1. Create a database user which Crowd will connect as (e.g. crowduser).
  2. Create a database for Crowd to store data in (e.g. crowddb).
  3. Ensure that the user has permission to connect to the database, and to create and populate tables.

Step 2. Configure Tomcat

  1. Copy the JDBC/mysql-connector-java-5.x.x-bin.jar to the TOMCAT/common/lib/ directory.
  2. Copy the <MAVEN_REPOSITORY>/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar to the TOMCAT/common/lib/ directory.
  3. Copy the <MAVEN_REPOSITORY>/repository/javax/activation/jaf/1.1/jaf-1.1.jar to the TOMCAT/common/lib/ directory.
  4. Edit the TOMCAT/conf/context.xml configuration file to add a global JNDI JDBC connection. Make sure to customise the username and password for your specific environment.
    <Context>
    <!-- Default set of monitored resources -->
      <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
        <Manager pathname="" />
        -->
      <Resource type="javax.sql.DataSource" name="jdbc/CrowdDS" username="crowduser" password="password" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/crowddb?autoReconnect=true" auth="Container"/>
    </Context>

Step 3. Run the Maven Build Commands

  1. Copy (or merge) the SOURCE/maven/conf/settings.xml to your ~/.m2 directory.
  2. Run the mvn command to download the project dependencies (otherwise known as download the Internet):
    mvn clean install idea:idea -Dmaven.test.skip
    

The download may take a few hours when you do it for the first time.

If you receive an error like the following:

target/crowd-acceptance-test-1.2.2.jar
[INFO] [cargo:start {execution: start-crowd-container}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to get container installation home as the container has not yet been installed. Please call install() first.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.codehaus.cargo.container.ContainerException: Failed to get container installation home as the container has not yet been installed. Please call install() first.
	at org.codehaus.cargo.container.installer.ZipURLInstaller.getHome(ZipURLInstaller.java:195)

Please comment out the crowd-acceptance-test line in the atlassian-crowd-1.2.2-source/atlassian-crowd/pom.xml file:

<modules>
        <module>crowd-core</module>
        <module>crowd-atlassian-user</module>
        <module>crowd-web-app</module>
        <module>crowd-demo-app</module>
        <module>crowd-migration</module>
        <module>crowd-language</module>
        <!--<module>crowd-acceptance-test</module>-->
        <module>crowd-upgrader</module>
        <module>crowd-integration-jive</module>
        <module>crowd-integration-acegi</module>
        <module>crowd-importer</module>
        <module>crowd-openid-client</module>
        <module>crowd-openid-server</module>
        <module>crowd-client-libraries</module>
        <module>crowd-tomcat-libraries</module>
        <module>crowd-javadoc</module>
    </modules>

Re-run this command.

mvn clean install idea:idea -Dmaven.test.skip

Step 4. Configure IntelliJ IDEA

  1. Open the SOURCE/atlassian-crowd.ipr with IntelliJ IDEA.
  2. Edit the SOURCE/atlassian-crowd/crowd-web-app/src/main/resources/jdbc.properties configuration file and change hibernate.dialect to org.hibernate.dialect.MySQLDialect.
  3. Edit the SOURCE/atlassian-crowd/crowd-web-app/src/main/resources/crowd.properties configuration file and change application.login.url to contain the port and IP address you have configured Tomcat to run on. The default is localhost:8080.
  4. Configure IntelliJ IDEA to have a new TOMCAT runtime configuration for the crowd-web-app module.

Labels:

idea idea Delete
crowd crowd Delete
ide ide Delete
intellij intellij Delete
setup setup Delete
maven maven Delete
source source Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.