I am working on a multi-project which looks like this:
Project log4jext is an extension for log4j for our environment. Because
of the nature of extending log4j, I was unable to completely remove all
log4j classes from this project's API. Its dependencies look like:
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
</dependencies>
Project logging is a front-end for logging which has no reference to
log4j in its API (the intent is to be able to change to another logging
framework in the future and not have to change every bit of our code).
Its dependencies look like:
<dependencies>
<dependency>
<groupId>qaccess</groupId>
<artifactId>log4jext</artifactId>
</dependency>
</dependencies>
Project war is a servlet I am going to build which will use the logging
environment. It should depend only on the logging project's artifact.
The top-level project has the following in its POM:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>qaccess</groupId>
<artifactId>log4jext</artifactId>
<version>3.0-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.6</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
Since there are going to be several servlets which use this logging
environment, I am going to place the log4j, log4jext, and logging jars
in the app server's system classpath so that they are available to all
servlets without requiring them to be packaged into the war file.
With things as they are configured now, the logging project compiles
successfully, even though it does not list a dependency for the required
log4j library (I assume that is because the compile-time scope is
inherited from the log4jext project). When I try to build the JavaDocs,
though, I get a large number of errors since the log4j library is not
made available at that time. What is the correct scope to make this
work (or do I need to explicitly state the dependency on log4j in the
logging project)?
Is this configured properly so that the log4j and log4jext jars won't
get packaged into the war file?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]