[ http://jira.codehaus.org/browse/MOJO-391?page=all ]
     
Jerome Lacoste closed MOJO-391:
-------------------------------

    Resolution: Fixed

I believe this is fixed now. There's a new config parameter to the <jnlp> node 
that allows to override the default .
You need to use both the inputTemplateResourcePath and the inputTemplate 
elements to search for your file.

the inputTemplate is relative to the inputTemplateResourcePath. Please let me 
know if that fix. New snapshot updated soon.

> Resolving Resource - template.vm
> --------------------------------
>
>          Key: MOJO-391
>          URL: http://jira.codehaus.org/browse/MOJO-391
>      Project: Mojo
>         Type: Bug

>   Components: webstart
>  Environment: Windows XP
>     Reporter: Christiaan Veerman
>     Assignee: Jerome Lacoste
>     Priority: Minor

>
>
> When I specify <inputTemplate> with an absolute path to the template.vm eg. 
> ${project.basedir}/src/jnlp/template.vm; I am unable to load Resource.
> However, when I omit the <inputTemplate> tag and place the template in 
> ${project.basedir}/src/jnlp/template.vm it can be loaded sucessfully.
> The exception is:
> Embedded error: Could not load the template file from 
> 'C:\workspace\manager\manager.jnlp/src/jnlp/template.vm'
> Unable to find resource 
> 'C:\workspace\manager\manager.jnlp/src/jnlp/template.vm'
> [INFO] 
> ----------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Failure to run the 
> plugin:
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:556)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at 
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failure to run the 
> plugin:
>         at org.codehaus.mojo.webstart.JnlpMojo.execute(JnlpMojo.java:484)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         ... 16 more
> Caused by: java.lang.IllegalArgumentException: Could not load the template 
> file from 'C:\workspace\manager\manager.jnlp/src/jnlp/template
> .vm'
>         at 
> org.codehaus.mojo.webstart.generator.Generator.<init>(Generator.java:89)
>         at 
> org.codehaus.mojo.webstart.JnlpMojo.generateJnlpFile(JnlpMojo.java:725)
>         at org.codehaus.mojo.webstart.JnlpMojo.execute(JnlpMojo.java:459)
>         ... 18 more
> Caused by: org.apache.velocity.exception.ResourceNotFoundException: Unable to 
> find resource 'C:\workspace\manager\manager.jnlp/src/jnlp/t
> emplate.vm'
>         at 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:458)
>         at 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:341)
>         at 
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:831)
>         at 
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:813)
>         at 
> org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:470)
>         at 
> org.codehaus.mojo.webstart.generator.Generator.<init>(Generator.java:85)
>         ... 20 more
> the log when omitting the inputTemplate:
> [DEBUG] Jnlp template file name not specified. Using default output file 
> name: src/jnlp/template.vm.
> Hope this helps,
> Christiaan

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

Reply via email to