maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Casey <jdca...@commonjava.org>
Subject Re: How to use dependencyManagement?
Date Thu, 29 Sep 2005 14:19:36 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you specify these two dependencies directly in your own dependency
set, and set their scope to provided, it should work.

FYI, DependencyManagement information is only triggered on demand. That
is, the info in the DependencyManagement section will be triggered if
you specify a dependency directly within your POM that matches the
groupId/artifactId of the info given in DependencyManagement. When this
happens, any specification in the original dependency will dominate over
the corresponding info in the DependencyManagement section.

HTH,

john

Ralph Pöllath wrote:
| Hi,
|
| I get the following warning when packaging my webapp project:
|
| [WARNING]
|         Artifact javax.servlet:jsp-api:jar:2.0 has scope 'provided'
| replaced with 'compile'
|         as a dependency has given a broader scope. If this is not
| intended, use -X to locate the dependency,
|         or force the desired scope using dependencyManagement.
|
| Using -X tells me the dependency on javax.servlet:jsp-api-2.0 is
| introduced by springframework:spring-web-1.2.5, so I tried to exclude
| it like this:
|
| <dependency>
|     <groupId>springframework</groupId>
|     <artifactId>spring-web</artifactId>
|     <version>1.2.4</version>
|     <exclusions>
|         <exclusion>
|             <groupId>javax.servlet</groupId>
|             <artifactId>jsp-api</artifactId>
|         </exclusion>
|     </exclusions>
| </dependency>
|
| But unfortunately, jsp-api-2.0.jar still ends up in my war file,
| breaking my app.
|
| Now I'd like to "force the desired scope using dependencyManagement"  as
| mentioned in the warning, but cannot find any info on how to use  the
| dependencyManagement section in the pom.
|
| I'd like to use it to tell m2 to always set the scope of
| javax.servlet:jsp-api and javax.servlet:servlet-api to provided, and  to
| completely ignore some transitive dependencies like ojb and  toplink,
| which are introduced by springframework:spring-orm, for  example.
|
| Is that possible?
|
| Cheers,
| -Ralph.
|
|
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
| For additional commands, e-mail: users-help@maven.apache.org
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDO/f4K3h2CZwO/4URAhdxAJ9B0aNQT47F1Xz6sWXpqq5ix6c5SwCfTnwf
wtBsedkBkFQDCfc0OeBL6R0=
=HVC6
-----END PGP SIGNATURE-----

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


Mime
View raw message