1

I have a maven project from a git repositories onto my eclipse. It is build on Java 8. The first thing i do is perform a when i try to build app using below command mvn clean install

The requested profile "pom.xml" could not be activated because it does not exist. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project SpringBootSpringJPACRUDExample: Compilation failure

2 Answers2

0

Can you confirm if you have installed JDK in the same machine?

If yes, you might want to check if your Eclipse IDE settings if it is pointed to the install directory of the JDK.

JekBP
  • 81
  • 4
  • can you display the file in your project directory to make sure that the POM.XML exists? – JekBP Sep 22 '18 at 08:33
0

Please try the below solution.

  1. In Eclipse IDE, go to Window > Preferences > Java > Installed JREs > and check your installed JREs. You should have an entry with a JDK there.

  2. Select the Execution Env as show below. Click OK

  3. Then Right-Click on your Project -> Maven -> Update Project

Alien
  • 15,141
  • 6
  • 37
  • 57