Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some compilation errors don't display the problematic filename #6

Open
edalquist opened this issue May 10, 2013 · 6 comments
Open

Some compilation errors don't display the problematic filename #6

edalquist opened this issue May 10, 2013 · 6 comments
Labels

Comments

@edalquist
Copy link
Member

See https://jira.codehaus.org/browse/MJSPC-59

@Lynorics
Copy link

+1

@GregDThomas
Copy link

[Details copied from codehaus as it's closing down]

Certain compilation errors can be hard to track down; for example when compiling the attached two jspc files (one of which has an error, one doesn't), the Maven output is as follows (even with the -e flag);

C:\jspctest> mvn clean package
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
...
...
[INFO] — jspc-maven-plugin:2.0-alpha-3:compile (default) @ jspctest —
Created dir: C:\jspctest\target\jsp-source
[INFO] Compiling JSP source files to C:\jspctest\target/jsp-source
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.965s
[INFO] Finished at: Mon Dec 17 10:14:08 GMT 2012
[INFO] Final Memory: 12M/165M
[INFO] ------------------------------------------------------------------------
[ERROR] Unable to compile class for JSP:
[ERROR]
[ERROR] An error occurred at line: 7 in the generated java file
[ERROR] Syntax error on token "import", Identifier expected after this token
[ERROR]
[ERROR] Stacktrace:
[ERROR] -> [Help 1]
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 7 in the generated java file
Syntax error on token "import", Identifier expected after this token
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
at org.apache.jasper.JspC.processFile(JspC.java:1010)
at org.apache.jasper.JspC.execute(JspC.java:1159)
at org.codehaus.mojo.jspc.compiler.tomcat6.JspCompilerImpl.compile(JspCompilerImpl.java:111)

Note that there is no indication of the name of the file with the error. With only two to pick from in the attached, it's easy to work out which is working. But with a major project, it can be very hard to track down the problematic file (in this case, an extra comma in the import statement).

[NB. Based on my understanding of how this works, I'm entirely sure this problem can be fixed without changing the underlying jspc. But I'm raising it just in case ...]

@ChristianMurphy
Copy link
Member

@Lynorics @GregDThomas Would either of you be willing to open a PR to resolve this?

@GregDThomas
Copy link

Sorry, I've moved on to gradle since I originally raised this!

@ChristianMurphy
Copy link
Member

@GregDThomas no worries.
Thanks for the update!
And thanks for copying the ticket info over from codehaus before they closed down the issue tracker! 🥇

@ChristianMurphy
Copy link
Member

Hey there! 👋

Thanks for opening an issue with jspc-maven-plugin. 👍 🙇‍♂️
At the moment, the jspc maven plugin does not have an active maintainer to process your request. ⛔
While the Jasig jspc maven plugin is without an active maintainer, we recommend the Apache Sling jspc maven plugin and the Jetty jspc maven plugin as alternatives that are actively maintained. ✅
If you are interested in becoming a project maintainer, there is a uPortal-dev list post where you can register your interest. 📧

Thanks again for contributing to the jspc-maven-plugin! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants