Menu

Customizing ART

manual (35)
Timothy Anyona Timothy Anyona

Customizing ART

You can customize ART to fit your needs.

Using live files

You can customize or update ART files directly on the application server where ART is deployed. This may be especially useful for minor changes.

Setting up Apache Ant

If you are going to customize the application source code, you may want to setup Apache Ant to make compiling your changes easier. To do this, take the following steps

  • Download the Apache Ant zip package from http://ant.apache.org/
  • Extract the zip file to C:\, or other directory of your choice. A new directory will be created e.g. C:\apache-ant-1.8.1
  • Add the Ant bin directory to the PATH environment variable e.g. C:\apache-ant-1.8.1\bin

Customizing java files

Java source files are contained in sub directories under the ART_HOME\WEB-INF\classes\art directory. To make customizations to these files, take the following steps.

  • Configure Ant as described above
  • Make changes to the desired .java files
  • Open a command prompt window and navigate to the TOMCAT_HOME\webapps\art directory
  • Type the command ant compile
  • The modified .java files will be recompiled
  • Reload the ART application using the Tomcat Application Manager, or restart tomcat
  • The application will now use the modified source code

Customizing jsp files

JSP files can be modified and results immediately viewable when the relevant page is refreshed. If you don't see the expected changes when you refresh the page, the page displayed may be a cached copy. You may need to clear the application server cache and the browser cache to ensure the page is refreshed. If using Tomcat, you can clear the tomcat cache by deleting the TOMCAT_HOME\work\Catalina\localhost\art directory. If using Firefox, you can clear the browser cache from the History | Clear Recent History menu.

Customizing other files

Other files that affect how ART works can also be modified. Examples include

  • ART_HOME\WEB-INF\classes\quartz.properties - Change quartz configuration items e.g. number of threads
  • ART_HOME\WEB-INF\classes\logback.xml - Change logging level for quartz or ART classes

Using Maven

You can take the following steps to modify ART source code, using Apache Maven as the build tool. ART source files with a maven structure will be found in the PACKAGE_PATH\src directory.

  • Install Maven

Using Maven without an IDE

  • Using a text editor, make modifications to the required files
  • Open a command prompt window and navigate to the PACKAGE_PATH\src\art-parent directory
  • Type the command mvn clean package
  • A new file named art.war will be created in the PACKAGE_PATH\src\art-parent\art\target directory. Deploy this file to your desired application server.

Using Maven with NetBeans

The following are sample steps using NetBeans 7.2.1.

  • Open NetBeans
  • Select the File | Open Project menu
  • Select the PACKAGE_PATH\src\art-parent directory in the left hand panel, and click on the Open Required Projects box on the right hand panel. Click on the Open Project button.
  • Make changes to the files as appropriate
  • To test the changes, right click on the art project in the Projects explorer and select Run. Select the server on which to deploy the application and click on OK.
  • To generate a war file to deploy, right click on the Parent project and select Clean and Build. The generated art.war file will be located in the PACKAGE_PATH\src\art-parent\art\target directory. Deploy this file to your desired application server

Related

Discussion: JasperReports with sub reports problem
Discussion: Maven build
Discussion: Support for clustered app server environment

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.