我正在使用Java和heroku,跟隨heroku guide。 但幾乎沒有修改。在這種情況下,我使用JDK 1.7,碼頭8.1.2.v20120308和Maven插件的依賴2.7(因爲好像,2.4無法建立)無法在部署到heroku時收集Java HelloWorld中的Maven依賴關係
所有與
MVN包
確定當地建造
但是當我使用
混帳推Heroku的主
部署在Heroku上,我得到這個消息:(?在Heroku)
[ERROR] Failed to execute goal on project helloart: Could not resolve dep
endencies for project main.java:helloart:jar:1.0-SNAPSHOT: Failed to collect dep
endencies for [org.eclipse.jetty:jetty-servlet:jar:8.1.2.v20120308 (compile), ja
vax.servlet:servlet-api:jar:2.5 (compile)]: Failed to read artifact descriptor f
or org.eclipse.jetty:jetty-servlet:jar:8.1.2.v20120308: Could not transfer artif
act org.eclipse.jetty:jetty-parent:pom:19 from/to centralMirror (http://s3posito
ry.heroku.com/jvm/): Error transferring file: Server returned HTTP response code
: 503 for URL: http://s3pository.heroku.com/jvm/org/eclipse/jetty/jetty-parent/1
9/jetty-parent-19.pom -> [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, ple
ase read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/Depende
ncyResolutionException
! Failed to build app with Maven
! Heroku push rejected, failed to compile Java app
To [email protected]:aqueous-castle-5897.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:aqueous-castle-5897.git'
我在http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException閱讀有關錯誤,但似乎我必須配置settings.xml文件如果是這樣的解決方案,如何我能做到嗎?
如果沒有...任何其他的想法?
這是我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>main.java</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>helloart</artifactId>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>8.1.2.v20120308</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals><goal>copy-dependencies</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
這是我system.properties
java.runtime.version=1.7
謝謝! 祝您有美好的一天!
謝謝!我剛剛在heroku開了一張票。讓我們看看他們的意見... – ArtStack 2013-03-23 15:55:03