ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54761] New: Using jar command to create a jar containing two separate implementations of a service doesn't work
Date Thu, 28 Mar 2013 17:39:07 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54761

            Bug ID: 54761
           Summary: Using jar command to create a jar containing two
                    separate implementations of a service doesn't work
           Product: Ant
           Version: 1.9.0
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
          Assignee: notifications@ant.apache.org
          Reporter: jburgess1024@gmail.com
    Classification: Unclassified

If you are using the jar task to create a jar that contains two implementations
of a service the two classes are concatenated.

So

<macrodef name="build-checker" >
<attribute name="scname" />
<attribute name="extra1" default=""/>
<sequential xmlns:ac="antlib:net.sf.antcontrib">
<jar jarfile="${dist.dir}/@{scname}.jar" >
   <fileset dir="build/@{scname}"/>
   <service type="com.riskdecisions.sanitycheck.SanityCheck">
      <provider classname="com.riskdecisions.sanitycheck.providers.@{scname}"
/>
      <provider classname="com.riskdecisions.sanitycheck.providers.@{extra1}"
/>
   </service>
</jar>
</sequential>
</macrodef>

when called as 
        <build-checker scname="BergChecker" extra1="CheckCluster"/>
results in a file com.riskdecisions.sanitycheck.SanityCheck in the services
folder containing
com.riskdecisions.sanitycheck.providers.BergCheckercom.riskdecisions.sanitycheck.providers.CheckCluster

There should be a new line between the two providers.

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

Mime
View raw message