私はherokuガイドに従ってJavaとherokuで遊んでいます。しかし、いくつかの変更があります。この場合、JDK 1.7、Jetty 8.1.2.v20120308、および Maven 依存関係プラグイン 2.7 を使用します (2.4 はビルドできなかったようです)。
すべてがローカルで正常に構築されています
mvn パッケージ
しかし、私が使用するとき
git push 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 git@heroku.com:aqueous-castle-5897.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:aqueous-castle-5897.git'
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExceptionでエラーについて読みましたが、(heroku で) 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
ありがとうございました!良い1日を!