1 Reply Latest reply on Jan 8, 2009 2:46 AM by chuaky

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

    chuaky

      hi,


      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"/>
          </fileset>




      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" />
                     <filterset>
                          <filter token="distributable" value="${distributable}" />
                     </filterset>  
                </copy>
           </target>




      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,
      Thanks.

        • 1. Re: Seam 2.1.1GA\examples\build.xml <filterset>
          chuaky

          hi,


          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"/>
              </fileset>



          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.