I have written the following ant task (a few paths have been replaced
by ellipses):
<project ...>
...
<taskdef name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
<classpath>
<fileset dir="${lib.dir}">
<include name="velocity-dvsl-*.jar" />
<include name="velocity-dep-*.jar" />
<include name="dom4j-*.jar" />
</fileset>
</classpath>
</taskdef>
<property name="dvsl.toolbox.classpath" location="..." />
<target name="svjp-general.html">
<exec command="pwd"/>
<delete file="${target.dir}/svjp-ui-tabbed.html" quiet="true"
failonerror="false" />
<dvsl basedir="."
in="${target.dir}/svjp-ui-tabbed.xml"
out="${target.dir}/svjp-ui-tabbed.html"
style="${target.dir}/svjp-ui-tabbed.dvsl"
toolboxfile="${target.dir}/toolbox.properties"
classpath="${dvsl.toolbox.classpath}">
<velconfig name="velocimacro.library"
value="${basedir}\veltemplate\VM_global_library.vm"/>
</dvsl>
</target>
...
</project>
Giving this to ant -v ... yields the following log:
pache Ant version 1.6.1 compiled on February 12 2004
Buildfile:
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\SvJP\UI\build.xml
parsing buildfile
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\SvJP\UI\build.xml
with URI =
file:///C:/Views/lsiden_view_2/sdm_svc/SDMservices/GKN/Phase2/DeveloperRepository/SvJP/UI/build.xml
Project base dir set to:
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository
Build sequence for target `svjp-general.html' is [svjp-general.html]
Complete build sequence is [svjp-general.html, ]
svjp-general.html:
[exec] The command attribute is deprecated. Please use the
executable attribute and nested arg elements.
[exec] Current OS is Windows 2000
[exec] Executing 'pwd' with
[exec]
C:/Views/lsiden_view_2/sdm_svc/SDMservices/GKN/Phase2/DeveloperRepository
[delete] Deleting:
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\SvJP\UI\svjp-ui-tabbed.html
[dvsl] Loading stylesheet
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\SvJP\UI\svjp-ui-tabbed.dvsl
[dvsl] [info]
**************************************************************
[dvsl] [info] Starting Jakarta Velocity v1.3.1-rc2
[dvsl] [info] RuntimeInstance initializing.
[dvsl] [info] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties
[dvsl] [info] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[dvsl] [info] Resource Loader Instantiated:
org.apache.velocity.runtime.resource.loader.FileResourceLoader
[dvsl] [info] FileResourceLoader : initialization starting.
[dvsl] [info] FileResourceLoader : adding path '.'
[dvsl] [info] FileResourceLoader : initialization complete.
[dvsl] [info] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[dvsl] [info] Default ResourceManager initialization complete.
[dvsl] [info] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[dvsl] [info] Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
[dvsl] [info] Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
[dvsl] [info] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[dvsl] [info] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[dvsl] [info] Loaded User Directive:
org.apache.tools.dvsl.directive.MatchDirective
[dvsl] [info] Created: 20 parsers.
[dvsl] [info] Velocimacro : initialization starting.
[dvsl] [info] Velocimacro : adding VMs from VM library template :
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\veltemplate\VM_global_library.vm
[dvsl] [error] ResourceManager : unable to find resource
'C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\veltemplate\VM_global_library.vm'
in any resource loader.
[dvsl] [info] Velocimacro : error using VM library template
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\veltemplate\VM_global_library.vm
: org.apache.velocity.exception.ResourceNotFoundException: Unable to
find resource
'C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\veltemplate\VM_global_library.vm'
[dvsl] [info] Velocimacro : VM library template macro
registration complete.
[dvsl] [info] Velocimacro : allowInline = true : VMs can be
defined inline in templates
[dvsl] [info] Velocimacro : allowInlineToOverride = false : VMs
defined inline may NOT replace previous VM definitions
[dvsl] [info] Velocimacro : allowInlineLocal = false : VMs
defined inline will be global in scope if allowed.
[dvsl] [info] Velocimacro : messages on : VM system will output
logging messages
[dvsl] [info] Velocimacro : autoload off : VM system will not
automatically reload global library macros
[dvsl] [info] Velocimacro : initialization complete.
[dvsl] [info] Velocity successfully started.
[dvsl] Processing
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\SvJP\UI\svjp-ui-tabbed.xml
to
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\SvJP\UI\svjp-ui-tabbed.html
[dvsl] Processed
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\SvJP\UI\svjp-ui-tabbed.xml
in 47 ms.
BUILD SUCCESSFUL
Total time: 1 second
In particular:
C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\veltemplate\VM_global_library.vm
: org.apache.velocity.exception.ResourceNotFoundException: Unable to
find resource
However, this is exactly where VM_global_library.vm is found on my
system! What am I missing?
FYI: I am using velocity-dvsl-0.45.jar and velocity-dep-1.3.1-rc2.jar.
I tried upgrading to velocity-dep-1.4.jar but it didn't make any
difference.
I have searched this list for any threads pertaining to this but did
not find any answers specific to my problem. All of the other
complaints seemed to be about the error message alone, because they
weren't making any use of VM_global_library.vm. I did a general
Google search as well but found scant little to add to this.
Any help or insight will be appreciated.
--
Larry Siden
http://umich.edu/~lsiden/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]