Thanks for the tip. We are getting close. When I add the logging dependencies to the pom, it works when I run the build from that pom's directory. But when I go up to the pom's parent pom's directory and run a build there, it fails. I tried moving the logger dependencies up to the parent pom and that didn't work. I don't want to move the complete plugin to the parent pom because there are modules that don't have jsps and don't require it.
As for why I don't have the version on the jspc-maven-plugin artifact. It doesn't seem to make an ounce of difference one way or the other in behavior. It should be there for completeness so I added it but it didn't solve the problem. The hunt continues... Randy -----Original Message----- From: Grégory Joseph [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2008 10:37 AM To: user@mojo.codehaus.org Subject: Re: [mojo-user] jspc-maven-plugin suddenly failing I had this the other day when trying alpha-2. Somehow I got it working by adding the following deps to the plugin: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.4.1</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl104-over-slf4j</artifactId> <version>1.4.1</version> </dependency> Presumably because the compiler uses a logger. Now why it "suddenly" stopped working for you, I don't know. Maybe another project or parent pom brought in different version of one of the artifacts? Check with mvn help:effective-pom ? hth, -g 2008/9/11 Randy Eckhoff <[EMAIL PROTECTED]>: > I've been using maven2 with the org.codehaus.mojo.jspc maven plugin > for quite some time. Just the other day, jsp builds suddenly stopped > working with the "No java compiler available" message. > > My pom looks like: > <plugin> > <groupId>org.codehaus.mojo.jspc</groupId> > <artifactId>jspc-maven-plugin</artifactId> > <executions> > <execution> > <configuration> > <includeInProject>true</includeInProject> > </configuration> > <goals> > <goal>compile</goal> > </goals> > </execution> > </executions> > > <!-- Use the Tomcat 5 JSP compiler --> > <dependencies> > <dependency> > <groupId>org.codehaus.mojo.jspc</groupId> > <artifactId>jspc-compiler-tomcat5</artifactId> > <version>2.0-alpha-1</version> > </dependency> > </dependencies> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-war-plugin</artifactId> > <configuration> > <webXml>${pom.basedir}/target/jspweb.xml</webXml> > </configuration> > </plugin> > This has been unchanged for a long time. I use tomcat5 which means it > is using tomcat 5.5.15 jars. I confirmed that the > jasper-compiler-5.5.15.jar and jasper-compiler-jdt-5.5.15.jar are on > the classpath by doing a maven -X install. So in theory, the > org.apache.jasper.JspCompilationContext > createCompiler() method (yes i started digging in the tomcat source code): > > if (options.getCompiler() == null) { > jspCompiler = > createCompiler("org.apache.jasper.compiler.JDTCompiler"); > if (jspCompiler == null) { > jspCompiler = > createCompiler("org.apache.jasper.compiler.AntCompiler"); > } > } else { > jspCompiler = > createCompiler("org.apache.jasper.compiler.AntCompiler"); > if (jspCompiler == null) { > jspCompiler = > createCompiler("org.apache.jasper.compiler.JDTCompiler"); > } > } > if (jspCompiler == null) { > throw new > IllegalStateException(Localizer.getMessage("jsp.error.compiler")); > } > should resolve the JDTCompiler and AntCompiler since the jars are on > the classpath. The IllegalStateException is the exception being thrown: > > java.lang.IllegalStateException: No Java compiler available > at > org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:224) > at org.apache.jasper.JspC.processFile(JspC.java:979) > > I saw that 2.0-alpha-2 version came out this month so I tried that > with no luck. > > I am using Artifactory as my maven repo. For the common jars, it just > grabs from the maven2 repo. I deleted everything out of my artifactory > repo cache to force it to re-retrieve what the build needs. I also > deleted my local maven repo directory. All resulted in failure. I also > bounced artifactory which didn't work. > > I triple checked that the jasper compiler jars (both of them) are on > my machine and they are listed in the classpath for the build. Usually > this type of error means something is missing from the classpath. If > the jasper compiler jars are on the classpath, what else would be > missing all of a sudden. It's been working for almost a year just > fine. I'm guessing that maybe JDTCompiler can't be loaded because a > dependency it has on something can't be found. > > I based my implementation on: > http://mojo.codehaus.org/jspc/jspc-maven-plugin/usage.html, changing > tomcat > 6 to tomcat 5 and adding version because maven complained about > requiring a version element. > > I searched the web the last 2 days and didn't find anyone else having > this problem. Which tells me a configuration/dependency issue on my > end. But nothing has changed here. > > And it isn't just my own development machine. The buildmachine (using > Teamcity) is also failing with the same exact error. > > Any ideas where to start looking? Are others seeing this behavior > where jspc is suddenly failing? > > > Randy Eckhoff > Principal Engineer, Architect > GoFish Corporation > [EMAIL PROTECTED] > http://www.gofishcorp.com > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email