I am trying to run maven goal: validation and keep getting: [WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
In my org.eclipse.m2e.core.prefs:
activeProfiles=pom.xml
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
What did I do wrong?
Right click on the project:
Your
activeProfiles
is set topom.xml
. But your Maven profile should be defined inside yourpom.xml
with anid
. You have to set this id as the active profile or remove this line to use the default profile of your maven project.You just have to:
That solved my problem
The project will now run.
In the Eclipse IDE, you can find the profile ID listed in two places. The two apparently aren't kept in the same place as I found the profile listed in one place and not the other.
Project-> Run As -> Run Configurations -> Maven Build
If your project is not listed here, then there is no maven profile set. Before making any changes, make sure the name at the top of the right hand window reads your project name! The main tab has a box labeled Profiles:
Project->Properties->Maven
Active Maven Profiles appear in the right hand pane. Simple delete and click apply. This cleared my problem.