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:
Related Posts:
- Unable to create requested service [org.hibernate .engine.jdbc.env.spi.JdbcEnvironment]-MySQL
- Configure active profile in SpringBoot via Maven
- Eclipse/Maven error: “No compiler is provided in this environment”
- How is “mvn clean install” different from “mvn install”?
- Understanding Spring @Autowired usage
- com.atomikos.icatch.SysException: Error in init: Log already in use? tmlog in ./
- Spring @PropertySources value not overriding
- Lombok and Maven
- HTTP Status 405 – Request method ‘POST’ not supported (Spring MVC)
- “NoClassDefFoundError: Could not initialize class” error
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘MyController’:
- Error creating bean with name ‘entityManagerFactory’ defined in class path resource : Invocation of init method failed
- No String-argument constructor/factory method to deserialize from String value (”)
- Why Maven project is tied to J2SE-1.5 by default?
- Spring boot – Request method ‘POST’ not supported. Tried everything
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- “NoClassDefFoundError: Could not initialize class” error
- “NoClassDefFoundError: Could not initialize class” error
- Error creating bean with name ‘entityManagerFactory’ defined in class path resource : Invocation of init method failed
- What is difference between CrudRepository and JpaRepository interfaces in Spring Data JPA?
- Difference between spring @Controller and @RestController annotation
- @Autowired – No qualifying bean of type found for dependency
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- HTTP Status 405 – Request method ‘POST’ not supported (Spring MVC)
- unused import statement for used ones in IntelliJ IDEA
- How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?
- Maven: Failed to read artifact descriptor
- com.sun.jdi.InvocationException occurred invoking method
- UnsatisfiedDependencyException: Error creating bean with name
- UnsatisfiedDependencyException: Error creating bean with name
- Only using @JsonIgnore during serialization, but not deserialization
- What exactly is a Maven Snapshot and why do we need it?
- Cannot change version of project facet Dynamic Web Module to 3.0?
- Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
- Why SpringMVC Request method ‘GET’ not supported?
- Error: JAVA_HOME is not defined correctly executing maven
- intellij incorrectly saying no beans of type found for autowired repository
- Could not resolve placeholder in string value
- JAVA_HOME should point to a JDK not a JRE
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- Is spring default scope singleton or not?
- How to solve the “failed to lazily initialize a collection of role” Hibernate exception
- MultipartException: Current request is not a multipart request
- How are “mvn clean package” and “mvn clean install” different?
- java.lang.VerifyError: Inconsistent stackmap frames at branch target 421
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- “The import org.springframework cannot be resolved.”
- JsonMappingException: No suitable constructor found for type [simple type, class ]: can not instantiate from JSON object
- “Source folder is not a Java project” error in eclipse
- Downloading a file from spring controllers
- Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven
- Maven dependency update on commandline
- java.lang.IllegalStateException: Failed to introspect Class
- Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2)
- Spring boot: Unable to start embedded Tomcat servlet container
- when spring boot startup,throw out the “method names must be tokens” exception
- model.addAttribute() parameters
- How do I enable index downloads in Eclipse for Maven dependency search?
- When to use LinkedList over ArrayList in Java?
- How to convert a char to a String?
- How do you create a dictionary in Java? [closed]
- How do I declare and initialize an array in Java?
- Convert list to array in Java [duplicate]
- Convert String to double in Java
- Running JAR file on Windows 10
- Iterate through a HashMap [duplicate]
- I want to declare an empty array in java and then I want do update it but the code is not working
- Usage of @see in JavaDoc?
- Why do I get “Exception; must be caught or declared to be thrown” when I try to compile my Java code?
- Check jdk/JRE is installed and get path for jvm.dll
- What is Java String interning?
- Rename a file using Java
- What is “String args[]”? parameter in main method Java
- “A java exception has occurred” when opening .jar
- Android java.lang.IllegalStateException: Could not execute method of the activity
- Java error: Comparison method violates its general contract
- “Cannot create generic array of ..” – how to create an Array of Map
? - javac: file not found: first.java Usage: javac
- Eclipse Java error: This selection cannot be launched and there are no recent launches
- align text center with android
- IntelliJ – Can’t start – “JAVA_HOME does not point to a valid JVM installation”
- Empty an array in Java / processing
- Class is not Abstract and does not Override error in Java
- Replace a character at a specific index in a string?
- Error array dimension missing
- How to detect EOF in Java?
- Information about _JAVA_OPTIONS
- Two dimensional array list
- Must issue a STARTTLS command first
- Creating a Calendar using javafx
- A tool for calculating the big-O time complexity of Java code? [closed]
- How to print binary tree diagram in Java?
- Must qualify the allocation with an enclosing instance of type GeoLocation
- Unknown version of Tomcat was specified in Eclipse
- How to compare character ignoring case in primitive types
- toring and Retrieving ArrayList values from hashmap
- Could not find or load main class with a Jar File
- “uses unchecked or unsafe operations” [duplicate]
- How to convert java.util.Date to java.sql.Date?