Giter Site home page Giter Site logo

velocity-maven-plugin's People

Watchers

 avatar

velocity-maven-plugin's Issues

UTF-8 characters in templates destroyed

What steps will reproduce the problem?
1. Have template with national, non-ANSI (UTF-8) character
2. Process the template
3. The national character gets scrambled

What is the expected output? What do you see instead?
National characters in UTF-8 should remain untouched.

What version of the product are you using? On what operating system?
1.0.0

Please provide any additional information below.
The plugin uses org.apache.velocity.app.Velocity.getTemplate(String name), 
which reads the template in ISO-8859-1. This destroys any UTF-8 characters in 
the template. Saving the processed result subsequently in UTF-8 is correct but 
not sufficient. The plugin must use the 
org.apache.velocity.app.Velocity.getTemplate(String name, String  encoding) 
method instead.

Original issue reported on code.google.com by [email protected] on 6 Jul 2012 at 8:04

ResourceManager unable to find resource in multi-module project

What steps will reproduce the problem?
1. Create a multi-module project where at least 2 modules use the Velocity 
plugin to process different templates.
2. Build the multi-module project (parent of the 2 modules).

What is the expected output? What do you see instead?
Projects should build correctly.
Instead, the first module succeeds, the second fails with the following error:
[ERROR] ResourceManager : unable to find resource 
'src/main/resources/sample.vm' in any resource loader.

What version of the product are you using? On what operating system?
Version 1.1.0 on Linux and Windows.

Please provide any additional information below.
This is caused by the use of a singleton Velocity engine, which can only be 
initialized once (while building the first module). Separate instances of 
VelocityEngine should be used instead (see 
http://velocity.apache.org/engine/releases/velocity-1.7/developer-guide.html#sep
arate).

The attached patch fixes this issue.

Original issue reported on code.google.com by [email protected] on 4 Jan 2014 at 1:07

Attachments:

Includes don't work in multi module projects when using relative paths

What steps will reproduce the problem?
1. Use an include or parse statement in your processed file. Let file A include 
another file B in the same directory. B is included via a relative path, say 
src/main/vm/...
2. Use the velocity-maven-plugin as part of your build in a Maven project X to 
process file A.
3. Be sure this works when building project X
4. Build the parent project of X, say Y

What is the expected output? What do you see instead?
Expected: it doen't matter if you build X or Y, in both cases the output file 
is the same.
Instead the process fails when building Y.

What version of the product are you using? On what operating system?
1.0.0 or 1.0.1-SNAPSHOT revision 37.

Please provide any additional information below.
The problem is how paths are handled. In step 3 velocity works in the directory 
of X, in step 4. this is the directory of Y. Relative paths in the include 
statements which work in step 3. fail in step 4.

I attached a patch file which may this clearer. The patch sets the velocity 
property Velocity.FILE_RESOURCE_LOADER_PATH to the basedir of the maven 
project. This is always the directory of project X. The method 
getProjectRelativeDirectory() and the variable relPath aren't necessary anymore.

Original issue reported on code.google.com by [email protected] on 21 Mar 2012 at 4:36

Attachments:

Update Velocity to version 1.7

This plugin (currently version 1.1.0) seems to use Velocity 1.5 (released in 
2007) through transitive dependencies.

The latest version is Velocity 1.7 (released in 2010), which brings many 
improvements (see http://velocity.apache.org/engine/devel/changes-report.html).

The attached patch adds Velocity 1.7 as an explicit dependency in the pom.xml, 
so that users may benefit from improvements in this version.

Original issue reported on code.google.com by [email protected] on 4 Jan 2014 at 1:18

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.