Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
部署到heroku时未能在Java HelloWorld中收集Maven依赖项_Java_Maven_Heroku_Maven Dependency Plugin_Jetty 8 - Fatal编程技术网

部署到heroku时未能在Java HelloWorld中收集Maven依赖项

部署到heroku时未能在Java HelloWorld中收集Maven依赖项,java,maven,heroku,maven-dependency-plugin,jetty-8,Java,Maven,Heroku,Maven Dependency Plugin,Jetty 8,我正在玩Java和heroku。 但几乎没有修改。在本例中,我使用JDK1.7、Jetty 8.1.2.v20120308和Maven dependencies插件2.7(因为似乎无法构建2.4) 所有的都是本地建造的 mvn包 但是当我使用 git推送heroku主机 要在heroku上部署,我收到以下消息: [ERROR] Failed to execute goal on project helloart: Could not resolve dep endencies fo

我正在玩Java和heroku。 但几乎没有修改。在本例中,我使用JDK1.7、Jetty 8.1.2.v20120308和Maven dependencies插件2.7(因为似乎无法构建2.4)

所有的都是本地建造的

mvn包

但是当我使用

git推送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'
我在上读到有关错误的信息,但似乎我必须配置一个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>
谢谢大家!! 祝你今天愉快

自从pom以来,这听起来像是一个heroku问题,您应该联系heroku支持部门。您可以在打开Heroku support的票证

java.runtime.version=1.7