download - Maven: does dependency management mean that I don't have to ship libraries (such as log4j)? -


i'm new maven. i'm trying build test project, includes log4j. java class 'hello world' import log4j this:

import org.apache.log4j.logger; 

my pom.xml includes following section:

<build> ...     <dependencymanagement>     <dependencies>           <dependency>             <groupid>log4j</groupid>             <artifactid>log4j</artifactid>             <version>1.2.12</version>           </dependency>       </dependencies>     </dependencymanagement> ... </build> 

i haven't downloaded log4j jars @ point .....

i run:

mvn install. 

i get:

... [info] ------------------------------------------------------------------------ [error] build failure [info] ------------------------------------------------------------------------ [info] compilation failure app.java:[2,23] package org.apache.log4j not exist ... 

so misunderstanding how maven works here....

i thought should able ship (as minimum) 'pom.xml' , code user, , maven should fetch deps ?

welcome maven world ;-)

you have remove <dependencymanagement> tags, should work.

this tag used when use maven modules (see maven doc)


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -