Add <skip/> option 
-------------------

                 Key: MJSPC-32
                 URL: http://jira.codehaus.org/browse/MJSPC-32
             Project: Maven 2.x JSPC Plugin
          Issue Type: Improvement
            Reporter: Amir Mistric


This was a suggestion from a Maven mailing list to a problem that I have...

90% of our apps are WARs and I have a super parent POM where I would like to 
define something like this
----------------------------------
      <plugin>
        <groupId>org.codehaus.mojo.jspc</groupId>
        <artifactId>jspc-maven-plugin</artifactId>
        <version>2.0-alpha-1</version>
        <executions>
          <execution>
            <id>jspc</id>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.mojo.jspc</groupId>
            <artifactId>jspc-compiler-tomcat5</artifactId>
            <version>2.0-alpha-1</version>
          </dependency>
        </dependencies>
        <configuration>
          <sources>
            <directory>${basedir}/src/main/resources/</directory>
            <includes>
              <include>**/*.jsp</include>
            </includes>
          </sources>
          <source>1.6</source>
          <target>1.6</target>
          <verbose>1</verbose>
          <includeInProject>false</includeInProject>
        </configuration>
      </plugin>
----------------------------------

This would allow me to check precompile all JSPs on my WAR projects....This 
works like a charm except for the few JAR projects that I have....
Since this is inherited from the super parent POM, when I try to package my 
multimodule JAR project I get following error:

-----------------------------------
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   mycompay-common
[INFO]   mycompay-common-model
[INFO]   mycompay-common-hibernate
[INFO] 
----------------------------------------------------------------------------
[INFO] Building mycompay-common
[INFO]    task-segment: [package]
[INFO] 
----------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: enforce}]
[INFO] [jspc:compile {execution: jspc}]
[WARNING] Compiled JSPs will not be added to the project and web.xml will not 
be modified, either because includeInProject is set to false or because the 
project's packaging is not 'war'.
[INFO] Created dir: C:\mycompay\project\CDNP\mycompay-common\target\jsp-source
[INFO] Created dir: C:\mycompay\project\CDNP\mycompay-common\target\classes
[INFO] Compiling JSP source files to 
C:\mycompay\project\CDNP\mycompay-common\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:1107)
        at 
org.codehaus.mojo.jspc.compiler.tomcat5.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:597)
        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:443)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        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:597)
        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)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Tue Nov 27 17:39:54 EST 2007
[INFO] Final Memory: 9M/17M
[INFO] ------------------------------------------------------------------------
-----------------------------------


After asking on the user list it was suggested that I redefine the JSPC plugin 
for my JAR projects with a skip option....And if there isn't one - to report it 
on JIRA....

Regards
zambak

-- 
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

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to