Bug 17961 - New task to collect services from a JAR
Summary: New task to collect services from a JAR
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: unspecified
Hardware: All other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2003-03-13 16:51 UTC by Berin Loritsch
Modified: 2009-07-30 07:37 UTC (History)
0 users



Attachments
ServiceCollector source code (9.84 KB, text/plain)
2003-03-13 16:52 UTC, Berin Loritsch
Details
Newer version that actually works--I forgot to copy the contents of the jar entries before (10.27 KB, text/plain)
2003-03-13 19:38 UTC, Berin Loritsch
Details
Ok This version officially works. The last time my copy and paste overwrote the part that actually wrote the results of the services collection (10.99 KB, text/plain)
2003-03-13 19:52 UTC, Berin Loritsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Berin Loritsch 2003-03-13 16:51:06 UTC
Enclosed is an Ant Task I wrote to support another project.  It seems general
enough to me to make available in Ant itself.  It takes an input JAR, and looks
at all classes in the JAR.  It tests to see if they are an implementation of
the specified service(s).

If there happens to be a class that implements more than one service, it will
appear in every service definition that it applies to.
Comment 1 Berin Loritsch 2003-03-13 16:52:00 UTC
Created attachment 5314 [details]
ServiceCollector source code
Comment 2 Berin Loritsch 2003-03-13 19:38:43 UTC
Created attachment 5327 [details]
Newer version that actually works--I forgot to copy the contents of the jar entries before
Comment 3 Berin Loritsch 2003-03-13 19:44:02 UTC
You use this taks like this:

        <taskdef name="collect-services"
classname="org.d_haven.guiapp.tools.ServiceCollector">
          <classpath>
            <path refid="project.class.path"/>
            <pathelement path="${tools.dir}/guiapp-tools.jar"/>
          </classpath>
        </taskdef>
        
            
         <collect-services inputjar="input-temp.jar"
                           outputjar="output.jar">
             <service name="org.d_haven.guiapp.roles.Screen"/>
             <service name="org.apache.excalibur.event.command.Command"/>
         </collect-services>
Comment 4 Berin Loritsch 2003-03-13 19:52:25 UTC
Created attachment 5328 [details]
Ok This version officially works.  The last time my copy and paste overwrote the part that actually wrote the results of the services collection