Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


 

Prerequisites:

You will need the following items to complete these instructions:

Each of the following should be installed on your local system prior to installation of Eclipse.

You will need to request gateway / tunnel authorization from the server support group (Mitch Saba)

1. Download Eclipse

Expand
 

Download and install the Eclipse IDE for Java EE Developers. Since the KFS software relies heavily on Spring, the recommended IDE is Spring STS (https://spring.io/tools, version 4.2.3)

After installing, start the Eclipse application. 

The Select a Workspace dialog will appear. Enter your location where you want to store your Eclipse projects and click OK.


2. Configure Eclipse

Expand

Disable automatic building.

You may wish to turn off automatic building of the project as it can consume resources when you need them for other things. Select Project->Build Automatically from the Eclipse menu. Ensure that it is unchecked. Once you have the project completely up and running, you should re-enable this feature.

Install the formatting rules into your project.

Download this eclipse format file: eclipse_format.xml and save it to your local disk.

Right-click on your project in the Project Explorer tab and select Properties.

 


Click Java Code Style->Formatter, then click the Import button and choose eclipse_format.xml file at the location where you saved it. Click Open.

Click Apply, then OK.


Select the Java 1.8 JRE within Workspace -> Preferenes -> Java -> Installed JREs

Note: Your JDK installation directory may be different than the screenshot:

Image Added

Also set your compiler JDK compliance to 1.8:

Image Added

Suspend Validation

While setting up the workspace, suspending validation will improve setup time. The Kuali xml and jsp files tend to throw validation errors based on default eclipse settings. Once your workspace is running, you can resume validation if you wish.

Image Added


3. Download KFS and RICE from the GIT repository

Expand

Build GIT repository location

Expand
titleClone GIT Repositories

Create directory in your $$Home directory (like Git_Repo)

Image Modified


Navigate to the directory, using your terminal window.

cd (name of newly created directory, like Git_Repo above)


Execute Git clone commands, one at a time.

git clone https://netid@stash.uconn.edu/scm/kfs/kfs5.git

git clone https://netid@stash.uconn.edu/scm/kfs/rice219embedded.git

git clone https://netid@stash.uconn.edu/scm/kfs/dbscripts-test.git

git clone https://netid@stash.uconn.edu/scm/kfs/dbscripts.git

Image Modified


If you are using KFS with Maven, then you will want to clone the appropriate Kuali KFS repository.

  1. Clone the repository
    git clone https://github.com/KualiCo/financials.git 
  2. Change to the directory with your financials repository.
  3. Switch to the appropriate branch or tag. As of this writing, we will be using the kfs-6.0.0 tag
    git checkout tags/kfs-6.0.0
  4. Your kfs financials repository should now be pointing to the appropriate code-base used with uconn kfs.


Import your projects

Expand
titleImport Maven Projects

Use File-> Import and select Existing Maven Projects.

Image Added


Navigate to the root directory for your repositories. In this example, it will be c:\projects\gitrepos

Import in this order:

  1. /kfs5/pom.xml
    Image Added
    Once the project imports and compiles, disable the maven workspace resolution. This will force the project to use maven artifacts rather than those within the workspace. This will come into play once we import the Kuali Financials projects.
    Right-click on kfs-war -> Maven -> Disable Workspace Resolution

  2. financials/pom.xml and all sub poms - this is the source code from Kuali Kfs.
    Image Added

  3. rice219embedded
    Image Added

After everything has been imported, this is what your Package Explorer would look like in Eclipse:

Image Added

kfs-war is the uconn kfs code.


Expand
titleImport Ant Projects

In Eclipse, click on Window+Perspective+open Perspective+Other

Image Modified

 

 


Choose Git

Image Modified

click OK

This will open a Git Repositories Tab.

Choose the create new local Git icon

Image Modified

Click Browse, to search for your Git directory

Image Modified

Choose your directory and click OK

Image Modified

Click Finish

Image Modified

You will see your project in the Git Repositories Tab.


Highlight your project

Image Modified

Right click on the project and select import projects. 

Image Modified


 click Finish

Image Modified

 

 



Click the Java button to switch to the Java perspective.

You will see the project in the Project Explorer window of the Java perspective.

Image Modified




4. Configure your KFS project

Expand
titleMaven Workspace

TBD Once Property file's are created and structured.


Expand
titleAnt Workspace

Initial build of KFS 5.


KFS 5.x contains the Rice war file. Before the first time you run dist-local (ant target), because you do not have a build/rice-lib directory, the ant script expands the war file and extracts the dependent rice jar files and copies them to build/rice-lib. The ant script also generates the .classpath file that contains the Eclipse build path data. Follow this procedure upon initial creation of the KFS project:

Create your local kfs-build.properties file.

Copy build/external/user/kfs-build.properties from another developer to your $HOME directory.

By default on Windows 7 and higher this is C:/Users/<username> and on Mac OS X it is /Users/<username>

  • Edit your $HOME/kfs-build.properties to customize it to match your local settings.
Note

TODO: Describe necessary changes to kfs-build.properties


  • Create $HOME/Source directory. Obtain a zip file from another developer.
  • Run dist-local (see Step 7: Deploy Code to Server) to extract the rice jar files and create the build path.
  • Right-click on the project and select Build Project.
  • Run dist-local once more.

Create your local log4j.properties file.

Copy build.external/log4j.properties file to your $HOME directory and edit it as necessary.


5. Add Tomcat Server

Expand

The steps are the same for adding a Tomcat 6 or 7 server. The screenshots shown are for Tomcat 7.

Open the Server view by clicking on Window->Show View->Other then select Server from the Show View dialog and click OK.

Image RemovedImage Added

 Image Added

Image Removed

 

The Servers tab will appear in the bottom window of Eclipse. Right-click and select New->Server.

In the New Server dialog, select Tomcat 7 and click Next.

Image Removed

 Image Added

Browse to the location where you have installed your Tomcat 7 server and then click Finish.

Image Removed

 Image Added

In the Servers tab, double click the Tomcat v7.0 server to open the Server information screen.

 


Make the following changes to the Server properties:

Expand
titleTomcat 7

Right-click on the new server and select Properties.

Image Added

We can use the defaults for most of the general configuration except the Timeouts. Sometimes the server can take longer to start so we will enter a large # of seconds:

Image Added

Open the launch configuration so we can adjust the JVM arguments:

Image Added

Click on the Arguments tab and add the following arguments to the end of the VM arguments field:

  • -Xms128m -Xmx1024m
  • -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
  • -Dadditional.kfs.config.locations="/{directory of configuration files}/configuration.properties"

The configuration.properties will be explained in the "Configure your KFS Project " section.

Click Apply and then OK.

Save and close the Tomcat window.


Change your context root

Right-click on your kfs-war project and select Properties. Change the context root to kfs-dev

Image Added


Expand
titleTomcat 6
  • Use Tomcat installation (takes control of Tomcat installation)
  • Serve modules without publishing
  • Never publish automatically
  • Set both timeouts to 300 seconds
 


Image Modified

 


Click open launch configuration to open the Edit launch configuration properties.

Image Modified

Click on the Arguments tab and add the following arguments to the end of the VM arguments field:

  • -Xmx512m -XX:MaxPermSize=256m
  • -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true

Click Apply and then OK.

Save and close the Tomcat window.

 



6. Deploy Code to Server

Expand


Expand
titleMaven Workspace

Right-Click on Server and Pick "Add and Remove"

Image Added

You should see your kfs-war project listed. Click Add to move it to the Configured Column. Click Finish.

Image Added

Now, the server will need publishing, Right-click the server and pick Publish. Since it's the first publish, it may take a while.

Image Added

Once published, make sure that the context root for the kfs project is set as kfs-dev. Open the server properties again and click the Modules tab at the bottom. Click the 'edit' button for our kfs-war project and set the path to /kfs-dev.

Image Added

Click OK and then save the configuration. At this time you will also want to re-publish the server but it should be a lot quicker.


Expand
titleAnt Workspace

Click Window->Show View->Ant to open the Ant view.

Image Modified

 


Right-click in the Ant window and select Add Buildfiles...

Image Modified

 


Expand your KFS project and select the build.xml file.

Image Modified

 


In the Ant view, expand the kfs project and double-click the dist-local target.

Image Modified

This will run the ant dist-local target and deploy your code to the Tomcat server. Output messages from ant will display in your Console window. You should see a message similar to the following in your Console window. Of course the path will be the path where you have installed Tomcat locally.

[copy] Copying 1 file to /kuali/servers/apache-tomcat-6.0.37/conf/Catalina/localhost
 



7. Start the Server

Expand

The KFS application should now be built and deployed to the Tomcat server.  


Note

Before starting the KFS application, you will need to have a tunnel created to the database server.

Refer to this link for instructions on setting up a tunnel to the database:

Database Tunneling 


In the Servers tab, highlight the Tomcat 7 server, and click the Run button (the triangle with a green circle around it). The Console will display messages written during startup of the application. 

Now, open your browser and go to the URL http://localhost:8080/kfs-dev.