You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Trevor Harmon <tr...@vocaro.com> on 2010/08/15 12:45:18 UTC

Velocity bug fixed in 2007 still affects JXR users

Hi,

There was a bug in Velocity that was causing a spurious error message to be printed:

  [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
  [INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'

This affects many Maven users who include JXR reports with their site generation.  That is because JXR uses Velocity, and thus the innocuous error would be displayed on every "mvn site".

With the release of Velocity 1.5 in 2007, the bug was fixed:

  https://issues.apache.org/jira/browse/VELOCITY-86

But even when using the latest versions of JXR (2.2) and the Site plugin (2.1.1), the error message still appears. This is because somewhere in the dependency tree, the old Velocity 1.4 release is being pulled in, as this snippet of "mvn -X site" reveals:

  [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus:pom:1.0.11 for project: null:plexus-utils:jar:1.5.1 from the repository.
  [DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.5.1:runtime (selected for runtime)
  [DEBUG]     velocity:velocity:jar:1.4:runtime (selected for runtime)
  [DEBUG]       velocity:velocity-dep:jar:1.4:runtime (selected for runtime)

The proper fix is to locate the component that is using Velocity and update it to use Velocity 1.5, but I'm not sure which component that is. I checked JXR and plexus-utils, but neither has a direct dependency on Velocity. I do see that the latest release of plexus-velocity, 1.1.8, was changed to use Velocity 1.5 instead of 1.4, but when I override the JXR plugin to depend on it (instead of the older 1.1.2), the build fails:

  Embedded error: Error rendering Maven report: Error while generating the HTML source code of the projet.
  The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.

At this point I'm stumped. Any suggestions? Thanks,

Trevor


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Velocity bug fixed in 2007 still affects JXR users

Posted by Trevor Harmon <tr...@vocaro.com>.
On Aug 15, 2010, at 11:10 AM, Dennis Lundberg wrote:

> Can you please open an issue in JIRA for this at:
>  http://jira.codehaus.org/browse/JXR

http://jira.codehaus.org/browse/JXR-84

Trevor


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Velocity bug fixed in 2007 still affects JXR users

Posted by Dennis Lundberg <de...@apache.org>.
On 2010-08-15 12:45, Trevor Harmon wrote:
> Hi,
> 
> There was a bug in Velocity that was causing a spurious error message to be printed:
> 
>   [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
>   [INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
> 
> This affects many Maven users who include JXR reports with their site generation.  That is because JXR uses Velocity, and thus the innocuous error would be displayed on every "mvn site".
> 
> With the release of Velocity 1.5 in 2007, the bug was fixed:
> 
>   https://issues.apache.org/jira/browse/VELOCITY-86
> 
> But even when using the latest versions of JXR (2.2) and the Site plugin (2.1.1), the error message still appears. This is because somewhere in the dependency tree, the old Velocity 1.4 release is being pulled in, as this snippet of "mvn -X site" reveals:
> 
>   [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus:pom:1.0.11 for project: null:plexus-utils:jar:1.5.1 from the repository.
>   [DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.5.1:runtime (selected for runtime)
>   [DEBUG]     velocity:velocity:jar:1.4:runtime (selected for runtime)
>   [DEBUG]       velocity:velocity-dep:jar:1.4:runtime (selected for runtime)
> 
> The proper fix is to locate the component that is using Velocity and update it to use Velocity 1.5, but I'm not sure which component that is. I checked JXR and plexus-utils, but neither has a direct dependency on Velocity. I do see that the latest release of plexus-velocity, 1.1.8, was changed to use Velocity 1.5 instead of 1.4, but when I override the JXR plugin to depend on it (instead of the older 1.1.2), the build fails:

The component with a direct dependency on velocity 1.4 is maven-jxr, not
the plugin but the library. I'll see if it's an easy upgrade.

Can you please open an issue in JIRA for this at:
  http://jira.codehaus.org/browse/JXR

> 
>   Embedded error: Error rendering Maven report: Error while generating the HTML source code of the projet.
>   The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
> 
> At this point I'm stumped. Any suggestions? Thanks,
> 
> Trevor
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Velocity bug fixed in 2007 still affects JXR users

Posted by Trevor Harmon <tr...@vocaro.com>.
On Aug 15, 2010, at 10:38 AM, Dennis Lundberg wrote:

> Can you please run this command for your project, and post back the results:
> 
> mvn site -X

Attached. Also attached is the simplest possible test project that reproduces the error.

Trevor


Re: Velocity bug fixed in 2007 still affects JXR users

Posted by Dennis Lundberg <de...@apache.org>.
Hi Trevor

Can you please run this command for your project, and post back the results:

mvn site -X

On 2010-08-15 12:45, Trevor Harmon wrote:
> Hi,
> 
> There was a bug in Velocity that was causing a spurious error message to be printed:
> 
>   [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
>   [INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
> 
> This affects many Maven users who include JXR reports with their site generation.  That is because JXR uses Velocity, and thus the innocuous error would be displayed on every "mvn site".
> 
> With the release of Velocity 1.5 in 2007, the bug was fixed:
> 
>   https://issues.apache.org/jira/browse/VELOCITY-86
> 
> But even when using the latest versions of JXR (2.2) and the Site plugin (2.1.1), the error message still appears. This is because somewhere in the dependency tree, the old Velocity 1.4 release is being pulled in, as this snippet of "mvn -X site" reveals:
> 
>   [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus:pom:1.0.11 for project: null:plexus-utils:jar:1.5.1 from the repository.
>   [DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.5.1:runtime (selected for runtime)
>   [DEBUG]     velocity:velocity:jar:1.4:runtime (selected for runtime)
>   [DEBUG]       velocity:velocity-dep:jar:1.4:runtime (selected for runtime)
> 
> The proper fix is to locate the component that is using Velocity and update it to use Velocity 1.5, but I'm not sure which component that is. I checked JXR and plexus-utils, but neither has a direct dependency on Velocity. I do see that the latest release of plexus-velocity, 1.1.8, was changed to use Velocity 1.5 instead of 1.4, but when I override the JXR plugin to depend on it (instead of the older 1.1.2), the build fails:
> 
>   Embedded error: Error rendering Maven report: Error while generating the HTML source code of the projet.
>   The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
> 
> At this point I'm stumped. Any suggestions? Thanks,
> 
> Trevor
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org