The following issue has been updated:
Updater: Ben Walding (mailto:[EMAIL PROTECTED])
Date: Sun, 3 Aug 2003 9:09 PM
Comment:
Removed xml breaking characters.
Changes:
description changed from Behavior of my application is controlled through
set of configuration files(like log4j.propertrties).
I want to control behavior of my application differently for the test
environment and differently for the production environment.
The problem is that currently in maven the "production" resources are preceding the
test resources in the classpath
and [test] plugin is always taking them in first order.
I am including short example showing where is the problem.
Basically in it I have two log4j.properties files: one in
'test-resources', second in 'resources' directory.
This example shows that the the one kept in test-resources is never used and it is not
possible to easily control
the "test environment" when it is overlapping with "production'
environment".
As a result of this program the output of log statements is always written to
production.log. Test resources are containing log4j.properties file which configures
the log system for tests and directs log statements to a file test.log. This example
shows that
this file is never created.
Other problem here is: if any of the dependencies in the classpath contains
log4j.properties this file will even preceeds the lo4j.properties in the classpath.
So the best solution in my opinion will be to have followiing order of entries in the
class path:
<classpath>
<pathelement location="${maven.test.dest}"/>
<path refid="maven.dependency.classpath"/>
<pathelement location="${maven.build.dest}"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
</classpath>
The problem is generic and not only typical to log4j. The same applies for example to
jndi.properties.
Michal Maczka
environment changed to
timeoriginalestimate changed from 0
timeestimate changed from 0 minutes
---------------------------------------------------------------------
For a full history of the issue, see:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-309&page=history
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-309
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-309
Summary: Order of classpath entries should be changed
Type: Bug
Status: Unassigned
Priority: Major
Time Spent: Unknown
Remaining: Unknown
Project: maven
Components:
plugin-test
Versions:
1.0-beta-9
Assignee:
Reporter: Michal Maczka
Created: Mon, 3 Mar 2003 5:07 AM
Updated: Sun, 3 Aug 2003 9:09 PM
Description:
Behavior of my application is controlled through set of configuration files(like
log4j.propertrties).
I want to control behavior of my application differently for the test
environment and differently for the production environment.
The problem is that currently in maven the "production" resources are preceding the
test resources in the classpath
and [test] plugin is always taking them in first order.
I am including short example showing where is the problem.
Basically in it I have two log4j.properties files: one in
'test-resources', second in 'resources' directory.
This example shows that the the one kept in test-resources is never used and it is not
possible to easily control
the "test environment" when it is overlapping with "production'
environment".
As a result of this program the output of log statements is always written to
production.log. Test resources are containing log4j.properties file which configures
the log system for tests and directs log statements to a file test.log. This example
shows that
this file is never created.
Other problem here is: if any of the dependencies in the classpath contains
log4j.properties this file will even preceeds the log4j.properties in the classpath.
So the best solution in my opinion will be to have followiing order of entries in the
class path:
<classpath>
<pathelement location="${maven.test.dest}"/>
<path refid="maven.dependency.classpath"/>
<pathelement location="${maven.build.dest}"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
</classpath>
The problem is generic and not only typical to log4j. The same applies for example to
jndi.properties.
Michal Maczka
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]