Spring Maven clean error - The requested profile "pom.xml" could not be activated because it does not exist
The warning message
[WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
means that you somehow passed -P pom.xml
to Maven which means "there is a profile called pom.xml
; find it and activate it". Check your environment and your settings.xml
for this flag and also look at all <profile>
elements inside the various XML files.
Usually, mvn help:effective-pom
is also useful to see what the real POM would look like.
Now the error means that you tried to configure Maven to build Java 8 code but you're not using a Java 8 runtime. Solutions:
- Install Java 8
- Make sure Maven uses Java 8 if you have it installed.
JAVA_HOME
is your friend - Configure the Java compiler in your
pom.xml
to a Java version which you actually have.
Related:
- Introduction to Build Profiles
WARNING The requested profile "projectname" could not be activated because it does not exist
This happens when you have the following in your settings.xml (in your .m2 directory), and no profile with the id projectname.
<activeProfiles>
<activeProfile>projectname</activeProfile>
</activeProfiles>
Related Topics
@Autowired - No Qualifying Bean of Type Found for Dependency
Spring Boot Rest API Returns 404
Using Streams to Convert a List of Objects into a String Obtained from the Tostring Method
How to Exclude Property from Lombok Builder
Calculating the Sum of Number and Its Reverse in Java
Alternative to Switch Case in Java
Connection Java - Mysql:Public Key Retrieval Is Not Allowed
Reading a Resource File from Within Jar
No Content to Map Due to End-Of-Input Jackson Parser
How to Convert Utc Time into Local Time in Java
Java.Io.Filenotfoundexception: (Access Is Denied)
Transaction Marked as Rollback Only: How to Find the Cause
Why Does Intellij Idea Suddenly Not Recognize Tests in Test Folder Anymore
Write to Text File from Multiple Threads
Can We Use Multipart and @Requestbody Together in Spring
Error: Incompatible Types: Int[][] Cannot Be Converted to Int