You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier Lamy <ol...@accor.com> on 2005/12/14 11:32:00 UTC

RE : How to stop that the war plugin deploys servlet-api.jar?

Replace scope compile by provided.
Why using compile ?

- Olivier

-----Message d'origine-----
De : Jochen Wiedmann [mailto:jochen.wiedmann@softwareag.com] 
Envoyé : mercredi 14 décembre 2005 10:57
À : Maven Users List
Objet : How to stop that the war plugin deploys servlet-api.jar?



Hi,

I have a project which consists of several subprojects. One of them 
contains the following dependency:

     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
       <version>2.3</version>
       <scope>compile</scope>
     </dependency>

Note the "compile" scope.

In a depending subproject I am using the war plugin. To my surprise, the

mvn:explode target is copying the servlet-api jar file into WEB-INF/lib.

(Tomcat refuses it, but that's fine to me.) I have tried to eliminate 
the file using

     <excludes>**/servlet-api*.jar</excludes>

in the war plugins configuration, but that doesn't work either.


Any ideas?


Jochen


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



This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
********************************************************************** 
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
********************************************************************** 


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


RE : RE : How to stop that the war plugin deploys servlet-api.jar?

Posted by Olivier Lamy <ol...@accor.com>.
I know. I have the same trouble with excludes.
Use case (modules) :
- Parsing-api : pom.xml with depends from dom4j [1] this contains
dependency to pull-parser which contains a
javax.xml.parsers.SAXParserFactory with
org.gjt.xpp.jaxp11.SAXParserFactoryImpl.
But this parser can't parse entities declaration. That's why I exclude
the dependency in the api pom.

- full-jar : (using assembly) pom.xml with dependency to the parsing-api
in the assembly the pull-parser is included with
javax.xml.parsers.SAXParserFactory. This generate trouble because I
can't parse the files with entities. Then I need to declare again the
excludes section already declare in the parsing-api pom.xml

But I think (not testing), I can use a root pom which contains the dom4j
dependency with the excludes section and.

- Olivier 
 

[1] http://www.ibiblio.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom

-----Message d'origine-----
De : Jochen Wiedmann [mailto:jochen.wiedmann@gmail.com] 
Envoyé : mercredi 14 décembre 2005 11:53
À : Maven Users List
Objet : Re: RE : How to stop that the war plugin deploys
servlet-api.jar?


On 12/14/05, Olivier Lamy <ol...@accor.com> wrote:

> Replace scope compile by provided.
> Why using compile ?

Because I assumed (obviously wrongly) that the "compile" scope was meant
to mean *only* at compile time.

Thanks for the suggestion. I see, that it changes some things (for
example, I do know have to specify the servlet-api in several
subprojects, which inherited the dependency so far). However, the
servlet-api-2.3.jar is still being deployed?

Jochen

--
Often it does seem a pity that Noah and his party did not miss the boat.
(Mark Twain)

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



This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
********************************************************************** 
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
********************************************************************** 


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


Re: RE : How to stop that the war plugin deploys servlet-api.jar?

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 12/14/05, Olivier Lamy <ol...@accor.com> wrote:

> Replace scope compile by provided.
> Why using compile ?

Because I assumed (obviously wrongly) that the "compile" scope was
meant to mean *only* at compile time.

Thanks for the suggestion. I see, that it changes some things (for
example, I do know have to specify the servlet-api in several
subprojects, which inherited the dependency so far). However, the
servlet-api-2.3.jar is still being deployed?

Jochen

--
Often it does seem a pity that Noah and his party did not miss the
boat. (Mark Twain)

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