Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: JBoss EJB spec violation in AbstractStatelessSessionBean?

  1. #11
    Join Date
    Aug 2004
    Location
    Sydney
    Posts
    503

    Default

    Thats good news.

    The other benefit is that you can actually have a remote chance of knowing where a jar came from instead of having a gajillion jar files all in web-inf\lib

  2. #12
    Join Date
    Dec 2005
    Location
    U-241
    Posts
    237

    Default

    Quick question.
    Which ant task are you using to generate lib subdirectory in ear file and put there *.jar files.
    Does ear task have such functionality?
    Spring, it's a wonderful thing...

  3. #13
    Join Date
    Aug 2004
    Location
    Sydney
    Posts
    503

    Default

    <copy> and then <ear>

  4. #14
    Join Date
    Dec 2005
    Location
    U-241
    Posts
    237

    Wink

    After playing a little I am sticking with zipfileset with attribute lib or lib/spring or lib/whatever.
    Like this
    Code:
    <target name="make-ear" description="Should be called either from ear or ear-compile">
            <mkdir dir="${distribution.dir}" />
            <ear destFile="${distribution.dir}/${ear.name}" appxml="${meta-inf.dir}/application.xml">
                <!-- jars to be included from these dirs -->
                <fileset dir="${common.jar.dir}" />
                <fileset dir="${dao.jar.dir}" />
                <fileset dir="${facade.jar.dir}" />
                <fileset dir="${webapp.war.dir}" />
                <!-- include jboss-app.xml -->
                <metainf dir="${meta-inf.dir}">
                    <include name="jboss-app.xml" />
                </metainf>
                 <!-- here you go!!! -->
                <zipfileset dir="${lib.dir}" prefix="lib"/>
            </ear>
        </target>
    Wouldn't be nice to have a dedicated lib element in ear target as we have in war?
    Code:
    <war destfile="myapp.war" webxml="src/metadata/myapp.xml">
      <fileset dir="src/html/myapp"/>
      
      <lib dir="thirdparty/libs">
        <exclude name="jdbc1.jar"/>
      </lib>
      
    </war>
    Spring, it's a wonderful thing...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •