Last updatedDec 18, 2017

IntelliJ IDEA setup guide

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 see answers from the community.

### 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.1.0 or greater is installed.
  7. 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. Copy the <MAVEN_REPOSITORY>/repository/javax/mail/mail/1.4/mail-1.4.jar to the TOMCAT/common/lib/ directory.
  5. 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.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    <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 following Maven command in the root source directory (normally called atlassian-crowd-x.x.x-source) to download the project dependencies (otherwise known as download the Internet):

    1
    mvn clean install -Dmaven.test.skip

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

If this build is successful, run the following Maven command:

1
mvn 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/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.
  3. Configure IntelliJ IDEA to have a new TOMCAT runtime configuration for the crowd-web-app module.