0

我正在按照heroku guide玩 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阅读了有关错误的信息,但似乎我必须配置一个 settings.xml 文件(在 heroku 上?)如果这是解决方案,我该怎么做它?

如果没有……还有其他想法吗?

这是我的 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

谢谢!祝你今天过得愉快!

4

1 回答 1

0

由于 pom似乎位于 maven central 中,这听起来像是一个 heroku 问题,您应该联系 heroku 支持。您可以在https://help.heroku.com/打开 Heroku 支持的票证。

于 2013-03-23T14:05:00.993 回答