我要做的是使用Bamboo构建Maven项目,然后将其部署到Amazon Web Services Elastic Beanstalk。我能够从我的本地直接构建和部署到EB,但我们希望将这两个进程分开并通过Bamboo进行版本控制和日志记录。
EB的部署是使用Beanstalker Maven插件完成的,所以当我想部署时我运行
mvn beanstalk:fast-deploy
它应该部署。为了使插件能够工作,它需要从settings.xml访问一组密钥和一个ServerId。在它包含之前,我得到的唯一错误是settings.xml中缺少服务器设置,但是一旦包含了settings.xml文件,就会导致链接错误。我已经将它包含在以下方面,这些方法都会导致链接错误:
老实说,我不确定问题是修改.m2文件夹是否会导致某些内容损坏,或者一旦它能够访问settings.xml并进入下一步部署就会遇到问题那已经存在了。就像我之前说的那样,这个构建和部署在我的本地工作,所以我不知道是什么问题。
下面是相关的错误代码段。如果有人想要帮助并需要更多信息,请告诉我。提前谢谢!
build 26-Aug-2014 09:19:04 [INFO] [beanstalk:fast-deploy]
build 26-Aug-2014 09:19:04 [WARNING] You should encrypt your passwords. See http://beanstalker.ingenieux.com.br/security.html for more information
build 26-Aug-2014 09:19:04 [FATAL ERROR] br.com.ingenieux.mojo.beanstalk.bundle.FastDeployMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms:
build 26-Aug-2014 09:19:04 [FATAL ERROR] Plugin realm = app0.child-container[br.com.ingenieux:beanstalk-maven-plugin:1.3.2]
build 26-Aug-2014 09:19:04 urls[0] = file:/home/bamboo/.m2/repository/br/com/ingenieux/beanstalk-maven-plugin/1.3.2/beanstalk-maven-plugin-1.3.2.jar
build 26-Aug-2014 09:19:04 urls[1] = file:/home/bamboo/.m2/repository/br/com/ingenieux/beanstalker-common/1.3.2/beanstalker-common-1.3.2.jar
build 26-Aug-2014 09:19:04 urls[2] = file:/home/bamboo/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
build 26-Aug-2014 09:19:04 urls[3] = file:/home/bamboo/.m2/repository/com/amazonaws/aws-java-sdk/1.6.12/aws-java-sdk-1.6.12.jar
build 26-Aug-2014 09:19:04 urls[4] = file:/home/bamboo/.m2/repository/org/apache/httpcomponents/httpclient/4.2/httpclient-4.2.jar
build 26-Aug-2014 09:19:04 urls[5] = file:/home/bamboo/.m2/repository/org/apache/httpcomponents/httpcore/4.2/httpcore-4.2.jar
build 26-Aug-2014 09:19:04 urls[6] = file:/home/bamboo/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
build 26-Aug-2014 09:19:04 urls[7] = file:/home/bamboo/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.1.1/jackson-core-2.1.1.jar
build 26-Aug-2014 09:19:04 urls[8] = file:/home/bamboo/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.1.1/jackson-databind-2.1.1.jar
build 26-Aug-2014 09:19:04 urls[9] = file:/home/bamboo/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.1.1/jackson-annotations-2.1.1.jar
build 26-Aug-2014 09:19:04 urls[10] = file:/home/bamboo/.m2/repository/joda-time/joda-time/2.4/joda-time-2.4.jar
build 26-Aug-2014 09:19:04 urls[11] = file:/home/bamboo/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
build 26-Aug-2014 09:19:04 urls[12] = file:/home/bamboo/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar
build 26-Aug-2014 09:19:04 urls[13] = file:/home/bamboo/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
build 26-Aug-2014 09:19:04 urls[14] = file:/home/bamboo/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.jar
build 26-Aug-2014 09:19:04 urls[15] = file:/home/bamboo/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4.jar
build 26-Aug-2014 09:19:04 urls[16] = file:/home/bamboo/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar
build 26-Aug-2014 09:19:04 urls[17] = file:/home/bamboo/.m2/repository/org/slf4j/slf4j-nop/1.6.4/slf4j-nop-1.6.4.jar
build 26-Aug-2014 09:19:04 urls[18] = file:/home/bamboo/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
build 26-Aug-2014 09:19:04 urls[19] = file:/home/bamboo/.m2/repository/org/eclipse/jgit/org.eclipse.jgit/2.1.0.201209190230-r/org.eclipse.jgit-2.1.0.201209190230-r.jar
build 26-Aug-2014 09:19:04 [FATAL ERROR] Container realm = plexus.core
build 26-Aug-2014 09:19:04 urls[0] = file:/opt/maven-2.1/lib/maven-2.1.0-uber.jar
build 26-Aug-2014 09:19:04 [INFO] ------------------------------------------------------------------------
build 26-Aug-2014 09:19:04 [ERROR] FATAL ERROR
build 26-Aug-2014 09:19:04 [INFO] ------------------------------------------------------------------------
build 26-Aug-2014 09:19:04 [INFO] com/google/common/base/Predicate
build 26-Aug-2014 09:19:04 com.google.common.base.Predicate
build 26-Aug-2014 09:19:04 [INFO] ------------------------------------------------------------------------
build 26-Aug-2014 09:19:04 [DEBUG] Trace
build 26-Aug-2014 09:19:04 java.lang.NoClassDefFoundError: com/google/common/base/Predicate
build 26-Aug-2014 09:19:04 at java.lang.ClassLoader.defineClass1(Native Method)
build 26-Aug-2014 09:19:04 at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
build 26-Aug-2014 09:19:04 at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
build 26-Aug-2014 09:19:04 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
build 26-Aug-2014 09:19:04 at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
build 26-Aug-2014 09:19:04 at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
build 26-Aug-2014 09:19:04 at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
build 26-Aug-2014 09:19:04 at java.security.AccessController.doPrivileged(Native Method)
build 26-Aug-2014 09:19:04 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
build 26-Aug-2014 09:19:04 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
build 26-Aug-2014 09:19:04 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
build 26-Aug-2014 09:19:04 at br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor.WaitForEnvironmentCommand.getEnvironmentDescriptionPredicate(WaitForEnvironmentCommand.java:104)
build 26-Aug-2014 09:19:04 at br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor.WaitForEnvironmentCommand.lookupInternal(WaitForEnvironmentCommand.java:67)
build 26-Aug-2014 09:19:04 at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.lookupEnvironment(AbstractBeanstalkMojo.java:52)
build 26-Aug-2014 09:19:04 at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:59)
build 26-Aug-2014 09:19:04 at br.com.ingenieux.mojo.beanstalk.bundle.FastDeployMojo.configure(FastDeployMojo.java:73)
build 26-Aug-2014 09:19:04 at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:350)
build 26-Aug-2014 09:19:04 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
build 26-Aug-2014 09:19:04 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
build 26-Aug-2014 09:19:04 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
build 26-Aug-2014 09:19:04 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
build 26-Aug-2014 09:19:04 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
build 26-Aug-2014 09:19:04 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
build 26-Aug-2014 09:19:04 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
build 26-Aug-2014 09:19:04 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
build 26-Aug-2014 09:19:04 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
build 26-Aug-2014 09:19:04 at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
build 26-Aug-2014 09:19:04 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build 26-Aug-2014 09:19:04 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
build 26-Aug-2014 09:19:04 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
build 26-Aug-2014 09:19:04 at java.lang.reflect.Method.invoke(Method.java:597)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
build 26-Aug-2014 09:19:04 Caused by: java.lang.ClassNotFoundException: com.google.common.base.Predicate
build 26-Aug-2014 09:19:04 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
build 26-Aug-2014 09:19:04 at java.security.AccessController.doPrivileged(Native Method)
build 26-Aug-2014 09:19:04 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
build 26-Aug-2014 09:19:04 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
build 26-Aug-2014 09:19:04 at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
build 26-Aug-2014 09:19:04 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
build 26-Aug-2014 09:19:04 ... 38 more
答案 0 :(得分:0)
将您的Maven更新为3.2.x.并且不要使用捆绑的发行版Maven
(你可以使用mvm,github.com / ingenieux / mvm这个顺便说一句)