Versions Compared

Key

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

Table of Contents

KFS uses Maven for packaging and unit testing.

Anchor
props
props
Propertiesanchor

Configuration properties have defaulted values which are included in the KFS war and may be overridden at runtime. There are skeleton config files located in kfs/src/main/config to aid in overriding the most common properties. To override:

...

For ease of future upgrades, you should avoid modifying any of the delivered files under the kfs directory. 

Anchor
maven
maven
Maven Command Overview

To create a deployable KFS war, you can use the mvn package command. To execute the KFS unit tests, you can use the mvn test command.  See the setup instructions and Maven Introduction to the Build Lifecycle documentation for more information.

...

DescriptionMaven Command
Remove all build outputclean
Run all unit tests and format resultstest
Create artifacts and install them in ~/.m2/repositoryinstall
Builds the KFS war filepackage

Anchor
webpack
webpack
Webpack

Before running Financials, Webpack needs to run to create a file named bundle.js that has all of the React components in it.  When built, this file is located at kfs-web/src/main/webapp/build/bundle.js.  If this isn’t done, the user interface will not render properly.  The maven pom for the kfs-web module of Financials has a step that will download NodeJS, npm and Webpack and build the bundle.js for you.  To do this, run the following maven command:

 

Code Block
mvn frontend:webpack -pl kfs-web 

If you install NodeJS, npm and Webpack outside of Financials, you can run a Webpack in a mode called “watch”.  This will look for changes to the script files and create the bundle if the files change.  This feature is not available when running maven.  You can install node by going to the node web page, https://nodejs.org/, and downloading the appropriate installer for your operating system.  On Mac OS X, you can install the Homebrew package manager and install NodeJS via that.  On Linux, NodeJS is usually available via your operating system package manager.  Once node is installed, you can use the node package manager to install webpack.  To do this, follow these steps:

 

Code Block
cd kfs-web/src/main/webapp
npm install

 

This command reads the package.json file in this directory and installs the modules specified into the node_modules folder. 

After the webpack module is installed, you can run one of the following commands from inside the webapp directory:

 

  • npm run watch - This command will build the bundle.js file then monitor the filesystem for changes to the script files.  It will rebuild the bundle.js file if any scripts change.

  • npm run build - This command will build the bundle.js file then exit.  It performs the same work that the maven command performs.

Include Page
Include Footer
Include Footer