1 Reply Latest reply on Jan 8, 2009 2:46 AM by Chua Khoon Yong

    Seam 2.1.1GA\examples\build.xml <filterset>

    Chua Khoon Yong Novice


      Previously my project in Seam 2.1.0SP1 was working fine, until i port over to 2.1.1GA.  I found that some of the external jars files that i copy was corrupted.

      In my project build file, i redefine jar.extras

          <fileset id="jar.extras" dir="lib">
              <include name="jcommon.jar" />
              <include name="jfreechart.jar"/>

      Then i notice why the 2 jar files were corrupted, it is due to the filterset in examples,build.xml:

           <!-- Build the exploded jar -->
           <target name="jar" depends="compile">
                <copy todir="${jar.dir}">
                     <fileset refid="jar.resources" />
                     <fileset refid="jar.extras" />
                          <filter token="distributable" value="${distributable}" />

      Please see this web page: Ant Filterset Manual Page

      A portion of the web page says:

      Note: When a filterset is used in an operation, the files are processed in text mode and the filters applied line by line. This means that the copy operations will typically corrupt binary files. When applying filters you should ensure that the set of files being filtered are all text files.

      Please help,

        • 1. Re: Seam 2.1.1GA\examples\build.xml <filterset>
          Chua Khoon Yong Novice


          I resolve the issue by putting the 2 jars inside the ear package, as follows:

              <fileset id="ear.lib.extras" dir="." description="extra jars for the EAR">
                  <include name="lib/commons-logging-1.0.4.jar" />
                  <include name="lib/commons-collections-3.2.jar" />
                  <include name="lib/jcommon.jar" />
                  <include name="lib/jfreechart.jar"/>

          But i am still not sure why the filterset is used in the jar.extras section, because this may corrupt any jar files used there.