ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43028] New: - jar task's <service> element generates incorrect directory name
Date Sat, 04 Aug 2007 02:56:02 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43028>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43028

           Summary: jar task's <service> element generates incorrect
                    directory name
           Product: Ant
           Version: 1.7.0
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: amy.fowler@sun.com


I'm using the <service> element in the jar task to generate the appropriate
files to load a service via Java6's java.util.ServiceLoader.

The jar task is incorrectly generating the directory as "service" when it should
be "services", and thus the service loading fails.

I believe the error could easily be fixed in org/apache/tools/ant/taskdefs;

     private void writeServices(ZipOutputStream zOut) throws IOException {
        Iterator serviceIterator;
        Service service;

        serviceIterator = serviceList.iterator();
        while (serviceIterator.hasNext()) {
           service = (Service) serviceIterator.next();
           //stolen from writeManifest
           super.zipFile(service.getAsStream(), zOut,
                         "META-INF/service/" + service.getType(), //should be
"services"
                         System.currentTimeMillis(), null,
                         ZipFileSet.DEFAULT_FILE_MODE);
        }
    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message