You want to use scope provided on servlet-api instead of compile. Compile 
dependencies do get deployed. Provided ones are available at compile time, 
but then do not get packaged into the final artifact.

I know, the terminology took me a few minutes to get used to.

Greg Vaughn
[EMAIL PROTECTED]

"Jakob Vad Nielsen" <[EMAIL PROTECTED]> wrote on 10/23/2006 11:31:12 AM:

> Hi,
> 
> I have a single pom project which is a war-project. It uses the 
> commons-logging 1.1 package. This package has a dependency on 
> javax.servlet:servlet-api 2.3. I don't want this package to be a part of 

> the distributed war-file. Therefore I have excluded it. But still I need 

> it at compile time. Therefore I have introduced it again, but only for 
> compile-time.
> 
> My problem is that the javax-servlet.jar file still is included into the 

> war-file. Is this a bug? And can I do something to prevent it from being 

> included?
> 
> Here is the dependencies from my pom.xml:
> 
>     <dependencies>
>         <dependency>
>             <groupId>org.apache.derby</groupId>
>             <artifactId>derby</artifactId>
>             <version>10.1.2.1</version>
>         </dependency>
>         <dependency>
>             <groupId>commons-logging</groupId>
>             <artifactId>commons-logging</artifactId>
>             <version>1.1</version>
>             <exclusions>
>                 <exclusion>
>                     <groupId>javax.servlet</groupId>
>                     <artifactId>servlet-api</artifactId>
>                 </exclusion>
>             </exclusions>
>         </dependency>
>         <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>servlet-api</artifactId>
>             <version>2.3</version>
>             <scope>compile</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.springframework</groupId>
>             <artifactId>spring</artifactId>
>             <version>2.0</version>
>         </dependency>
>         <dependency>
>             <groupId>c3p0</groupId>
>             <artifactId>c3p0</artifactId>
>             <version>0.9.0.2</version>
>         </dependency>
>         <dependency>
>             <groupId>mysql</groupId>
>             <artifactId>mysql-connector-java</artifactId>
>             <version>3.1.12</version>
>         </dependency>
>     </dependencies>
> 
> /Jakob
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

======================================================================
Confidentiality Notice: The information contained in and transmitted with this 
communication is strictly confidential, is intended only for the use of the 
intended recipient, and is the property of Countrywide Financial Corporation or 
its affiliates and subsidiaries.  If you are not the intended recipient, you 
are hereby notified that any use of the information contained in or transmitted 
with the communication or dissemination, distribution, or copying of this 
communication is strictly prohibited by law.  If you have received this 
communication in error, please immediately return this communication to the 
sender and delete the original message and any copy of it in your possession.
======================================================================

Reply via email to