You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2023/01/18 07:56:13 UTC
[GitHub] [cloudstack] mail2lawi opened a new issue, #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
mail2lawi opened a new issue, #7102:
URL: https://github.com/apache/cloudstack/issues/7102
<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete the comments.
-->
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Building image for Centos8 using rpmbuild from source
-->
~~~
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main branch.
-->
~~~
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise
-->
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
Red Hat Enterprise Linux 8.7
Apache Maven 3.5.4 (Red Hat 3.5.4-5)
Maven home: /usr/share/maven
Java version: 11.0.17, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.17.0.8-2.el8_6.x86_64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.18.0-425.10.1.el8_7.x86_64", arch: "amd64", family: "unix"
Node v10.24.0
##### SUMMARY
<!-- Explain the problem/feature briefly -->
I am trying to build the rpm pack for Cloudstack from source as per the instructions in the doc site.
After running the ./package.sh -d centos8 the process fails after around 25 mins with the error below:
[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: 1 (Exit value: 1) -> [Help 1]
I had been getting almost similar errors with other plugins which I resolved by setting the correct versions in the pom.xml:
- gmaven - changed version to 1.5
- Added a missing maven-assembly-plugin ver 2.2.1
- Addded a missing maven-war-plugin ver 2.2
Those interventions seemed to solve the issues as I'm not failing at those steps (yet).
However, with the org.codehaus.mojo:exec-maven-plugin:1.2.1:exec error I can't seem to get a way around it. For one, I do not know if the issue is with the pom.xml.
Secondly, I do not know where exactly to edit even if the issue with the pom.xml
##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
For new features, show how the feature would be used.
-->
<!-- Paste example playbooks or commands between quotes below -->
~~~
~~~
<!-- You can also paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
packaging]$ ./package.sh -d centos8
---- skipped for brevity---
[INFO] Apache CloudStack Developer Mode ................... SUCCESS [ 1.129 s]
[INFO] Apache CloudStack Developer Tools .................. SUCCESS [ 0.017 s]
[INFO] Apache CloudStack apidocs .......................... FAILURE [ 6.354 s]
[INFO] Apache CloudStack marvin ........................... SKIPPED
[INFO] Apache CloudStack DevCloud4 ........................ SKIPPED
[INFO] Apache CloudStack DevCloud-KVM 4.17.2.0 ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25:43 min
[INFO] Finished at: 2023-01-18T10:10:32+03:00
[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: 1 (Exit value: 1) -> [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 :cloud-apidoc
error: Bad exit status from /var/tmp/rpm-tmp.KHosT0 (%build)
RPM build errors:
Macro expanded in comment on line 590: %{_sysconfdir}/logrotate.d/%{name}-catalina
Bad exit status from /var/tmp/rpm-tmp.KHosT0 (%build)
RPM Build Failed
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] boring-cyborg[bot] commented on issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #7102:
URL: https://github.com/apache/cloudstack/issues/7102#issuecomment-1386630221
Thanks for opening your first issue here! Be sure to follow the issue template!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #7102:
URL: https://github.com/apache/cloudstack/issues/7102#issuecomment-1386974980
@mail2lawi
I faced the similar issue when build packages in centos8 container
it is because there is no command 'python', which is a bit different from you
```
./build-apidoc.sh: line 83: python: command not found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.871 s
[INFO] Finished at: 2023-01-18T12:26:05Z
[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]
```
can you change "python" to "python3" in tools/apidoc/build-apidoc.sh and retry ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] mail2lawi closed issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
mail2lawi closed issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
URL: https://github.com/apache/cloudstack/issues/7102
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #7102:
URL: https://github.com/apache/cloudstack/issues/7102#issuecomment-1387276239
@mail2lawi
for your information, I run the following commands before packaging
```
alternatives --set java java-11-openjdk.x86_64
alternatives --set javac java-11-openjdk.x86_64
alternatives --set python /usr/bin/python3
```
everything works fine
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #7102:
URL: https://github.com/apache/cloudstack/issues/7102#issuecomment-1386975707
might be related to #6889
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #7102:
URL: https://github.com/apache/cloudstack/issues/7102#issuecomment-1386819685
@mail2lawi , errors at this point in the build are usually due to python version problems. can you
1. add the logging just before the bui;d summary
2. check the default python and python3 versions on your system?
tnx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] mail2lawi commented on issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
mail2lawi commented on issue #7102:
URL: https://github.com/apache/cloudstack/issues/7102#issuecomment-1387281340
@weizhouapache
Great idea. I should actually do that since this machine is not running anything else that would be impacted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #7102:
URL: https://github.com/apache/cloudstack/issues/7102#issuecomment-1387037500
> might be related to #6889
if that is so, we may have to revert that one and come up with a more generic solution. #6889 means that only systems with a binary named `python3` will work, not on ones that have python 3 installed as `python`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] mail2lawi commented on issue #7102: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec when building cloudstack from source
Posted by GitBox <gi...@apache.org>.
mail2lawi commented on issue #7102:
URL: https://github.com/apache/cloudstack/issues/7102#issuecomment-1387271051
@weizhouapache I got the same error even after amending the build.sh to python3.
On looking closely at the log I think I've found what's causing the error. Looks like a JRE mismatch error.
`
[INFO] --- maven-remote-resources-plugin:1.3:process (default) @ cloud-apidoc ---
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:exec (compile) @ cloud-apidoc ---
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/cloud/api/doc/ApiXmlDocWriter has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
[INFO] ------------------------------------------------------
`
I had set the JAVA_HOME env to JDK11 but the default java and javac were still pointing to the default 1.8 that came with the system.
So I changed the default to version 11 using alternatives and managed to get past that issue.
But then I was faced with the python error:
`[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (package) on project cloud-marvin: Command execution failed.: Cannot run program "python" (in directory "~/apache-cloudstack-4.17.2.0-src/dist/rpmbuild/BUILD/cloudstack-4.17.2.0/tools/marvin"): error=2, No such file or directory -> [Help 1]`
I fixed this by changing the instances of python to python3 in tools/marvin/pom.xml.
`
81 <execution>
82 <id>package</id>
83 <phase>package</phase>
84 <goals>
85 <goal>exec</goal>
86 </goals>
87 <configuration>
88 <workingDirectory>${exec.workingdir}</workingDirectory>
89 <executable>python3</executable>
90 <arguments>
91 <argument>mvn-setup.py</argument>
92 <argument>${project.version}</argument>
93 <argument>sdist</argument>
94 </arguments>
95 </configuration>
96 </execution>
`
The next error was `[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (package) on project cloud-marvin: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]`
Log showed this as the culprit:
```
[INFO] --- exec-maven-plugin:1.2.1:exec (package) @ cloud-marvin ---
Traceback (most recent call last):
File "mvn-setup.py", line 54, in <module>
runSetupScript(remainingArgs)
File "mvn-setup.py", line 46, in runSetupScript
exitCode = subprocess.call(cmd)
File "/usr/lib64/python3.6/subprocess.py", line 287, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'python': 'python'
```
So now I've changed the tools/marvin/mvn-setup.py to python3 (line 45 in my version):
`43 def runSetupScript(args):
44 """Invoke setup.py with the provided arguments"""
45 cmd = ['python3', setupScript] + args
46 exitCode = subprocess.call(cmd)
47 return exitCode
48
`
I will update with what comes after this change. Each run takes almost 30 minutes so I can't update frequently enough.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org