[ http://jira.codehaus.org/browse/MOJO-301?page=comments#action_59393 ]
Jeff Genender commented on MOJO-301: ------------------------------------ Thanks for the example...it REALLY helped. So you have found a couple of issues... First, i have fixed the JAVA_HOME issue by creating a new classloader (I have checked it in but have not released the plugin yet). JSPC is particular in having a special classloader isolate itself and set up properly with appropriate delegations.. This issue should be fixed. So you can remove the system scopes tools.jar dependency as its now set in the plugin. But this all now brought to clarity the rest of the issues you have... The problem we have is the old chicken/egg problem. Since the jspc runs for generate-sources, it attempts to create the java files from the jsps. But...in your example you need the type class you defined in the java source. Well this has not been compiled yet, so the creation of the java does not occur. After the compile phase occurs, you will notice that you can run it again, and voila...the jspc can pick up the type and it can create the jsps. The problem here is that the JSP has a dependency on your types, and they haven't been built yet. Your resolution are as follows... You can create a new maven project that creates a jar file which contains your types. You then make this a dependency of your web application and the JSPC should run just fine since it will find your classes. Or you can create a compile execution for javac that will run before the jspc plugin. I could force another run of the javac compiler programatically, but I will need to ping the maven guys to figure out an easy way to do this...and this would not be a small change. I would be interested in comments on this...perhaps something to bring to the dev lists. I have checked in the code, but will not release it until I get a few more people to try it out. > jspc-maven-plugin doesn't seem to work at all > --------------------------------------------- > > Key: MOJO-301 > URL: http://jira.codehaus.org/browse/MOJO-301 > Project: Mojo > Type: Bug > Reporter: Oliver Siegmar > Attachments: maven-jspc-example.tar.gz > > > Sorry for that stupid summarization - I don't know how to summarize this > problem. > When calling 'mvn package' I see this on my shell: > [INFO] jspc args: [-uriroot, /XXX/src/main/webapp, -d, > /XXX/target/jsp-source, -s, -l, -webinc, /XXX/target/web-fragment.xml, -p, > jsp] > org.apache.jasper.JasperException: The absolute uri: > http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the > jar files deployed with this application > My fault? -- 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