Hi, I am a recent maven user.
The Good:
* Servlet code compiles after adding pom.xml dependencies for group_ids
"javax.servlet" (server-api) and "org.apache.xmlrpc" (xmlrpc-*).
The Bad:
* Executing "java -jar MyNewServletService-1.0-SNAPSHOT.jar" yields --
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServlet
>From the pom.xml...
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
I'm guessing that the problem is related to the scope. Perhaps OSX Leopard
doesn't include EE javax jars?
Changing the scope to "runtime" yields a compile-time error:
"cannot access javax.servlet.http.HttpServlet file
javax/servlet/http/HttpServlet.class not found"
Why I'm perplexed:
* maven automatically downloads
~/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar -- which
appears to include all the "missing" classes.
For example:
jar -tf ~/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar
...
javax/servlet/http/HttpServlet.class
...
Any suggestions?
Thanks!
-B
--
View this message in context:
http://www.nabble.com/Maven-dependency-quandary%3A-apache-xml-rpc-%2B-servlet-api-2.4.jar-%3D-javax-not-found--tp18250354p18250354.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]