2016-10-22 57 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