ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51096] New: jar task, nested element "service" not merged
Date Wed, 20 Apr 2011 17:06:58 GMT

           Summary: jar task, nested element "service" not merged
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core tasks

Using multiple services in different jar files, then using a single jar file,

Let there be a service "X", and let there be providers Alpha,Beta,Gamma.

A.jar contains provider Alpha
B.jar contains provider Beta

C.jar provides provides Gamma, and includes A.jar and B.jar as zipfilesets.

I would except it to be possible to create C.jar in a way that the service
descriptor files are merged, but this does not seem to be the case. With either
of the jar task's manifest affecting options, the result is separate files in
the archive, with the same filename.

>From what I have seen so far, only the "duplicate" property affects the
resulting descrpitor files, but it does not have the option to merge, so it's
of no use.

When creating the jar file C.jar, there are (in case duplicate is not on
"preserve") multiple entries of the same descriptor file, as the format allows
this; however, the ServiceLoader only parses the first such file, causing
failures in some of my applications.

My current workaround is simply to extract the jar files, manually rearrange
the service descriptors, then repackage them.

Am I doing someting wrong? Is it possible to alter the build file so the
service descriptors are merged?

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message