Compile scope is included in classpath. Try scope = provided 

More on scopes
http://maven.apache.org/guides/introduction/introduction-to-dependency-m
echanism.html

-Ronny

 

-----Opprinnelig melding-----
Fra: Jeroen Verhagen [mailto:[EMAIL PROTECTED] 
Sendt: 9. oktober 2006 13:22
Til: [email protected]
Emne: dependency quirck?

Hi all,

I'm having a problem a with servlet-api jar being deployed even though
its scope is set to compile.

I'm exploring mvn by creating a webapplication that is divided into two
modules. A core module generating a jar and containing servlets, Spring
controlllers. A web module contains the jsp's, web.xml etc.
This is the way, right?

The core module has a dependency on the servlet-api jar for compilation
(<scope>compile</scope>). The web module has a ofcourse a dependency on
the core module. However the problem is that when the web module is
deployed (war and exploded dir) the servlet-api is also deployed,
eventhough it's scope in the core pom is set to compile.

What's causing this? It's a problem because I think the deployment on
Tomcat takes longer and it complains about an offending class:

INFO:
validateJarFile(C:\java\jakarta-tomcat-5.5.9\webapps\web\WEB-INF\lib\ser
vlet-api-2.4.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending
class: javax/servlet/Servlet.class

Thanks for any help,

Jeroen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:452a30ed225875315134984!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to