ANT: how to create a jar file including service provider configuration files in META-INF/services

According to ANT jar task, you can define your ant jar task like below (to write service provider configuration files in META-INF/services/):
<jar filesonly="true" destfile="${dist}/${}.jar">
    <service type="javax.imageio.spi.ImageReaderSpi">
        <provider classname="my.image.My1ImageReaderSpi" />
        <provider classname="my.image.My2ImageReaderSpi" />
    <service type="javax.imageio.spi.ImageWriterSpi">
        <provider classname="my.image.My1ImageWriterSpi" />
        <provider classname="my.image.My2ImageWriterSpi" />
    <fileset dir="${build}" includes="**/*" />

No comments:

Post a Comment