Cloudstack编译打包常见问题
1 官方地址
https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack
2 mvn 编译vmware 错误
本地resository 的vmware-vim25-5.1.jar 与源码使用的版本不同
Jar包我放10.100.213.175/share上了
将jar包放 resository/com/cloud/com/vmware/vmware-vim25/5.1下
重新编译即可
3 mvn 编译生成rpm包错误
错误信息:
[DEBUG] Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7
[DEBUG] Included: commons-cli:commons-cli:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
[DEBUG] Included: org.apache.commons:commons-exec:jar:1.1
[DEBUG] Excluded: org.apache.maven:maven-toolchain:jar:1.0
[DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-core:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-monitor:jar:2.0.6
[DEBUG] Excluded: classworlds:classworlds:jar:1.1
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9
[DEBUG] Excluded: junit:junit:jar:3.8.2
[DEBUG] Configuring mojo org.codehaus.mojo:exec-maven-plugin:1.2.1:exec from plugin realm ClassRealm[plugin>org.codehaus.mojo:exec-maven-plugin:1.2.1, parent: sun.misc.Launcher$AppClassLoader@a62b39f]
[DEBUG] Configuring mojo 'org.codehaus.mojo:exec-maven-plugin:1.2.1:exec' with basic configurator -->
[DEBUG] (f) arguments = [-quiet, -r, -o, systemvm.iso, systemvm.zip, cloud-scripts.tgz, authorized_keys]
[DEBUG] (f) basedir = /home/wangft/workspace/Cloudstack-4.3.0/systemvm
[DEBUG] (f) classpathScope = runtime
[DEBUG] (f) executable = genisoimage
[DEBUG] (f) longClasspath = false
[DEBUG] (f) project = MavenProject: org.apache.cloudstack:cloud-systemvm:4.3.0 @ /home/wangft/workspace/Cloudstack-4.3.0/systemvm/pom.xml
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@2348c47e
[DEBUG] (f) skip = false
[DEBUG] (f) workingDirectory = /home/wangft/workspace/Cloudstack-4.3.0/systemvm/dist
[DEBUG] -- end configuration --
[DEBUG] Executing command line: genisoimage -quiet -r -o systemvm.iso systemvm.zip cloud-scripts.tgz authorized_keys
genisoimage: No such file or directory. Invalid node - 'authorized_keys'.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.121 s
[INFO] Finished at: 2014-05-15T15:24:18+08:00
[INFO] Final Memory: 21M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project cloud-systemvm: Command execution failed. Process exited with an error: 2 (Exit value: 2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project cloud-systemvm: Command execution failed.
根本原因就是执行一下命令时genisoimage -quiet -r -o systemvm.iso systemvm.zip cloud-scripts.tgz authorized_key 报错
解决方法:
安装genisoimage
还有要是源码是从git上下载的,缺少文件?
看看项目目录下是否存在systemvm/patches/debian/config/root/.ssh/authorized_keys
不存在的话从源码解压包中拷贝一下
4 mvn 编译snmp-alerts错误
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.073 s
[INFO] Finished at: 2014-05-16T15:34:08+08:00
[INFO] Final Memory: 18M/964M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project cloud-plugin-snmp-alerts: There are test failures.
[ERROR]
[ERROR] Please refer to /src/Cloudstack-4.3.0/plugins/alert-handlers/snmp-alerts/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project cloud-plugin-snmp-alerts: There are test failures.
Please refer to /src/Cloudstack-4.3.0/plugins/alert-handlers/snmp-alerts/target/surefire-reports for the individual test results.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
Please refer to /src/Cloudstack-4.3.0/plugins/alert-handlers/snmp-alerts/target/surefire-reports for the individual test results.
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:83)
at org.apache.maven.plugin.surefire.SurefirePlugin.writeSummary(SurefirePlugin.java:673)
at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:647)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:137)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:98)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
[ERROR]
[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/MojoFailureException
解决方法
http://mail-archives.apache.org/mod_mbox/cloudstack-users/201311.mbox/%3CCAMFG1+PA7xe+J=u4P-D_vbDBg=_Kne8ksy3cgUk3gy=VEq0+sQ@mail.gmail.com%3E
版权声明:本文为博主原创文章,未经博主允许不得转载。 |