Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Canvas enables you to optimize the SASS compilation process for your web application before you proceed to build and deploy your web application. For detailed information on building a web application, refer Building Your First Web Application. To optimize SASS compilation for reducing the server startup time, perform the following steps:

  1. It is mandatory for you to uncomment the antcall target function in the build xml (e.g. buildModelHouse.xml) file present in your project source folder, e.g. D:\SVN_REPO\19.1.7.3\Sources\CTModelHouse\Sources\CTModelHouseServerBuilder\src\main\ant\buildModelHouse.xml. The following code snippet serves as a sample reference:

    <!-- Css compresion is done here -->
    		 <antcall target="-build.modelhouse.compresscss" /> 
    		<antcall target="package_compile_sass" /> <!-- Uncomment the antcall target function -->
    		<jar destfile="${MODEL_WAR_FILE_NAME}">
    			<fileset dir="${WAR_ROOT}">
    				<include name="**/*.*" />
    			</fileset>
    			<manifest>
    				<attribute name="Created-By" value="${unit.name}" />
    				<attribute name="Build-Jdk" value="${java.version}" />
    				<attribute name="Bundle-Name" value="modelhouse war" />
    				<attribute name="Bundle-Version" value="${product.version}" />
    				<attribute name="Bundle-Description" value="Web application archive for the modelhouse" />
    				<attribute name="Implementation-Vendor" value="${company.name}" />
    				<attribute name="Implementation-Title" value="${product.name}" />
    				<attribute name="Implementation-Version" value="${product.version}" />
    				<attribute name="Build-Id" value="${buildVersion}" />
    				<attribute name="Build-Date" value="${DATE}"/>
    			</manifest>
    		</jar>
  2. Once you execute and generate the database scripts for your web application, you must specify the database or schema name in the same build xml file (e.g. buildModelHouse.xml), present in your project source folder, e.g. D:\SVN_REPO\19.1.7.3\Sources\CTModelHouse\Sources\CTModelHouseServerBuilder\src\main\ant\buildModelHouse.xml. The following code snippet serves as a sample reference:

    For setting up a development environment and to execute and generate DB scripts for your web application, refer Setup Development Environment for Canvas Technology.

    <!-- Prepare the CSS Files (compile sass, merge and minify)-->
    	<target name="package_compile_sass">
    		<echo>Compiling SASS and CSS File merge / minify</echo>
    		<java classname="com.intellectdesign.canvas.utils.BuidSassCompilationUtil" fork="yes" failonerror="yes">
    			<arg value="com.mysql.cj.jdbc.Driver" />
    			<arg value="jdbc:mysql://localhost:3306/multi_16745" /> <!-- The database or schema name is multi_16745 -->
    			<arg value="ctuser" />
    			<arg value="canvas" />
    			<arg value="/ctmodelhouse" />
    			<arg value="MODELHOUSE" />
    			<arg value="${WAR_ROOT}/CTRIAFramework/UIArena/theme/system/cssconfig.xml" />
    			<arg value="${WAR_ROOT}" />
    			<classpath refid="sasscompilecompressjars" />
    		</java>
    	</target>

After you perform the aforementioned steps, you can proceed with the build and deployment of your application.

  • No labels