Compile CFML to Java Bytecode plus Fusebox Fix - page 3

Author: Steven Neiland
Published:

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

Hook into cfcompile

As a final improvement you can modify the cfcompile.bat file to do this itself and do away with the seperate batch file altogether. Open the cfcompile.bat for editing and search for the following line of code.

:afterdeploycompdir
%JAVACMD% -cp "%J2EEJAR%;%WEBINF%\lib\cfmx_bootstrap.jar;%WEBINF%\lib\cfx.jar" -Dcoldfusion.classPath=%CFUSION_HOME%/lib/updates,%CFUSION_HOME%/lib -Dcoldfusion.libPath=%CFUSION_HOME%/lib

coldfusion.tools.CommandLineInvoker Compiler -webinf %WEBINF% -webroot %webroot% -cfroot %CFUSION_HOME% -d -srcdir %srcdir% -deploydir %deploydir%

Immediately afterwards append the following lines and save. Now the cfcompile file will recopy our xml.cfm files to deployment in their original form. You can now delete the fuseboxCompileFIx.bat file.

::Added by steven to handle fusebox config xml files
echo Recopying fuseboxconfig.xml.cfm files to deployment directory
xcopy /s /y "%srcdir%\*.appinit.cfm" %deploydir%
xcopy /s /y "%srcdir%\*.init.cfm" %deploydir%
xcopy /s /y "%srcdir%\*.xml.cfm" %deploydir%

And there you have it, precompiled cfml code in the fusebox framework. Enjoy!

1 2 3

Reader Comments

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain advertisments or appear to be created for the purpose of link building, will not be published.

Archives Blog Listing