Thanks for that.

I modified the goal ejb:ejb-client so it copies the stubs into the
directory where the jar is build:

<goal name="ejb:ejb-client" prereqs="ejb:ejb" description="Build a
client ejb file">
        <!-- my code --> 
      <copy todir="${maven.build.dest}">
            <fileset
dir="${maven.was5.ejbDeploy.workingdir}/${pom.name}-${pom.currentVersion
}._/${pom.name}-${pom.currentVersion}.jar/ejbModule">
              <include name="**/*Stub.class"/>
            </fileset>
      </copy>
    <ant:jar jarfile="${maven.build.dir}/${maven.final.name}-client.jar"
             basedir="${maven.build.dest}"
 
excludes="${maven.ejb.client.base.excludes},${maven.ejb.client.excludes}
"
             index="${maven.ejb.client.index}"
             >
    </ant:jar>
  </goal>
Oren 


-----Original Message-----
From: Harald Ommang [mailto:[EMAIL PROTECTED]
Sent: 21 October 2004 09:50
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: How to include stubs in ejb-client jar?


Hi, Oren.

What I did to work around this, is to create the postGoal 
below in my main maven.xml.
After the ejb is created, this goal uses the was5 plugin 
to generate an ejb.jar with stubs and replaces the ejb in 
its original target location. Then this is unjared to the 
was5 plugin working dir, then jared back into a client 
jar, with the same exceptions as can be set for the 
ejb:ejb-client goal. Perhaps a bit messy, but it works 
well for me!

Harald


<postGoal name="ejb:ejb">
 
<!--==================================================================--
>
     <!-- Generate deployment code and stubs in ejb jar 
                   -->
 
<!--==================================================================--
>
     <attainGoal name="was5:ejbDeploy"/>

 
<!--==================================================================--
>
     <!-- Copy jar with deploymentcode back to original 
                   -->
 
<!--==================================================================--
>
     <ant:copy preservelastmodified="true"
         file="${maven.was5.ejbDeploy.file.out}"
         tofile="${maven.was5.ejbDeploy.file}"/>
 
<!--==================================================================--
>
   <!-- Builds an ejb client jar file 
                                   -->
 
<!--==================================================================--
>
       <ant:unjar
         src="${maven.was5.ejbDeploy.file.out}"
         dest="${maven.was5.ejbDeploy.workingdir}"
       />
   
     <ant:jar 
jarfile="${maven.build.dir}/${maven.final.name}-client.jar"
              basedir="${maven.was5.ejbDeploy.workingdir}"
 
excludes="${maven.ejb.client.base.excludes},${maven.ejb.client.excludes}
"
              index="${maven.ejb.client.index}"
              >
     </ant:jar>
</postGoal>




****************************************************************************

This email and any files transmitted with it contain information that may be
confidential or privileged, and are intended solely for the use of the
individual or entity to whom they are addressed. If you are not the intended
recipient any disclosure, copying, distribution or use of the information is
prohibited. If you have received this email in error, please notify me by
return email immediately. Any opinions expressed are those of the author,
not of Morpheus Limited.


This message has been checked for all known viruses by UUNET delivered 
through the MessageLabs Virus Control Centre.

****************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to