WARNING The requested profile "pom.xml" could not be activated because it does not exist
Asked Answered
T

7

9

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?

Triode answered 10/8, 2014 at 20:5 Comment(1)
pom.xml probably isn't the id of an active profile.Gretchen
O
40
  1. Right click on your project
  2. Go to "Run as"
  3. Go to "Run configurations... "
  4. When the screen opens, please delete the word "pom.xml" from the "Profiles:" line and then click "Run".

The project will now run.

profile

Outdoor answered 20/4, 2015 at 19:31 Comment(1)
Good solution. Got fixed.Scorecard
P
3

Your activeProfiles is set to pom.xml. But your Maven profile should be defined inside your pom.xml with an id. You have to set this id as the active profile or remove this line to use the default profile of your maven project.

Plywood answered 10/8, 2014 at 20:14 Comment(0)
H
3

Right click on the project:

  1. maven -> disable maven nature
  2. configure -> Convert to maven project
  3. run As -> Maven clean
  4. run As -> Maven install
Hilarius answered 19/9, 2019 at 23:54 Comment(0)
C
2

You just have to:

  1. delete .m2 repository.
  2. execute mvn clean install.

That solved my problem

Conjoined answered 13/2, 2018 at 17:23 Comment(0)
P
2
  1. Right click on the project
  2. Select menu Properties
  3. Click on Maven item in the list of left side
  4. Look at the right side and removing pom.xml from the box
  5. Apply & Close
Pyriphlegethon answered 1/4, 2019 at 10:22 Comment(0)
V
1

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.

Vase answered 10/3, 2018 at 16:0 Comment(0)
D
0

Check the target Java version matches the installed Java version in the pom.xml. Even if you have the java version installed. Check if eclipse project facet has correct java version.

<properties>
    <java.version>1.8</java.version>
</properties>
Disquiet answered 15/4, 2020 at 13:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.