You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Ido M. Tamir" <ta...@imp.univie.ac.at> on 2006/05/12 17:37:37 UTC
log4j.properties expendable and ignored
Hi,
I am using maven 2.0.4
I have log4j.properties file in src/test/resources and
src/main/resources.
after compilation directory structure:
-- test-classes
| |-- hibernate.cfg.xml
| |-- import.properties
| |-- log4j.properties
| `-- org
The settings in this file are ignored in unit tests
and other settings (assembly...).
When I remove both files log4j doesn't even
complain.
The log level always seems to be info.
This is also true for unit test run from
eclipse (I use mvn eclipse:eclipse)
This is independent of having commons-logging
as a dependency or not.
thank you very much for your suggestions
ido
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: log4j.properties expendable and ignored
Posted by Arik Kfir <ar...@gmail.com>.
LOL! :)
On 5/13/06, Ido M. Tamir <ta...@imp.univie.ac.at> wrote:
> On Saturday 13 May 2006 09:42, Olivier Lamy wrote:
> > Look at http://jira.codehaus.org/browse/MSUREFIRE-108
> >
> > But AFAIK it works with maven-surefire-plugin:2.1.3 but not with
> > snapshot version.
> >
>
> Thanks for all your replies.
> I forgot to include log4j in my classpath (duh).
>
> It now works as expected.
>
> thank you very much
> ido
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
______________________________________
Cheers,
Arik Kfir arikkfir@gmail.com
Linux user, number 415067 - http://counter.li.org/
http://corleon.dnsalias.org
Re: log4j.properties expendable and ignored
Posted by "Ido M. Tamir" <ta...@imp.univie.ac.at>.
On Saturday 13 May 2006 09:42, Olivier Lamy wrote:
> Look at http://jira.codehaus.org/browse/MSUREFIRE-108
>
> But AFAIK it works with maven-surefire-plugin:2.1.3 but not with
> snapshot version.
>
Thanks for all your replies.
I forgot to include log4j in my classpath (duh).
It now works as expected.
thank you very much
ido
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE : log4j.properties expendable and ignored
Posted by Olivier Lamy <ol...@accor.com>.
Look at http://jira.codehaus.org/browse/MSUREFIRE-108
But AFAIK it works with maven-surefire-plugin:2.1.3 but not with
snapshot version.
- Olivier
-----Message d'origine-----
De : Arik Kfir [mailto:arikkfir@gmail.com]
Envoyé : samedi 13 mai 2006 09:37
À : Maven Users List
Objet : Re: log4j.properties expendable and ignored
have you checked the issues for the surefire project, or the
surefire-plugin?
On 5/13/06, Simon Kitching <sk...@apache.org> wrote:
> Hi,
>
> I've just gone through all the JIRA issues for SUREFIRE and can't see
> any such issue. If it is true that src classes come before test
> classes then I agree an issue should be raised. Ido, you could just
> add a test which does
> System.out.println(
>
> this.getClassLoader().getResource("log4j.properties").toString());
> or similar to see which log4j properties file is seen first.
>
> Another possibility for the log4j.properties being ignored is that
> there is a log4j.xml file in the classpath somewhere. Config files in
> xml format are used in preference to ones in properties format.
>
> Regards,
>
> Simon
>
> On Sat, 2006-05-13 at 02:47 +0300, Arik Kfir wrote:
> > I think there's a JIRA on the surefire plugin which gives precedence
> > to the main classes over the test classes - hence the
> > log4j.properties in src/main/resources is used before the
> > src/test/resources's file is loaded.
> >
> >
> >
> > On 5/12/06, Ido M. Tamir <ta...@imp.univie.ac.at> wrote:
> > > Hi,
> > >
> > > I am using maven 2.0.4
> > > I have log4j.properties file in src/test/resources and
> > > src/main/resources.
> > >
> > > after compilation directory structure:
> > >
> > > -- test-classes
> > > | |-- hibernate.cfg.xml
> > > | |-- import.properties
> > > | |-- log4j.properties
> > > | `-- org
> > >
> > > The settings in this file are ignored in unit tests
> > > and other settings (assembly...).
> > > When I remove both files log4j doesn't even
> > > complain.
> > >
> > > The log level always seems to be info.
> > > This is also true for unit test run from
> > > eclipse (I use mvn eclipse:eclipse)
> > >
> > > This is independent of having commons-logging
> > > as a dependency or not.
> > >
> > > thank you very much for your suggestions
> > > ido
> > >
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > > ---
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
______________________________________
Cheers,
Arik Kfir arikkfir@gmail.com
Linux user, number 415067 - http://counter.li.org/
http://corleon.dnsalias.org
This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: log4j.properties expendable and ignored
Posted by Arik Kfir <ar...@gmail.com>.
have you checked the issues for the surefire project, or the surefire-plugin?
On 5/13/06, Simon Kitching <sk...@apache.org> wrote:
> Hi,
>
> I've just gone through all the JIRA issues for SUREFIRE and can't see
> any such issue. If it is true that src classes come before test classes
> then I agree an issue should be raised. Ido, you could just add a test
> which does
> System.out.println(
> this.getClassLoader().getResource("log4j.properties").toString());
> or similar to see which log4j properties file is seen first.
>
> Another possibility for the log4j.properties being ignored is that there
> is a log4j.xml file in the classpath somewhere. Config files in xml
> format are used in preference to ones in properties format.
>
> Regards,
>
> Simon
>
> On Sat, 2006-05-13 at 02:47 +0300, Arik Kfir wrote:
> > I think there's a JIRA on the surefire plugin which gives precedence
> > to the main classes over the test classes - hence the log4j.properties
> > in src/main/resources is used before the src/test/resources's file is
> > loaded.
> >
> >
> >
> > On 5/12/06, Ido M. Tamir <ta...@imp.univie.ac.at> wrote:
> > > Hi,
> > >
> > > I am using maven 2.0.4
> > > I have log4j.properties file in src/test/resources and
> > > src/main/resources.
> > >
> > > after compilation directory structure:
> > >
> > > -- test-classes
> > > | |-- hibernate.cfg.xml
> > > | |-- import.properties
> > > | |-- log4j.properties
> > > | `-- org
> > >
> > > The settings in this file are ignored in unit tests
> > > and other settings (assembly...).
> > > When I remove both files log4j doesn't even
> > > complain.
> > >
> > > The log level always seems to be info.
> > > This is also true for unit test run from
> > > eclipse (I use mvn eclipse:eclipse)
> > >
> > > This is independent of having commons-logging
> > > as a dependency or not.
> > >
> > > thank you very much for your suggestions
> > > ido
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
______________________________________
Cheers,
Arik Kfir arikkfir@gmail.com
Linux user, number 415067 - http://counter.li.org/
http://corleon.dnsalias.org
Re: log4j.properties expendable and ignored
Posted by Simon Kitching <sk...@apache.org>.
Hi,
I've just gone through all the JIRA issues for SUREFIRE and can't see
any such issue. If it is true that src classes come before test classes
then I agree an issue should be raised. Ido, you could just add a test
which does
System.out.println(
this.getClassLoader().getResource("log4j.properties").toString());
or similar to see which log4j properties file is seen first.
Another possibility for the log4j.properties being ignored is that there
is a log4j.xml file in the classpath somewhere. Config files in xml
format are used in preference to ones in properties format.
Regards,
Simon
On Sat, 2006-05-13 at 02:47 +0300, Arik Kfir wrote:
> I think there's a JIRA on the surefire plugin which gives precedence
> to the main classes over the test classes - hence the log4j.properties
> in src/main/resources is used before the src/test/resources's file is
> loaded.
>
>
>
> On 5/12/06, Ido M. Tamir <ta...@imp.univie.ac.at> wrote:
> > Hi,
> >
> > I am using maven 2.0.4
> > I have log4j.properties file in src/test/resources and
> > src/main/resources.
> >
> > after compilation directory structure:
> >
> > -- test-classes
> > | |-- hibernate.cfg.xml
> > | |-- import.properties
> > | |-- log4j.properties
> > | `-- org
> >
> > The settings in this file are ignored in unit tests
> > and other settings (assembly...).
> > When I remove both files log4j doesn't even
> > complain.
> >
> > The log level always seems to be info.
> > This is also true for unit test run from
> > eclipse (I use mvn eclipse:eclipse)
> >
> > This is independent of having commons-logging
> > as a dependency or not.
> >
> > thank you very much for your suggestions
> > ido
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: log4j.properties expendable and ignored
Posted by Arik Kfir <ar...@gmail.com>.
I think there's a JIRA on the surefire plugin which gives precedence
to the main classes over the test classes - hence the log4j.properties
in src/main/resources is used before the src/test/resources's file is
loaded.
On 5/12/06, Ido M. Tamir <ta...@imp.univie.ac.at> wrote:
> Hi,
>
> I am using maven 2.0.4
> I have log4j.properties file in src/test/resources and
> src/main/resources.
>
> after compilation directory structure:
>
> -- test-classes
> | |-- hibernate.cfg.xml
> | |-- import.properties
> | |-- log4j.properties
> | `-- org
>
> The settings in this file are ignored in unit tests
> and other settings (assembly...).
> When I remove both files log4j doesn't even
> complain.
>
> The log level always seems to be info.
> This is also true for unit test run from
> eclipse (I use mvn eclipse:eclipse)
>
> This is independent of having commons-logging
> as a dependency or not.
>
> thank you very much for your suggestions
> ido
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
______________________________________
Cheers,
Arik Kfir arikkfir@gmail.com
Linux user, number 415067 - http://counter.li.org/
http://corleon.dnsalias.org