Mvncleaninstall-x-dmaven. Test. Skip = true PDEV package error:
Nocompilerisprovidedinthisenvironment.PerhapsyouarerunningonaJREratherthanaJDK?
Idea, project, Maven also set a unified JDK, or report an error.
Solution 1:
In Maven’s setting. XML file <profiles> Add the specified JDK version to the tag
<profile> <id>JDK-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile>
Solution 2:
Add the Maven plug-in to the POM. XML file of the project, <plugins> Add JDK path to
<plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <fork>true</fork> <executable> C:\ProgramFiles\Java\jdk1.8.0_181\bin\javac.exe(你的安装路径) </executable> </configuration> </plugin>
Similar Posts:
- Maven Error compiling the project: diamond operator is not supported in -source 1.5
- Maven warnning: ‘build.plugins.plugin.version’ is missing [How to Solve]
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1
- Usage of API documented as @since 1.8+
- Maven [error] no longer supports source option 5. Please use version 7 or later
- [Solved] Dynamic Web Module 3.0 requires Java 1.6 or newer
- [Solved] maven 3.5.0 combined with eclipse suggests solutions to lambda expressions are allowed only at source level 1.8 or above errors
- [Solved] Error:java: error: release version 5 not supported & Switch Unrecognized String
- Automatic version change of IntelliJ idea language level and Java compiler
- [Solved] Error:java: Compilation failed: internal java compiler error