velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jenfi...@Guardian.com
Subject Unable to locate .VM files in Jar (Velocity 1.3.1)
Date Thu, 30 Oct 2003 21:48:42 GMT
I have a project setup in JBuilder With a structure that looks something
like this:

com.company.tool.generator
  -contains class files
com.company.tool.generator.templates
  -contains all the .VM Files
com.company.tool.generator.properties
  -contains properties files

I create a runnable jar by including the above, plus the entire velocity
package (with dependencies).

However,
The program is unable to locate the .VM Files.

I've tried varies setting for the resource loader - including the
following:

resource.loader=classpath, file,jar
classpath.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
file.resource.loader.class=org.apache.velocity.runtime.resource.loader.FileResourceLoader
file.resource.loader.path=./templates, templates, /templates,
/com/company/tool/generator/templates
jar.resource.loader.class=org.apache.velocity.runtime.resource.loader.JarResourceLoader
jar.resource.loader.path=jar:file:templates.jar

templates.jar was another attempt - but the VM files are located in the
com/company/tool/generator/templates path - so Velocity is unable to find
them.

It seems the only way I can get to my Template (VM) files is if I move them
out of the jar where the 'file' resource can see them, or put them in the
root of my jar - which is really messy.

Could the jar resource loader be extended so something like this:
jar.resource.loader.path=jar:file:templates.jar/com/company/tool/generator/templates
could happen?

or is there another way to accomplish what I'm looking for?

Thank you,
JoeE





This communication may contain information that is legally privileged, confidential, or exempt
from disclosure.  If you are not the intended recipient, please note that any dissemination,
distribution, or copying is strictly prohibited.  If you have received this message in error
please notify the sender by telephone, fax, or return email and delete this message from your
computer.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message