You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Muser007 <sa...@wiziotec.com> on 2005/05/02 20:33:11 UTC

package org.apache.log4j does not exist

Hi,

A total newbie to Maven here. I am attempting to create a build 
environment for my project.  I have tried customizing the project.xml as 
best as I can.

I am getting several compile errors that say:
package org.apache.log4j does not exist
import org.apache.log4j.LogManager and

package javax.mail does not exist
import javax.mail.Message;

All the jar files are located in ${basedir}/lib. How do I get it to find 
the required jars?

This is how the dependency part of project.xml looks like:

<dependencies>
        <dependency>
        <jar>
            <includes>
                    <include>lib/**/*.jar</include>
            </includes>
        </jar>                     
        </dependency>
    </dependencies>

Please help
Thanks!


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


Re: package org.apache.log4j does not exist

Posted by Samuel Le Berrigaud <sl...@gmail.com>.
Hi,

you should take a look at this page that explains on the maven 
repositrories:
http://maven.apache.org/using/repositories.html

Any way if you want to add log4j as a dependency of your project simply 
add those lines to your pom (project.xml):

<dependencies>
  <dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.8</version>
    <type>jar</type>
  </dependency>
  <!--
    others dependencies go here
  -->
</dependencies>

If you still need a local dependency take a look at this page :
http://maven.apache.org/using/managing-dependencies.html

Hope it helps,

SaM

Muser007 wrote:

> Hi,
>
> A total newbie to Maven here. I am attempting to create a build 
> environment for my project.  I have tried customizing the project.xml 
> as best as I can.
>
> I am getting several compile errors that say:
> package org.apache.log4j does not exist
> import org.apache.log4j.LogManager and
>
> package javax.mail does not exist
> import javax.mail.Message;
>
> All the jar files are located in ${basedir}/lib. How do I get it to 
> find the required jars?
>
> This is how the dependency part of project.xml looks like:
>
> <dependencies>
>        <dependency>
>        <jar>
>            <includes>
>                    <include>lib/**/*.jar</include>
>            </includes>
>        </jar>                            </dependency>
>    </dependencies>
>
> Please help
> Thanks!
>
>
> ---------------------------------------------------------------------
> 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: package org.apache.log4j does not exist

Posted by Arnaud HERITIER <ah...@gmail.com>.
Did you take a look at http://maven.apache.org/start/ten-minute-test.html and
http://maven.apache.org/using/managing-dependencies.html

You must use either the real mechanism of dependencies : 
  <dependencies>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.8</version>
    </dependency>
  </dependencies>

or use overriding stated dependencies

Arnaud
 

> -----Message d'origine-----
> De : Muser007 [mailto:savitha@wiziotec.com] 
> Envoyé : lundi 2 mai 2005 20:33
> À : users@maven.apache.org
> Objet : package org.apache.log4j does not exist
> 
> Hi,
> 
> A total newbie to Maven here. I am attempting to create a 
> build environment for my project.  I have tried customizing 
> the project.xml as best as I can.
> 
> I am getting several compile errors that say:
> package org.apache.log4j does not exist
> import org.apache.log4j.LogManager and
> 
> package javax.mail does not exist
> import javax.mail.Message;
> 
> All the jar files are located in ${basedir}/lib. How do I get 
> it to find the required jars?
> 
> This is how the dependency part of project.xml looks like:
> 
> <dependencies>
>         <dependency>
>         <jar>
>             <includes>
>                     <include>lib/**/*.jar</include>
>             </includes>
>         </jar>                     
>         </dependency>
>     </dependencies>
> 
> Please help
> Thanks!
> 
> 
> ---------------------------------------------------------------------
> 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