1 votes

The requested profile "pom.xml" could not be activated because it does not exist

When I do mvn clean or mvn install from jboss developer I get the following error. I have checked the following link, but it doesn't help me or tell me much to configure from eclipse: similar question

The error shown in the console is the following:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building simul 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ simul ---
[INFO] Deleting D:\workspace_alterno\simul\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.375 s
[INFO] Finished at: 2018-05-28T17:03:22-05:00
[INFO] Final Memory: 5M/155M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project simul: Failed to clean project: 
Failed to delete D:\workspace_alterno\simul\target\simul.war -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I use java jdk8, my java_home points to my jdk8, and my pom.xml also has:

<properties>
    <spring-framework.version>4.2.3.RELEASE</spring-framework.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
</properties>

I also tried to run it via terminal and error persists, please if anyone has the solution mention it well detailed, thanks!

0 votes

Add the debug logger run mvn install -X. if you have more than one version of java installed run from cmd java -version to check which version you are taking into account.

0 votes

@Polo thanks for commenting, running "mvn install" from the terminal shows me the same error, and with "java -version" and "javac -version" points fine to my jdk 1.8.0_51

1voto

MGL Points 1

The solution was to restart jbossDeveloper, this IDE has some bugs that do not refresh well when developing applications.

0voto

EstebanSA Points 1

Another possible solution is this https://stackoverflow.com/questions/28192761/spring-maven-clean-error-the-requested-profile-pom-xml-could-not-be-activate/48051852 where the problem is that there is a conflict with the java versions that you have in the pom.xml and the one you have in the runtime, I had java 11 in the runtime and java 8 in the pom.xml, I changed the runtime to java 8 and it solved the problem.

-1voto

Alejandro Hdz Points 1

Upgrade the STS version to version 4.10 Avoid using versions earlier than 4.10 E.g. Using version 3.9.8 gives you the error that the pom.xml does not exist!

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X