1

Can any one help me? Why this is happen, and how to solve this error?

I try to run mvn clean package -DskipTests

[INFO] 
[INFO] -------------------< com.hybris.hybris123:hybris123 >-------------------
[INFO] Building hybris123 1.1
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ hybris123 ---
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ hybris123 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.723 s
[INFO] Finished at: 2022-01-13T16:41:34+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.1.0:resources (default-resources) on project hybris123: Cannot create resource output directory: /opt/CXCOMM210500P_0-70005661/hybris123/target/classes -> [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

My Java Home variable is /usr/lib/jvm/java-11-openjdk-amd64

And My maven variable like this :

export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}

Please Help me

Renumb
  • 23
  • 3
  • 2
    The issue `Cannot create resource output directory: /opt/CXCOMM210500P_0-70005661/hybris123/target/classes` ? Permission in those locations... furthermore `M2_HOME`, `MAVEN_HOME` are not needed only the entry into `PATH` is needed. – khmarbaise Jan 13 '22 at 09:51
  • So, i must change the permission of the maven variable right? And about the ```M2_HOME``` and ```MAVEN_HOME``` there is no problem on that right? – Renumb Jan 13 '22 at 11:31
  • The directories have permission issues (which I suppose because /opt is usually owned by root and not by a usual user)... The question is why do build within `/opt/... ` ? – khmarbaise Jan 13 '22 at 13:09

0 Answers0