You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Venkatagopalaraju <ve...@realsoftinc.com> on 2006/04/04 17:07:32 UTC

jspc:compile

Dear Maven Users,
          I am using jspc-maven-plugin for jsp precompilation. When I try to compile jsp's, I am getting BUILD ERROR(Embedded error: The -uriroot option must specify a pre-existing directory).My pom.xml is 


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
  <modelVersion>4.0.0</modelVersion>
  <groupId>citistreet.id.util</groupId>
  <artifactId>cs-util</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>Maven Quick Start Archetype</name>
  <url>http://maven.apache.org</url>    
   
  <build>  
      <directory>classes</directory>
      <outputDirectory>classes</outputDirectory>
      <finalName>${artifactId}-${version}</finalName>      
      <sourceDirectory>src</sourceDirectory>
   <testSourceDirectory>test</testSourceDirectory>
      <plugins>
        <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
       <source>1.5</source>
    <target>1.5</target>                    
        </configuration>
        </plugin>
    <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jspc-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jspc</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webXml>${basedir}/WEB-INF/web.xml</webXml>
                </configuration>
            </plugin>
      </plugins>
   </build>   
   <dependencies>   
       <dependency>
         <groupId>commons-logging</groupId>
         <artifactId>commons-logging</artifactId>
         <version>1.0</version>
       </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.0</version>
      <scope>test</scope>
    </dependency>
<dependency> 
        <groupId>tomcat</groupId> 
        <artifactId>jasper-runtime</artifactId> 
        <version>5.5.15</version> 
    </dependency> 
 <dependency> 
        <groupId>javax.servlet</groupId> 
        <artifactId>servlet-api</artifactId> 
        <version>2.4</version> 
            </dependency> 
   </dependencies>      
   <reporting>
   <outputDirectory>target/site</outputDirectory>
       <plugins>
           <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
       </plugins>    
     </reporting>
</project>

And I am getting error is as shown below.




[INFO] ----------------------------------------------------------------------------
[INFO] Preparing jspc:compile
[WARNING] Removing: compile from forked lifecycle, to prevent recursive invocation.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [jspc:compile {execution: jspc}]
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Error

Embedded error: The -uriroot option must specify a pre-existing directory
[INFO] ----------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error
        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: Error
        at org.codehaus.mojo.jspc.AbstractJspcMojo.execute(AbstractJspcMojo.java:193)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        ... 16 more
Caused by: org.apache.jasper.JasperException: The -uriroot option must specify a pre-existing directory
        at org.apache.jasper.JspC.execute(JspC.java:1107)
        at org.codehaus.mojo.jspc.AbstractJspcMojo.execute(AbstractJspcMojo.java:180)


Could you please let me know, Where I did wrong and what I need to do.


Thanks &  Regards
  Gopal

Re: jspc:compile

Posted by Eric Redmond <er...@gmail.com>.
It looks like the ${basedir}/src/main/webapp directory must exist in your
project path. Since you did not set the warSourceDirectory  configuration,
thats the default. So, you can either create that dir, or change the
warSourceDirectory.

Eric


On 4/4/06, Venkatagopalaraju <ve...@realsoftinc.com>
wrote:
>
> Dear Maven Users,
>           I am using jspc-maven-plugin for jsp precompilation. When I try
> to compile jsp's, I am getting BUILD ERROR(Embedded error: The -uriroot
> option must specify a pre-existing directory).My pom.xml is
>
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>citistreet.id.util</groupId>
>   <artifactId>cs-util</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0</version>
>   <name>Maven Quick Start Archetype</name>
>   <url>http://maven.apache.org</url>
>
>   <build>
>       <directory>classes</directory>
>       <outputDirectory>classes</outputDirectory>
>       <finalName>${artifactId}-${version}</finalName>
>       <sourceDirectory>src</sourceDirectory>
>    <testSourceDirectory>test</testSourceDirectory>
>       <plugins>
>         <plugin>
>          <groupId>org.apache.maven.plugins</groupId>
>          <artifactId>maven-compiler-plugin</artifactId>
>          <configuration>
>        <source>1.5</source>
>     <target>1.5</target>
>         </configuration>
>         </plugin>
>     <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>jspc-maven-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <id>jspc</id>
>                         <goals>
>                             <goal>compile</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-war-plugin</artifactId>
>                 <configuration>
>                     <webXml>${basedir}/WEB-INF/web.xml</webXml>
>                 </configuration>
>             </plugin>
>       </plugins>
>    </build>
>    <dependencies>
>        <dependency>
>          <groupId>commons-logging</groupId>
>          <artifactId>commons-logging</artifactId>
>          <version>1.0</version>
>        </dependency>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>4.0</version>
>       <scope>test</scope>
>     </dependency>
> <dependency>
>         <groupId>tomcat</groupId>
>         <artifactId>jasper-runtime</artifactId>
>         <version>5.5.15</version>
>     </dependency>
> <dependency>
>         <groupId>javax.servlet</groupId>
>         <artifactId>servlet-api</artifactId>
>         <version>2.4</version>
>             </dependency>
>    </dependencies>
>    <reporting>
>    <outputDirectory>target/site</outputDirectory>
>        <plugins>
>            <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-project-info-reports-plugin</artifactId>
>       </plugin>
>        </plugins>
>      </reporting>
> </project>
>
> And I am getting error is as shown below.
>
>
>
>
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Preparing jspc:compile
> [WARNING] Removing: compile from forked lifecycle, to prevent recursive
> invocation.
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [jspc:compile {execution: jspc}]
> [INFO]
> ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Error
>
> Embedded error: The -uriroot option must specify a pre-existing directory
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error
>         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: Error
>         at org.codehaus.mojo.jspc.AbstractJspcMojo.execute(
> AbstractJspcMojo.java:193)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:415)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:531)
>         ... 16 more
> Caused by: org.apache.jasper.JasperException: The -uriroot option must
> specify a pre-existing directory
>         at org.apache.jasper.JspC.execute(JspC.java:1107)
>         at org.codehaus.mojo.jspc.AbstractJspcMojo.execute(
> AbstractJspcMojo.java:180)
>
>
> Could you please let me know, Where I did wrong and what I need to do.
>
>
> Thanks &  Regards
>   Gopal
>
>