How do you specify the java compiler version in a pom.xml file?
Answer / Sachin Jain
To specify the Java compiler version in a pom.xml file, use the `<maven.compiler.source>` and `<maven.compiler.target>` elements within the `<properties>` tag. For example:
```xml
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
```
| Is This Answer Correct ? | 0 Yes | 0 No |
How to tackle duplicate classes in maven build?
What does maven dependency plugin do?
What would the “jar: jar” goal do?
What is an archetype?
How you can produce execution debug output or error messages?
What are the methods for constructing an uber jar?
What is an uber jar?
List all the dependency scope in maven.
How you can exclude dependency?
What information does pom contain?
How to add local jar files to a maven project?
What is mojo?