Cargo Maven Plugin is unable to download and unpack Jetty zip due to "Negative Search Offset"

  • I am facing the below error while running my integration tests:

    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
    
          

Although if I just do mvn jetty: run it starts the server. Anyone faced similar issue, how did you solve it?

here is the config I have:

    <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>

      

  1. I know Codehaus is going down, eventually will have to be updated. Any suggestions for what would be a lightweight server to deploy war and run integration tests as a client?
+3


source to share


1 answer


The main reason:

Codehaus.org is a dead website. It will be 100% disabled on May 17, 2015.

It's time to end the Codehaus era.

All Codehaus services will be terminated before May 17, 2015

With the growing diversity in open source platforms like Github and Bitbucket - which cater to the needs of 1000 projects - it makes sense to end the open source hosting services of Codehaus.

Codehaus has been at a loss for several years now (we're not venture capital based) and can't compete with the army of developers and integrated products that are now commonplace.

The platform was supposed to be discontinued at the end of February 2015, however SonarQube has kindly offered to sponsor Codehaus for several months to help with the transition.

Error accessing the dist.codehaus.org url.



<url>http://dist.codehaus.org/jetty/jetty-6.1.26/jetty-6.1.26.zip</url>

      

Other important notes:

  • There have been 25 releases since version 1.1.3, please cargo-maven2-plugin

    consider updating.
  • Cargo has also moved away from codebase , now find codehaus-cargo.github.io .
  • Don't use Jetty 6, its EOL (end of life) from 2010.
  • There will be no download space for Jetty 5 and Jetty 6, which were once hosted at dist.codehaus.org .
  • Don't use Jetty 7 or Jetty 8, this is EOL from 2014 .
  • Jetty 9 is the only stable and supported Jetty series at this point in time (May 2015).
+1


source







All Articles