ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Error in <jar> found?
Date Thu, 23 Jan 2003 09:03:27 GMT
ok,

an empty zip is not allowed therefore the check against "zip".
Because of the existence of manifest.mf a jar can´t be empty and therefore
no check 
against "jar".
Maybe a hint would be useful:

Zip.java
--------
    public void execute() throws BuildException {
        checkCondition(); // Hook for Subclasses
        ...
    }

Jar.java
--------
    checkCondition() {
        if (baseDir == null && filesets.size() == 0
            && groupfilesets.size() == 0 && "jar".equals(archiveType)) {
            log("basedir attribute not set - your jar could only contain the
manifest.mf", Project.MSG_VERBOSE);
        }
    }

(not tested, only a thought)


Jan Matèrne

-----Ursprüngliche Nachricht-----
Von: Stefan Bodewig [mailto:bodewig@apache.org]
Gesendet am: Donnerstag, 23. Januar 2003 09:57
An: ant-dev@jakarta.apache.org
Betreff: Re: Error in <jar> found?

On Thu, 23 Jan 2003, Jan Materne <Jan.Materne@rzf.fin-nrw.de> wrote:

> Maybe you can set the basedir to the current directory (and excludes
> the archive itself).

I think that would be wrong (as it violated the contract for Zip), the
correct solution is that Jar has to check for the manifest itself.

The reason for "zip".equals(...) is that it would be perfectly legal
to construct a jar file with only a manifest specified using a nested
<manifest> in it.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message