Java Cargo Maven插件无法下载和解包Jetty zip,原因是;“负寻道偏移”;

Java Cargo Maven插件无法下载和解包Jetty zip,原因是;“负寻道偏移”;,java,maven,jetty,maven-cargo,Java,Maven,Jetty,Maven Cargo,我在运行集成测试时遇到以下错误: Failed to execute goal org.codehaus.cargo:cargo-maven2- plugin:1.1.3:start (start-container) on project <project-name>: Execution start-container of goal org.codehaus.cargo:cargo-maven2- plugin:1.1.3:start failed: Error while

我在运行集成测试时遇到以下错误:

Failed to execute goal org.codehaus.cargo:cargo-maven2- 
plugin:1.1.3:start (start-container) on project <project-name>:
Execution start-container of goal org.codehaus.cargo:cargo-maven2-
plugin:1.1.3:start failed: Error while expanding 
<project>/target/downloads/jetty-6.1.26.zip
[ERROR] java.io.IOException: Negative seek offset
无法执行目标org.codehaus.cargo:cargo-maven2-
插件:1.1.3:在项目上启动(启动容器):
目标org.codehaus.cargo的执行开始容器:cargo-maven2-
插件:1.1.3:启动失败:扩展时出错
/target/downloads/jetty-6.1.26.zip
[错误]java.io.IOException:负寻道偏移量
尽管如此,如果我只是执行mvnjetty:run,它确实会启动服务器。 有没有人遇到过类似的问题,你是如何解决的

以下是我的配置:

    <plugin>
            <!-- http://cargo.codehaus.org/Maven2+Plugin+Reference+Guide -->
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <version>1.1.3</version>
            <executions>
                <execution>
                    <id>start-container</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>start</goal>
                    </goals>
                </execution>
                <execution>
                    <id>stop-container</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>stop</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <wait>false</wait>
                <container>
                    <containerId>jetty6x</containerId>
                    <!-- The 'embedded' container does not seem to support 
                        setting JNDI values through a jetty-env.xml file, see http://jira.codehaus.org/browse/CARGO-861 
                        and http://jira.codehaus.org/browse/CARGO-862 for more information. For now, 
                        we'll use the 'installed' container which works fine, it is just slightly 
                        slower than the embedded version since it is a large distribution (25 mb) 
                        that must be downloaded. -->
                    <type>installed</type>
                    <zipUrlInstaller>
                        <url>http://dist.codehaus.org/jetty/jetty-6.1.26/jetty-6.1.26.zip</url>
                        <downloadDir>${project.build.directory}/downloads</downloadDir>
                        <extractDir>${project.build.directory}/extracts</extractDir>
                    </zipUrlInstaller>
                    <systemProperties>
                        <java.io.tmpdir>target/tmp</java.io.tmpdir>
                        <!-- These "jetty6.*" system properties are used 
                            to set values in the jetty-env.xml file. -->
                        <jetty6.context>Project-NAME</jetty6.context>
                        <jetty6.warFile>${project.build.directory}/project-war.war</jetty6.warFile>
                    </systemProperties>
                    <output>${project.build.directory}/cargo-container.log</output>
                    <log>${project.build.directory}/cargo.log</log>
                    <dependencies>
                        <dependency>
                            <location>${project.basedir}/src/test/keystores/sun/${keystoreType}</location>
                        </dependency>
                        <dependency>
                            <groupId>com.oracle</groupId>
                            <artifactId>ojdbc6</artifactId>
                        </dependency>
                    </dependencies>
                </container>
                <configuration>
                    <home>${project.build.directory}/jetty6x/container</home>
                    <!-- See http://cargo.codehaus.org/Configuration+properties 
                        for possible properties. -->
                    <properties>
                        <cargo.servlet.port>9090</cargo.servlet.port>
                        <cargo.logging>low</cargo.logging>
                        <!-- Enable to debug the server, see http://cargo.codehaus.org/Debugging 
                            for more information. -->
                       <!--  <cargo.jvmargs> -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888 
                            -Xnoagent -Djava.compiler=NONE </cargo.jvmargs> -->
                    </properties>
                    <configfiles>
                        <configfile>
                            <file>${project.basedir}/src/test/keystores/sun/${keystoreType}/jetty-env.xml</file>
                            <todir>contexts</todir>
                            <tofile>project-Name.xml</tofile>
                        </configfile>
                    </configfiles>
                    <deployables>
                        <deployable>
                            <groupId><project-NAME></groupId>
                            <artifactId>project-war</artifactId>
                            <type>war</type>
                            <properties>
                                <context>project-Name</context>
                            </properties>
                        </deployable>
                    </deployables>
                </configuration>
            </configuration>
        </plugin>

org.codehaus.cargo
cargo-maven2-plugin
1.1.3
启动容器
预集成测试
开始
停止容器
整合后测试
停止
假的
码头6X
安装
http://dist.codehaus.org/jetty/jetty-6.1.26/jetty-6.1.26.zip
${project.build.directory}/downloads
${project.build.directory}/extracts
目标/tmp
项目名称
${project.build.directory}/project-war.war
${project.build.directory}/cargo-container.log
${project.build.directory}/cargo.log
${project.basedir}/src/test/keystores/sun/${keystoreType}
com.oracle
ojdbc6
${project.build.directory}/jetty6x/container
9090
低的
${project.basedir}/src/test/keystores/sun/${keystoreType}/jetty-env.xml
上下文
project-Name.xml
战争计划
战争
项目名称
  • 我知道codehaus正在下降,最终将不得不更新。对于什么是轻量级服务器来部署war并作为客户机运行集成测试,有什么建议吗

  • 根本原因:

    是一个死气沉沉的网站。2015年5月17日将100%离线

    现在是结束科德豪斯时代的时候了

    所有Codehaus服务将逐步终止,直至5月17日 2015年

    随着Github等开源托管平台的日益多样化 而Bitbucket——满足了1000多个项目的需求——it 结束Codehaus的开源托管服务是有意义的

    科德豪斯已经亏损经营了好几年了(我们不是 由风险投资推动),无法与 开发人员和集成产品现在已经司空见惯

    然而,该平台将于2015年2月底终止 SonarQube慷慨地提出赞助Codehaus几个月 帮助过渡

    您对dist.codehaus.org的URL访问失败

    http://dist.codehaus.org/jetty/jetty-6.1.26/jetty-6.1.26.zip
    
    其他重要注意事项:

    • 已经发布了25个版本的代码:CARGO-MAVEN2插件< /COD>版本1.1.3,考虑升级。
    • 货物也已经离开了科德豪斯,现在就找到他们
    • 不要使用Jetty 6,它的EOL(寿命终止)从2010年开始
    • Jetty 5和Jetty 6二进制文件(曾经托管在上)将没有替代下载位置
    • 不要使用
    • 9号码头是目前(2015年5月)唯一稳定且受支撑的码头系列

    请使用有意义和描述性的标题。“Jetty无法”是我见过的最糟糕的一个,就像一个被破坏的下载。试着重新下载ZipFile这不是jetty的问题,这是cargo maven插件,或者说maven的问题。另外请注意,jetty 6在2010年是EOL(生命终结)。在生产中在公共互联网上运行Jetty 6是不安全的(在私人/内部网站上运行Jetty 6是可以接受的,没有通往Jetty的公共互联网访问路径)。是的,我可以使用我从其他项目中下载的旧zip来运行Jetty。现在jetty 6x拉链不起作用。将需要使用其他服务器。谢谢