You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Colbert Philippe (JIRA)" <ji...@apache.org> on 2006/05/26 14:11:29 UTC

[jira] Created: (VELOCITY-440) Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.

Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.
----------------------------------------------------------------------------------------

         Key: VELOCITY-440
         URL: http://issues.apache.org/jira/browse/VELOCITY-440
     Project: Velocity
        Type: Improvement

  Components: Build  
    Versions: 1.4    
 Environment: WindowsXP
    Reporter: Colbert Philippe
    Priority: Blocker


I want to use Velocity as a standard preprocessor for many programming languages or configuration files.   By using it this way, I can build a library of Velocity macros that I can callup whenever I want.   I want to be able to have macros located in different directories.   So the TEMPLATE_ROOT should be a list of directories that is searched by Velocity to find the first macro file needed.

There also a need to have some macros archived in the Jar.   So a unified solution for having macros dispersed in a list of directories and insided the JAR file (in the real classpath).

This would go a long way to improve Velocity.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (VELOCITY-440) Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.

Posted by "Henning Schmiedehausen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/VELOCITY-440?page=all ]

Henning Schmiedehausen updated VELOCITY-440:
--------------------------------------------

    Priority: Minor  (was: Blocker)

> Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.
> ----------------------------------------------------------------------------------------
>
>          Key: VELOCITY-440
>          URL: http://issues.apache.org/jira/browse/VELOCITY-440
>      Project: Velocity
>         Type: Improvement

>   Components: Build
>     Versions: 1.4
>  Environment: WindowsXP
>     Reporter: Colbert Philippe
>     Priority: Minor

>
> I want to use Velocity as a standard preprocessor for many programming languages or configuration files.   By using it this way, I can build a library of Velocity macros that I can callup whenever I want.   I want to be able to have macros located in different directories.   So the TEMPLATE_ROOT should be a list of directories that is searched by Velocity to find the first macro file needed.
> There also a need to have some macros archived in the Jar.   So a unified solution for having macros dispersed in a list of directories and insided the JAR file (in the real classpath).
> This would go a long way to improve Velocity.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (VELOCITY-440) Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.

Posted by "Henning Schmiedehausen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/VELOCITY-440?page=comments#action_12413461 ] 

Henning Schmiedehausen commented on VELOCITY-440:
-------------------------------------------------

I am not sure that I understand this request.

There is no such thing as a "TEMPLATE_ROOT". Velocity templates are loaded through a set of loaders that you configure in your properties. For each directory that you want to use, you configure a FileResourceLoader. For the Classpath, you configure a ClasspathResourceLoader. 

A template is not necessary the same thing as a file. Most of the times, a template is loaded from a file but that is done in a resource loader.

This BTW is IMHO a question for the dev/users list, not an issue in JIRA. :-) 

> Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.
> ----------------------------------------------------------------------------------------
>
>          Key: VELOCITY-440
>          URL: http://issues.apache.org/jira/browse/VELOCITY-440
>      Project: Velocity
>         Type: Improvement

>   Components: Build
>     Versions: 1.4
>  Environment: WindowsXP
>     Reporter: Colbert Philippe
>     Priority: Blocker

>
> I want to use Velocity as a standard preprocessor for many programming languages or configuration files.   By using it this way, I can build a library of Velocity macros that I can callup whenever I want.   I want to be able to have macros located in different directories.   So the TEMPLATE_ROOT should be a list of directories that is searched by Velocity to find the first macro file needed.
> There also a need to have some macros archived in the Jar.   So a unified solution for having macros dispersed in a list of directories and insided the JAR file (in the real classpath).
> This would go a long way to improve Velocity.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (VELOCITY-440) Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.

Posted by "Nathan Bubna (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/VELOCITY-440?page=all ]
     
Nathan Bubna resolved VELOCITY-440:
-----------------------------------

    Resolution: Invalid

This problem has been solved in Velocity for many years.  You can configure Velocity to search across multiple resource loaders and most resource loader implementations (FileResourceLoader, JarResourceLoader, and VelocityTools' WebappLoader) support multiple paths individually as well.

In your case, i'd recommend configuring the default FileResourceLoader with the multiple paths you want it to search and add a ClasspathResourceLoader to load your macros from the jar.

Please read:
http://jakarta.apache.org/velocity/docs/developer-guide.html#Configuring%20Resource%20Loaders

> Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.
> ----------------------------------------------------------------------------------------
>
>          Key: VELOCITY-440
>          URL: http://issues.apache.org/jira/browse/VELOCITY-440
>      Project: Velocity
>         Type: Improvement

>   Components: Build
>     Versions: 1.4
>  Environment: WindowsXP
>     Reporter: Colbert Philippe
>     Priority: Minor

>
> I want to use Velocity as a standard preprocessor for many programming languages or configuration files.   By using it this way, I can build a library of Velocity macros that I can callup whenever I want.   I want to be able to have macros located in different directories.   So the TEMPLATE_ROOT should be a list of directories that is searched by Velocity to find the first macro file needed.
> There also a need to have some macros archived in the Jar.   So a unified solution for having macros dispersed in a list of directories and insided the JAR file (in the real classpath).
> This would go a long way to improve Velocity.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Closed: (VELOCITY-440) Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.

Posted by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henning Schmiedehausen closed VELOCITY-440.
-------------------------------------------


> Make TEMPLATE_ROOT behave more like classpath...that is a list of directories to search.
> ----------------------------------------------------------------------------------------
>
>                 Key: VELOCITY-440
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-440
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Build
>    Affects Versions: 1.4
>         Environment: WindowsXP
>            Reporter: Colbert Philippe
>            Priority: Minor
>
> I want to use Velocity as a standard preprocessor for many programming languages or configuration files.   By using it this way, I can build a library of Velocity macros that I can callup whenever I want.   I want to be able to have macros located in different directories.   So the TEMPLATE_ROOT should be a list of directories that is searched by Velocity to find the first macro file needed.
> There also a need to have some macros archived in the Jar.   So a unified solution for having macros dispersed in a list of directories and insided the JAR file (in the real classpath).
> This would go a long way to improve Velocity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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