2016-10-22 81 views
0

我跟着这个链接安装简单的春季开机项目openshift在线。但是,我无法得到它的工作。部署春季开机大战onlineched

http://www.sothawo.com/2015/09/deploying-a-spring-boot-application-running-with-java8-on-openshift2/

这里是我的项目结构,我看到了异常,当我做git push

git push 
Counting objects: 14, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (9/9), done. 
Writing objects: 100% (14/14), 1.82 KiB | 0 bytes/s, done. 
Total 14 (delta 1), reused 0 (delta 0) 
remote: Stopping DIY cartridge 
remote: CLIENT_RESULT: Application is already stopped 
remote: Repairing links for 1 deployments 
remote: Building git ref 'master', commit 8e5a152 
remote: [ERROR] Error executing Maven. 
remote: [ERROR] The specified user settings file does not exist: /var/lib/openshift/580abfc589f5cf2be2000061/app-root/runtime/repo/.openshift/settings.xml 
remote: An error occurred executing 'gear postreceive' (exit code: 1) 
remote: Error message: CLIENT_ERROR: Failed to execute action hook 'build' for 580abfc589f5cf2be2000061 application pointingpoker 
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option. 

enter image description here

UPDATE

是,目标文件夹是红色的彩色。我已经修改了构建脚本到下面,我看到这个异常部署到openshift。我认为构建脚本已被修改为指向java8,但我仍然是其采用1.7

# call our own mvn script with the right settings 
cd $OPENSHIFT_REPO_DIR 
mvn package -X .openshift/settings.xml -DskipTests=true 

Console Exceptions

git push 
Counting objects: 5, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (5/5), done. 
Writing objects: 100% (5/5), 509 bytes | 0 bytes/s, done. 
Total 5 (delta 3), reused 0 (delta 0) 
remote: Stopping DIY cartridge 
remote: CLIENT_RESULT: Application is already stopped 
remote: Repairing links for 1 deployments 
remote: Building git ref 'master', commit f5f3e76 
remote: Apache Maven 3.0.4 (r1232336; 2012-12-18 14:36:37-0500) 
remote: Maven home: /usr/share/java/apache-maven-3.0.4 
remote: Java version: 1.7.0_111, vendor: Oracle Corporation 
remote: Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.111/jre 
remote: Default locale: en_US, platform encoding: ANSI_X3.4-1968 
remote: OS name: "linux", version: "2.6.32-642.4.2.el6.x86_64", arch: "i386", family: "unix" 
remote: [INFO] Error stacktraces are turned on. 
remote: [DEBUG] Reading global settings from /usr/share/java/apache-maven-3.0.4/conf/settings.xml 
remote: [DEBUG] Reading user settings from /var/lib/openshift/580abfc589f5cf2be2000061/.m2/settings.xml 
remote: [DEBUG] Using local repository at /var/lib/openshift/580abfc589f5cf2be2000061/.m2/repository 
remote: [ERROR] Could not create local repository at /var/lib/openshift/580abfc589f5cf2be2000061/.m2/repository -> [Help 1] 
remote: org.apache.maven.repository.LocalRepositoryNotAccessibleException: Could not create local repository at /var/lib/openshift/580abfc589f5cf2be2000061/.m2/repository 
remote:   at org.apache.maven.DefaultMaven.validateLocalRepository(DefaultMaven.java:504) 
remote:   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:196) 
remote:   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 
remote:   at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) 
remote:   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) 
remote:   at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 
remote:   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
remote:   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
remote:   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
remote:   at java.lang.reflect.Method.invoke(Method.java:606) 
remote:   at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) 
remote:   at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) 
remote:   at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) 
remote:   at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 
remote: [ERROR] 
remote: [ERROR] 
remote: [ERROR] For more information about the errors and possible solutions, please read the following articles: 
remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException 
remote: An error occurred executing 'gear postreceive' (exit code: 1) 
remote: Error message: CLIENT_ERROR: Failed to execute action hook 'build' for 580abfc589f5cf2be2000061 application pointingpoker 
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option. 

enter image description here

回答

0

根据你的文件结构的屏幕截图,你有领先.(点)settings.xml之前。这似乎可能会导致您的问题

+0

我删除'。(点)',但它也没有工作。 – user525146

+0

该死的,那会是如此完美!你有没有结束再次,或不同的相同的错误消息? –

+0

'远程:部署ID为a22a5284 远程:激活部署 远程:启动DIY磁带盒 远程:错误:无法访问jarfile目标/ *。jar remote:-------------- ----------- 远程:Git后收到结果:成功 远程:激活状态:成功 远程:部署完成状态:成功'这就是我看到的错误。链接到云'http:// pointingpoker-agilepoker.rhcloud.com /' – user525146