struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wendy Smoak" <wsm...@gmail.com>
Subject Re: [shale] Maven 2 profile activation
Date Tue, 13 Jun 2006 05:08:33 GMT
On 6/12/06, Craig McClanahan <craigmcc@apache.org> wrote:
> I'm trying to reduce redundancy by removing the javax.servlet:servlet-apiand
> javax.servlet:jsp-api dependencies inside the subordinate modules, since
> they are declared in shale-parent ... but that causes compile errors
> indicating that no API classes are getting added to the classpath.
> Shouldn't the subordinate POMs be inheriting this dependency from
> shale-parent?

No.  Dependencies come transitively from artifacts, they are not
inherited from poms.  In this case, servlet-api and jsp-api are marked
'provided' so they are not transitive.

The <dependencyManagement> section in the parent pom doesn't take
effect until you actually add one of those dependencies to a child
pom.  It exists to control dependency versions in a single place, so
that you only need to specify the groupId and artifactId in the child
pom.

The net effect here is that you need to leave the
javax.servlet:servlet-api and javax.servlet:jsp-api in each pom that
needs it.

You'll probably want to read about this on the Maven website,
something tells me I'm not explaining it very well. :/

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message