[logging] Maven2 POM Question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[logging] Maven2 POM Question

craigmcc
The pom.xml file for Commons Logging in the trunk has an "interesting"
approach to declaring dependencies, based on the existence or non-existence
of a file named "commons-logging-README.txt".  AFAICT, the purpose for this
is to make the dependencies non-optional when you are building Commons
Logging itself, but optional for downstream users.

Is that a correct understanding of the purpose?  If so, we should really
document this in the pom.xml file, so others don't have to puzzle out the
thinking.

Craig
Reply | Threaded
Open this post in threaded view
|

Re: [logging] Maven2 POM Question

Simon Kitching
On Fri, 2006-11-17 at 18:52 -0800, Craig McClanahan wrote:
> The pom.xml file for Commons Logging in the trunk has an "interesting"
> approach to declaring dependencies, based on the existence or non-existence
> of a file named "commons-logging-README.txt".  AFAICT, the purpose for this
> is to make the dependencies non-optional when you are building Commons
> Logging itself, but optional for downstream users.
>
> Is that a correct understanding of the purpose?  If so, we should really
> document this in the pom.xml file, so others don't have to puzzle out the
> thinking.

Sorry :-). That's exactly the purpose. I'll add a comment now.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [logging] Maven2 POM Question

Wendy Smoak
On 11/17/06, Simon Kitching <[hidden email]> wrote:

> Sorry :-). That's exactly the purpose. I'll add a comment now.

I saw the commit before the thread, so commented there.

Marking a dependency 'optional' excludes it from transitive dependency
resolution, nothing more.  It should still be on the compile time
classpath.

(For example, that's how we compile Shale Test against HtmlUnit and
Cargo, but don't impose those dependencies on every Shale Test user.)

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]