cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

apache apidocs FAILURE in Build From Source

Open ahmadamirahmadi007 opened this issue 2 years ago • 11 comments

ISSUE TYPE
  • Other
COMPONENT NAME

Source Code

CLOUDSTACK VERSION

CloudStack 4.17.0.1

CONFIGURATION
OS / ENVIRONMENT

Ubuntu 20.04 java 11 maven 3.6.3 and 3.8

SUMMARY

how can i handle follow error in build cloudstack from source

STEPS TO REPRODUCE

mvn -e clean install -Dnoredist -P developer,systemvm Log Link: https://gist.github.com/ahmadamirahmadi007/1b3cae60713eed394c85b33c326f6607 build new

EXPECTED RESULTS

Build OK

ACTUAL RESULTS

Build Not OK

ahmadamirahmadi007 avatar Aug 02 '22 12:08 ahmadamirahmadi007

Hi @ahmadamirahmadi007 can you try building only the apidocs module and send the full output of it by adding -pl tools/apidocs to the build command?

nvazquez avatar Aug 02 '22 16:08 nvazquez

@ahmadamirahmadi007 I'm not able to reproduce it, since you are using the noredist profile can you check the jars on the deps directory are matching the ones on https://github.com/shapeblue/cloudstack-nonoss and run the install script?

nvazquez avatar Aug 02 '22 22:08 nvazquez

instead of apidocs there is apidoc in my /tools Directory. i tested Both commands below But The result was the same. root@build:~/lab/cloudstack# mvn -e clean install -Dnoredist -pl tools/apidoc [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [ERROR] [ERROR] Could not find the selected project in the reactor: tools/apidoc @ [ERROR] Could not find the selected project in the reactor: tools/apidoc -> [Help 1] org.apache.maven.MavenExecutionException: Could not find the selected project in the reactor: tools/apidoc at org.apache.maven.graph.DefaultGraphBuilder.trimSelectedProjects (DefaultGraphBuilder.java:172) at org.apache.maven.graph.DefaultGraphBuilder.reactorDependencyGraph (DefaultGraphBuilder.java:124) at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:84) at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:532) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:219) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [ERROR] [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/

ahmadamirahmadi007 avatar Aug 03 '22 05:08 ahmadamirahmadi007

@ahmadamirahmadi007 I'm unable to reproduce this as well. Can you please try building apidoc module while providing profiles,

⇒  mvn clean install -Dnoredist -P developer,systemvm -pl :cloud-apidoc 
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Listening for transport dt_socket at address: 8787
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------< org.apache.cloudstack:cloud-apidoc >-----------------
[INFO] Building Apache CloudStack apidocs 4.17.1.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cloud-apidoc ---
[INFO] Deleting /home/shwstppr/lab/shapeblue/cloudstack/tools/apidoc/target (includes = [**/*], excludes = [])
[INFO] Deleting /home/shwstppr/lab/shapeblue/cloudstack/tools/apidoc (includes = [target, dist], excludes = [])
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.1.0:check (cloudstack-checkstyle) @ cloud-apidoc ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.3:process (default) @ cloud-apidoc ---
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:exec (compile) @ cloud-apidoc ---
Scanned and found 684 APIs
[INFO] 
[INFO] --- maven-site-plugin:3.8.2:attach-descriptor (attach-descriptor) @ cloud-apidoc ---
[INFO] No site descriptor found: nothing to attach.
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:exec (package) @ cloud-apidoc ---
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ cloud-apidoc ---
[INFO] Installing /home/shwstppr/lab/shapeblue/cloudstack/tools/apidoc/pom.xml to /home/shwstppr/.m2/repository/org/apache/cloudstack/cloud-apidoc/4.17.1.0-SNAPSHOT/cloud-apidoc-4.17.1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  23.797 s
[INFO] Finished at: 2022-08-03T12:15:40+05:30
[INFO] ------------------------------------------------------------------------

shwstppr avatar Aug 03 '22 06:08 shwstppr

result of mvn clean install -Dnoredist -P developer,systemvm -pl :cloud-apidoc : apidoc

ahmadamirahmadi007 avatar Aug 04 '22 09:08 ahmadamirahmadi007

@ahmadamirahmadi007 what does python --version say?

DaanHoogland avatar Aug 04 '22 09:08 DaanHoogland

pythonver

ahmadamirahmadi007 avatar Aug 04 '22 19:08 ahmadamirahmadi007

no python? only python2 and python3?

DaanHoogland avatar Aug 05 '22 10:08 DaanHoogland

Hi @ahmadamirahmadi007 can you create a python alias for python3?

nvazquez avatar Aug 05 '22 10:08 nvazquez

@ahmadamirahmadi007 which distro/platform are you on? You can create a symlink or alias for python3. The failure is because it can't find python.

rohityadavcloud avatar Aug 05 '22 11:08 rohityadavcloud

Hi @ahmadamirahmadi007 can you create a python alias for python3? after create alias for both python3 and python2 and run again i encountered with this error: python --version Python 2.7.18 [INFO] [INFO] --- exec-maven-plugin:1.2.1:exec (compile) @ cloud-apidoc --- Scanned and found 684 APIs ./build-apidoc.sh: line 83: python: command not found [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 04:14 h [INFO] Finished at: 2022-08-10T19:52:49+04:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (compile) on project cloud-apidoc: Command execution failed.: Process exited with an error: 127 (Exit value: 127) -> [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

ahmadamirahmadi007 avatar Aug 10 '22 15:08 ahmadamirahmadi007

Hi @ahmadamirahmadi007 can you create a python alias for python3? after create alias for both python3 and python2 and run again i encountered with this error: python --version Python 2.7.18 [INFO] [INFO] --- exec-maven-plugin:1.2.1:exec (compile) @ cloud-apidoc --- Scanned and found 684 APIs ./build-apidoc.sh: line 83: python: command not found [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 04:14 h [INFO] Finished at: 2022-08-10T19:52:49+04:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (compile) on project cloud-apidoc: Command execution failed.: Process exited with an error: 127 (Exit value: 127) -> [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

@ahmadamirahmadi007 , don´t create the alias for python2, only for python3. just python --version should report version 3.

DaanHoogland avatar Aug 12 '22 07:08 DaanHoogland

@ahmadamirahmadi007 I think the issue is env specific, pl discuss them on dev ML which more devs read/reply on https://cloudstack.apache.org/mailing-lists.html Github issues are generally triaged/accessed by release managers and some dev/contributors.

You can fix the issue by either creating a symlink or fixing the alias, on OSX I do this:

╰─☁️🐒 > which python
\/opt/homebrew/bin/python
╭─rohit@macbook  ~/lab/apache/cloudstack
╰─☁️🐒 > ls -lahi /opt/homebrew/bin/python
7067298 lrwxr-xr-x  1 rohit  admin     7B Apr  7 14:51 /opt/homebrew/bin/python -> python3

rohityadavcloud avatar Aug 17 '22 13:08 rohityadavcloud