You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paolo Bacci <pa...@longadata.com> on 2006/12/19 18:37:12 UTC

Multi-module and resource files

Hi all,

I have a maven multi-module project and I got a simple question about
classpath. I want to know where Maven will lookup resource files (such
as log4j.properties files) by default to include in the classpath in
the case of a multi-module setup.

Or, if no such directory exists by default, should I add a classpath
entry to the main project's POM?

Thanks in advance,

Paolo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module and resource files

Posted by Rémy Sanlaville <re...@gmail.com>.
Perhaps your problem do not come from your Maven configuration.

Did you try to check your log4j configuration file ?
http://www.google.com/search?hl=en&q=log4j%3AWARN+No+appenders+could+be+found+for+logger

Remy

Re: Multi-module and resource files

Posted by Jan Kauffman <ja...@gmail.com>.
Yes, I tryed it, but I keep receiving the same warning...

log4j:WARN No appenders could be found for logger.
> log4j:WARN Please initialize the log4j system properly.
>

J. Kauffman

On 12/22/06, Rémy Sanlaville <re...@gmail.com> wrote:
>
> Did you try to copy your log4j properties file in src/test/resources ?
>
> Rémy
>
>

Re: Multi-module and resource files

Posted by Rémy Sanlaville <re...@gmail.com>.
Did you try to copy your log4j properties file in src/test/resources ?

Rémy

Re: Multi-module and resource files

Posted by Jan Kauffman <ja...@gmail.com>.
That's not really what I meant.
I'm able to add it to the jar, but I coudn't find a way of including
it to the classpath when I'm testing the project before creating the
jar file.
I mean. When I run 'mvn test', maven gives me a warn saying that there
are no appenders for log4j, but after I create the jar and run it
directly from the jar, it works well, with no warnings.
Any help is appreciated

J. Kauffman

On 12/21/06, Antonio Parolini <An...@hcuge.ch> wrote:
>
> Just put all *.properties files into src/main/resources, as they'll be added
> into your jar automatically
>
> HTH.
>
> Tony.
>
> see:
> http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
>
> Jan Kauffman wrote:
> >
> > I'm having the same problem trying to include my log4j.properties file on
> > my
> > project.
> > I made it work when I create the jar file, including it into the manifest,
> > but when I try to 'run mvn test' command, it still answers me that log4j
> > has
> > no appenders.
> > Does anybody know how to help solve this problem?
> >
> > thanks
> > J. Kauffman
> >
> > On 12/19/06, Paolo Bacci <pa...@longadata.com> wrote:
> >>
> >> Hi all,
> >>
> >> I have a maven multi-module project and I got a simple question about
> >> classpath. I want to know where Maven will lookup resource files (such
> >> as log4j.properties files) by default to include in the classpath in
> >> the case of a multi-module setup.
> >>
> >> Or, if no such directory exists by default, should I add a classpath
> >> entry to the main project's POM?
> >>
> >> Thanks in advance,
> >>
> >> Paolo
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Multi-module-and-resource-files-tf2847239s177.html#a8013721
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: Multi-module and resource files

Posted by Antonio Parolini <An...@hcuge.ch>.
Just put all *.properties files into src/main/resources, as they'll be added
into your jar automatically

HTH.

Tony.

see:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

Jan Kauffman wrote:
> 
> I'm having the same problem trying to include my log4j.properties file on
> my
> project.
> I made it work when I create the jar file, including it into the manifest,
> but when I try to 'run mvn test' command, it still answers me that log4j
> has
> no appenders.
> Does anybody know how to help solve this problem?
> 
> thanks
> J. Kauffman
> 
> On 12/19/06, Paolo Bacci <pa...@longadata.com> wrote:
>>
>> Hi all,
>>
>> I have a maven multi-module project and I got a simple question about
>> classpath. I want to know where Maven will lookup resource files (such
>> as log4j.properties files) by default to include in the classpath in
>> the case of a multi-module setup.
>>
>> Or, if no such directory exists by default, should I add a classpath
>> entry to the main project's POM?
>>
>> Thanks in advance,
>>
>> Paolo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Multi-module-and-resource-files-tf2847239s177.html#a8013721
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module and resource files

Posted by Jan Kauffman <ja...@gmail.com>.
I'm having the same problem trying to include my log4j.properties file on my
project.
I made it work when I create the jar file, including it into the manifest,
but when I try to 'run mvn test' command, it still answers me that log4j has
no appenders.
Does anybody know how to help solve this problem?

thanks
J. Kauffman

On 12/19/06, Paolo Bacci <pa...@longadata.com> wrote:
>
> Hi all,
>
> I have a maven multi-module project and I got a simple question about
> classpath. I want to know where Maven will lookup resource files (such
> as log4j.properties files) by default to include in the classpath in
> the case of a multi-module setup.
>
> Or, if no such directory exists by default, should I add a classpath
> entry to the main project's POM?
>
> Thanks in advance,
>
> Paolo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>