Reputation: 85486
I'm learning Maven and created a sample WebApp with the following command:
mvn archetype:generate \
-DgroupId=org.obliquid \
-DartifactId=test \
-DarchetypeArtifactId=maven-archetype-webapp \
-Dversion=1.0-SNAPSHOT
then ran:
mvn package
mvn tomcat:run
It works but is using tomcat 6.0.29, how can I change to use tomcat 5.5?
UPDATE: I tried @splash suggestion with version 5.5.23 since it seems that the lastest 5.5.33 is not available in the main Maven repo. From the example I've removed catalina-ha, tribes and jasper-jdt and kept the rest (catalina, el-api, jasper, jasper-el, jsp-api, servlet-api, coyote, dbcp). Trying to package:
[ERROR] Failed to execute goal on project yyy: Could not resolve dependencies for project xxx:yyy:war:1.0-SNAPSHOT: The following artifacts could not be resolved: org.apache.tomcat:catalina:jar:5.5.23, org.apache.tomcat:el-api:jar:5.5.23, org.apache.tomcat:jasper:jar:5.5.23, org.apache.tomcat:jasper-el:jar:5.5.23, org.apache.tomcat:jasper-jdt:jar:5.5.23, org.apache.tomcat:jsp-api:jar:5.5.23, org.apache.tomcat:servlet-api:jar:5.5.23, org.apache.tomcat:coyote:jar:5.5.23, org.apache.tomcat:dbcp:jar:5.5.23: Failure to find org.apache.tomcat:catalina:jar:5.5.23 in http://www.mvnsearch.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of mvnsearch has elapsed or updates are forced -> [Help 1]
Upvotes: 2
Views: 2006
Reputation: 4734
Impossible the underlying dependencies of Tomcat aren't available under version 6.
Upvotes: 0
Reputation: 13327
I guess this example should answer your question: Adjust Tomcat Version
For Tomcat 5.5 you have to adjust the version (e.g. 5.5.23
) and choose the right dependencies (group tomcat
instead of org.apache.tomcat
).
Upvotes: 1