question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use maven-compiler-plugin Java version when compiling Java templates via jte-maven-plugin precompile goal

See original GitHub issue

I’ve added jte-maven-plugin, specified precompile goal, got .class files, uploaded them to web server, tried opening the web page and got error. Checking web server logs revealed that jte-maven-plugin uses default Java version when compiling JTE templates. I use Java 16. In my pom.xml I have

<java.version>15</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> 

Java 15 is installed on the web server, so I get unsupported class file major version 60

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
izogfifcommented, Jul 7, 2021

@casid Could you also release jte-jsp-converter there? It’s not really convenient to fork the repository / install this module manually on local machine.

1reaction
izogfifcommented, Jul 6, 2021

@casid checked, maven.compiler.release variable works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting the -source and -target of the Java Compiler
Sometimes when you may need to compile a certain project to a different version than what you are currently using. The javac can...
Read more >
java - Failed to execute goal org.apache.maven.plugins ...
I was facing the same issue, it works for me after changing version 11 to 1.8,. replace <properties> <java.version>11</java.version> ...
Read more >
jte/DOCUMENTATION.md at main · casid/jte - GitHub
When using this method the precompiled templates are bundled within your application jar file. The plugin generates *.java files for all jte templates...
Read more >
Setting the Java Version in Maven - Baeldung
In this quick tutorial, we'll show how to set the Java version in Maven. Before moving on, we can check the default JDK...
Read more >
Artifacts using maven-plugin-api version 2.2.1
21. Jte Maven Plugin ... Precompile all jte templates to Java classes during maven build ... org.jusecase » jte-maven-compiler-pluginApache. Precompile all ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found