Last Modified: Fri, 30 Nov 2012 22:02:38 +0000 ; Created: Thu, 29 Jan 2009 21:48:00 +0000
I used:
Creating the project
Create the Eclipse project
Sample pom.xmlOld web project I did in schoolA helpful list of how to resolve servlet-api newer versions (it is very inconsistent on all the Maven repos) can be found at http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html, but beware that newer releases of the servlet apis don't seem to follow these recommendations anymore. Another sample POM: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.rodneybeede</groupId> <artifactId>TODO-ARTIFACT</artifactId> <packaging>war</packaging> <version>-SNAPSHOT</version> <name>TODO</name> <url>http://TODO/</url> <inceptionYear>2012</inceptionYear> <licenses> <license> <name></name> <url></url> <distribution>repo</distribution> <comments></comments> </license> </licenses> <organization> <name>TODO</name> <url>http://www.TODO.com/</url> </organization> <developers> <developer> <id>rbeede</id> <name>Rodney Beede</name> <email>[email protected]</email> <url>http://www.rodneybeede.com/</url> <organization>TODO</organization> <roles> <role>architect</role> <role>developer</role> <role>tester</role> </roles> </developer> </developers> <contributors> <contributor> <name></name> <email>[email protected]</email> <url></url> <organization>TODO</organization> <organizationUrl>http://www.TODO.com/</organizationUrl> <roles> <role>TODO</role> </roles> </contributor> </contributors> <dependencies> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>apache-log4j-extras</artifactId> <version>1.1</version> </dependency> <!-- Maven Central and other repos don't have consisent locations for versions of the J2EE APIs This guide was helpful for older versions, but it doesn't seem to be followed anymore in repos: http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html You can also search http://jcp.org/en/jsr/all to get the middle point (x.'#'.z) latest JSR spec version --> <!-- http://www.java.net/forum/topic/glassfish/glassfish/javaxservlet-api-version --> <!-- http://java.net/projects/servlet-spec --> <!-- Found in Maven central repository --> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <!-- http://jsp.java.net/downLoad.html --> <!-- Found in Maven central repository --> <dependency> <groupId>javax.servlet.jsp </groupId> <artifactId>javax.servlet.jsp-api</artifactId> <version>2.2.1</version> <scope>provided</scope> </dependency> <!-- Find the latest version with groupId and artifactId per http://jstl.java.net/download.html --> <!-- Found in Maven central repository --> <dependency> <groupId>org.glassfish.web.javax.servlet.jsp</groupId> <artifactId>jstl</artifactId> <version>1.2.1</version> </dependency> </dependencies> <build> <finalName>TODO-DEFAULT-WEBAPP-CONTEXT-NAME</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> <wtpversion>2.0</wtpversion> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> </project> Get it to actually runNext we must modify some variables in Eclipse in order to get it to actually run the project.
|
|