Che: How to solve the ant BuildException?

Created on 3 Jun 2018  路  4Comments  路  Source: eclipse/che

Description


there is a exception when I execute "mvn clean install" in the root of che. Maven fails to build Che Dashboard :: Web App. The error message is following:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (build-image) on project che-dashboard-war: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true" dir="/home1/laojin/programs/che-master/dashboard" executable="docker">... @ 4:98 in /home1/laojin/programs/che-master/dashboard/target/antrun/build-main.xml
[ERROR] -> [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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :che-dashboard-war

The version of my node is 10.2.0 and npm is 6.1.0.
I check the error message preceding final Error, as follow:

     [exec] npm ERR! Linux 3.19.0-25-generic
     [exec] npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
     [exec] npm ERR! node v6.11.2
     [exec] npm ERR! npm  v3.10.10
     [exec] npm ERR! code ETIMEDOUT
     [exec] npm ERR! errno ETIMEDOUT
     [exec] npm ERR! syscall connect
     [exec] 
     [exec] npm ERR! network connect ETIMEDOUT 104.18.97.96:443
     [exec] npm ERR! network This is most likely not a problem with npm itself
     [exec] npm ERR! network and is related to network connectivity.
     [exec] npm ERR! network In most cases you are behind a proxy or have bad network settings.
     [exec] npm ERR! network 
     [exec] npm ERR! network If you are behind a proxy, please make sure that the
     [exec] npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
     [exec] 
     [exec] npm ERR! Please include the following file with any support request:
     [exec] npm ERR!     /dashboard/npm-debug.log
     [exec] The command '/bin/sh -c cd /dashboard && npm install' returned a non-zero code: 1

I think [exec] npm ERR! network connect ETIMEDOUT 104.18.97.96:443 is the cause of this exception, but I have no idea how to correct it.

**OS and version:Ubuntu 14.04.5

kinquestion

All 4 comments

@gdjinjiahao by default UserDashboard is built in a Docker container. You need to usea native profile. Just add -Pnative to your build command.

@eivantsov Thanks for your answer. ETIMEOUT is solved. But when I run mvn clean install -rf :che-dashboard-war -Pnative, che will triggers a new exception. The error message is following:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (build-dashboard) 
on project che-dashboard-war: An Ant BuildException has occured: Replace: source file 
/home1/laojin/programs/che-master/dashboard/target/dist/index.html doesn't exist
[ERROR] around Ant part ...<replace file="/home1/laojin/programs/che-
master/dashboard/target/dist/index.html">... @ 7:86 in /home1/laojin/programs/che-
master/dashboard/target/antrun/build-main.xml
[ERROR] -> [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 check the directory /home1/laojin/programs/che-master/dashboard/target/, there is no dist.
There is no message preceding the final error but some warnings. As follow:

     [exec] npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) che-
[email protected] npm run bower && npm run typings && npm run build /home1/laojin/programs/che-
master/dashboard
     [exec] added 1413 packages in 104.214s
     [exec] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] 
(node_modules/fsevents):
     [exec] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
[email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

By reading the last line, I think che is only compiled in mac. Am I right?

@gdjinjiahao is this still an issue for you?

Closing. Feel free to reopen it if you think its still relevant for you.

Was this page helpful?
0 / 5 - 0 ratings