Configuring IntelliJ IDEA
IntelliJ IDEA ships with built-in Groovy and Ant so you don't need much to prepare your IDE.
caution
IntelliJ refers to its Java JDK as an 'SDK', so take care not to confuse the Transact SDK with IntelliJ's 'SDK'.
The following steps outline how to prepare IntelliJ IDEA for Transact Application development.
- Open the Transact SDK project – the SDK includes libraries and a scaffold task to create your own projects.
- Configure a JDK (if necessary) – you can skip this step if you already have a JDK configured.
- Scaffold a new project – this new project is where you will build your Transact Application.
- Add the Transact SDK libraries to the scaffolded project – this enables the Ant tasks to resolve required classes.
Open the Transact SDK project
Open IntelliJ IDEA and select File > Open. Alternatively, from the Welcome page you can click the Open item.
The Open File or Project dialog is displayed.
Browse to the Transact SDK top-level folder and select it, then click OK to open the Transact SDK project.
The Transact SDK project appears in the Project panel.
(Optional) Configure a JDK
Select File > Other Settings > Default Project Structure....
The Default Project Structure dialog is displayed.
In the left pane, select Project Settings > Project to display the Project page in the main panel.
Select an SDK (i.e. Java JDK) from the Project SDK dropdown list and click OK.
tip
If your Java JDK is not displayed in the dropdown list or the only option is <No SDK>, you can add a new JDK (see below) and then select it from the dropdown list.
(Optional) Add a new Java JDK
If your Java JDK is not available for selection in the Project SDK dropdown list, you can add it as follows.
Click New... and select JDK.
The Select Home Directory for JDK dialog is displayed.
Browse to and select the Java JDK's top-level directory, then click OK.
The selected JDK will be shown as the Project SDK.
Create a global library containing the Transact SDK JAR files
Select File > Other Settings > Default Project Structure....
The Default Project Structure dialog is displayed.
In the left pane select Platform Settings > Global Libraries then click the New Global Library icon.
The Select Library Files dialog is displayed.
Select the
lib
folder under the Transact SDK top-level folder, then click OK.Enter "Transact SDK" in the Name field then click OK to save your changes and close the dialog.
Scaffold a new IntelliJ project
Select View > Tool Windows > Ant Build to display the Ant Build pane to the right of the editor pane.
Click the Add icon in the Ant Build panel.
The Select Ant Build File dialog is displayed.
Browse to and select the
build.xml
file under the Transact SDK top-level folder, then click OK.The Avoka Transact SDK tasks appear in the Ant Build pane.
In the Ant Build pane under the Avoka Transact SDK item, select the
project-scaffold
task and click the Run icon. Alternatively, you can double-click theproject-scaffold
task to run it.Enter appropriate values for Project Name, Project Folder and Project Layout when prompted and click OK.
A new project is created in a folder with the name you just entered at the same level as the Transact SDK root folder but it does not appear in the Project panel immediately. You need to open the new project.
Select File > Open to open the new Transact SDK project.
The Open File or Project dialog is displayed.
Browse to the new project folder - it will be at the same folder level as the Transact SDK root folder - and select it, then click OK.
Click New Window to open the new project in a new window.
Update the
transact-auth.properties
file with your Transact Manager credentials.In the Project pane, expand the Home Loan project item then locate and open the
transact-auth.properties
file.Update the file contents with your Transact Manager credentials and server details, then save the file.
Configure new project with Ant dependency libraries
Select View > Tool Windows > Ant Build to display the Ant Build pane.
The Ant Build pane is displayed to the right of the editor pane.
Click the Add icon in the Ant Build pane.
The Select Ant Build File dialog is displayed.
Browse to and select the
build.xml
file under the new project folder, then click OK.caution
Take care to add the new project's
build.xml
file, not the main Transact SDKbuild.xml
file.The new project's Ant tasks appear in the Ant Build pane.
Edit the Ant Build properties.
Right-click the project in the Ant Build pane and select Properties.
The Build File Properties dialog is displayed.
Select the Additional Classpath tab then click Add All in Directory.
The Select Path dialog is displayed.
Browse to and select the
lib
folder under the Transact SDK top-level folder, then click OK.The selected
lib
folder appears in the Additional Classpath list.Click OK to close the Build File Properties dialog.
You are now ready to scaffold content into your new project.