Skip to content

JAR entry not found when JAR is updated inline and cached by URLConnection #2

Closed
@eicki

Description

@eicki

We've been using maven-assembly-plugin 2.5.5 which depends on plexus-io 2.6.
Additionally our assembly unpacks jar dependencies.
From time to time this failed stating that "JAR entry ... not found" in our jar that we want to unpack, this didn't occur that often so we didn't care. But for some unknown reason after we upgraded our Jenkins to a recent version (especially we now use Java 7 instead of Java 6) the assembly step in our build started to fail in 50% of all cases.
While the root cause is unclear we found a remedy for it, namely to change PlexusIoUrlResource in the following way:

Replace
return url.openStream();
by
URLConnection uc = url.openConnection(); uc.setUseCaches(false); return uc.getInputStream();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions