-1

I'm trying to build the project, but I'm bumping into the error below:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.0.0:run (compile-reports) on project saude-command: An Ant BuildException has occured: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.8.0_271\jre\bin\java.exe" (in directory "E:\saude-server\saude-command"): CreateProcess error=206, O nome do arquivo ou a extensão é muito grande

[ERROR] around Ant part ...<java fork="true" classname="br.com.ksisolucoes.report.CompilaReports" failonerror="on">... @ 5:93 in E:\saude-server\saude-command\target\antrun\build-main.xml
[ERROR] -> [Help 1]

Has anyone experienced this problem?

Jim Garrison
  • 85,615
  • 20
  • 155
  • 190
  • 1
    Duplicate: https://stackoverflow.com/q/10519558/18157 – Jim Garrison Jan 18 '21 at 18:48
  • Does this answer your question? [CreateProcess error=206, The filename or extension is too long when running main() method](https://stackoverflow.com/questions/10519558/createprocess-error-206-the-filename-or-extension-is-too-long-when-running-main) – AlBlue Jan 18 '21 at 20:21

1 Answers1

0

The problem is that the directory you have causes the build to be > 256 characters, which can't be done on Windows when using old-style ms-dos paths. You have to either run from a UNC path, or alternatively shorten the path of your home directory (or where you've downloaded the project to) to avoid this problem in the future.

AlBlue
  • 23,254
  • 14
  • 71
  • 91