History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CASTOR-2163
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Werner Guttmann
Reporter: Werner Guttmann
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
castor

Remove all log4j configurationss from binary JARs

Created: 23/Sep/07 04:31 AM   Updated: 14/Mar/08 06:41 AM
Component/s: General
Affects Version/s: 1.1.2.1
Fix Version/s: 1.2

Time Tracking:
Original Estimate: 1 hour
Original Estimate - 1 hour
Remaining Estimate: 40 minutes
Time Spent - 20 minutes Remaining Estimate - 40 minutes
Time Spent: 20 minutes
Time Spent - 20 minutes Remaining Estimate - 40 minutes


 Description  « Hide
Currently, many binary JARs as created during the build process (using Ant, that is) will include a log4j.xml at the root level. This is strictly incorrect, and needs to be fixed.

I think a mechanism such as Maven uses it to distinguish between test and non-test artifacts would be sufficient.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Werner Guttmann - 24/Sep/07 02:53 AM
Actually, the problem is with lines like these (taken from xmlctf/build.xml) ...
        <copy todir="${classes}">
            <fileset dir="${test.resources}">
                <include name="log4j.xml"/>
            </fileset>
        </copy>

which apparently copy test resources into the (main) build class path, and that is wrong. Test resources should not end up in release JARs, and used for testing only.

I suggest to mimic Maven's behavior of creating additional build/test-classes directories, and copy test classes as well as test-resources to this new place. This location can subsequently be referenced from scripts that e.g. start a CTF test suite.

Personal comment: it's about time to drop Ant, as we are coding something in Ant build files that has been solved elsewhere already.


Werner Guttmann - 24/Sep/07 02:54 AM
Above Ant build file fragment should be changed to
<copy todir="${test.classes}">
   <fileset dir="${test.resources}">
      <include name="log4j.xml"/>
   </fileset>
</copy>

and a new Ant property named 'test.classes' should be defined.


Werner Guttmann - 01/Jan/08 04:54 PM
In addition, I just verified that log4j.xml files won't be included in production binaries anymore.