If you want to download Java EE6 libraries, Oracle bundles the whole glassfish server, and more with the java EE6 SDK. Other application servers also bundle the libraries.
That’ a whole lot of bloat if you just want to compile a little webapp. You can just put a small subset of the glassfish jars in your classpath:
- glassfish_install_dir/glassfish/modules/javax.servlet.jar
- glassfish_install_dir/glassfish/modules/javax.servlet.jsp.jar
- glassfish_install_dir/glassfish/modules/javax.servlet.jsp.jstl.jar
- glassfish_install_dir/glassfish/modules/jstl-impl.jar
- glassfish_install_dir/glassfish/modules/javax.ejb.jar (if using ejb)
<dependencies>
  <dependency>
    <groupId>javaee</groupId>
    <artifactId>javaee-api</artifactId>
    <version>6.0</version>
    <scope>provided</scope>
  </dependency>
</dependencies>
<repository>
   <id>java.net</id>
   <name>GlassFish Maven Repository</name>
   <url>http://download.java.net/maven/2</url>
</repository>
Use artifactId javaee-web-api if you just want the web profile. If you are not using maven, you can just download the jars from the maven repository:
- http://download.java.net/maven/2/javax/javaee-api/6.0/javaee-api-6.0.jar
- http://download.java.net/maven/2/javax/javaee-web-api/6.0/javaee-web-api-6.0.jar
<dependency> <groupId>javaee</groupId> <artifactId>javaee-api</artifactId> <version>5</version> <scope>provided</scope> </dependency>
 
 
 Posts
Posts
 
 
No comments:
Post a Comment