You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by nsgood <Na...@chase.com> on 2008/10/08 16:34:29 UTC
Re: Issue with jspc-maven-plugin - specifying uriroot
I had the same problem, here is the solution.
This is the snippet from CompilationMojoSupport.groovy (jspc-2.0-alpha-3)
// Setup defaults (complex, can't init from expression)
if (!sources) {
sources = new FileSet()
sources.directory = "${project.basedir}/src/main/webapp"
sources.includes = null
}
So, in order to overrride the default path you must specify:
org.codehaus.mojo.jspc
jspc-maven-plugin
...
${webapp.dir}
S.Murali wrote:
>
> I have now bit more detail as what the exact problem is :
> when I run a mvn -X , the jscp args is printing wrong directory for
> -uriroot.
>
> [DEBUG] Jscp args: ["-uriroot",
> "/home/myuser1/codebase/sandbox/teams/team1/dev3/mymodule/src/main/webapp",
> "-d",
>
> This is due the fact that I am having a non-mavenised directory structure,
> . The uriroot need to be pointing to mymodule/vfe. I have configured
> warSourceDirectory and webXml to point to right place. But I am not sure,
> how to make uriroot point to correct location. Seems I am missing some
> configuration. Pl. let know, if you have idea on this.
>
> Thanks, Murali
>
>
> S.Murali wrote:
>>
>> Hi,
>> I using jspc-maven-plugin pre-compile my JSP in a war packaged module. I
>> am using following plugin configuration
>>
>>
>> org.codehaus.mojo.jspc
>> jspc-maven-plugin
>>
>>
>> check-jsp-source
>> process-sources
>>
>> compile
>>
>>
>>
>>
>> ../mymodule/vfe/WEB-INF/web.xml
>> ../mymodule/vfe
>>
>>
>>
>>
>>
>> org.codehaus.mojo.jspc
>> jspc-compiler-tomcat6
>> 2.0-SNAPSHOT
>>
>>
>>
>>
>>
>> org.apache.maven.plugins
>> maven-war-plugin
>>
>> ../ventweb/target/jspweb.xml
>>
>>
>>
>> On building module, I am getting following exception.
>>
>> [INFO] Compiling JSP source files to
>> /home/dev1/codebase/sandbox/teams/work/dev3/mymodule/target/jsp-source
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] FATAL ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] The -uriroot option must specify a pre-existing directory
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> org.apache.jasper.JasperException: The -uriroot option must specify a
>> pre-existing directory
>> at org.apache.jasper.JspC.execute(JspC.java:1128)
>> at
>> org.codehaus.mojo.jspc.compiler.tomcat6.JspCompilerImpl.compile(JspCompilerImpl.java:109)
>> 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.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:52)
>> at
>> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:714)
>> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:583)
>> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:476)
>> at
>> org.codehaus.groovy.runtime.Invoker.invokePojoMethod(Invoker.java:104)
>> at
>> org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:77)
>> at
>> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:85)
>> at
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
>> at
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:182)
>> at
>> org.codehaus.mojo.jspc.CompilationMojoSupport.execute(CompilationMojoSupport.groovy:333)
>> at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>> 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:256)
>> 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)
>>
>> I have no clue how to set the -uriroot to have these JSPs pre-compiled.
>> Pl. let know if you any idea on this.
>>
>> Thanks, Murali
>>
>
>
--
View this message in context: http://www.nabble.com/Issue-with-jspc-maven-plugin---specifying-uriroot-tp14338706p19880045.html
Sent from the Maven - Users mailing list archive at Nabble.com.