Resin 4 Maven Dependencies

From Resin 4.0 Wiki

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Development}} = Resin 4 Maven Dependencies = Resin provides it's own implementations of most JavaEE 6 WebProfile libraries. It does not provide implementations of javax...")
 
Line 5: Line 5:
 
Resin provides it's own implementations of most JavaEE 6 WebProfile libraries.   
 
Resin provides it's own implementations of most JavaEE 6 WebProfile libraries.   
  
It does not provide implementations of javax.validation, javax.persistence, or javax.faces.  For these the reference implementation is included with Resin.
+
It does not provide implementations of javax.validation, javax.persistence, or javax.faces.  For these, the reference implementation is included with Resin.
  
 
All the javax API are included with Resin in javaee-16.jar located in the lib directory.  For basic development, it is simplest to add this jar as a dependency which will provide your IDE with all the required APIs to code against.
 
All the javax API are included with Resin in javaee-16.jar located in the lib directory.  For basic development, it is simplest to add this jar as a dependency which will provide your IDE with all the required APIs to code against.
Line 11: Line 11:
 
For Maven development there are a few options.   
 
For Maven development there are a few options.   
  
# Deploy javaee-16.jar to your local Maven repository, using deploy-file as described here: https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html
+
1. Deploy javaee-16.jar to your local Maven repository, using deploy-file as described here: https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html
  
# Add a dependency on the javax.javaee-web-api available from java.net here: http://download.java.net/maven/2/javax/javaee-web-api/6.0/
+
2. Add a dependency on the javax.javaee-web-api bundle available from java.net here: http://download.java.net/maven/2/javax/javaee-web-api/6.0/
 +
 
 +
Note: this bundle is convenient since it is a single dependency that include all the EE6 WebProfile APIs, but you can't "mix and match" and you can't exclude API.  It also prevents you from upgrading individual APIs.  This can can lead to odd and confusing issues between development and runtime since the runtime implementation often depends on a newer API version.
  
 
     <dependencies>
 
     <dependencies>
Line 32: Line 34:
 
     ....
 
     ....
  
#
+
3. Add all the individual API dependencies to maven.  This is the most flexible but more verbose choice.  Also, Caucho works to update included libraries as we release Resin, but the included reference implementations of validations, persistence, and faces may not always be the latest available.  In this case you should include the API that matches the implementation version, or download the latest implementation and update the jar in Resin's lib directory.
 +
 
 +
    <dependencies>
 +
 
 +
      <!-- API's -->
 +
      <dependency>
 +
        <groupId>javax.servlet</groupId>
 +
        <artifactId>javax.servlet-api</artifactId>
 +
        <version>3.0.1</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>javax.servlet.jsp</groupId>
 +
        <artifactId>javax.servlet.jsp-api</artifactId>
 +
        <version>2.2.1</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>javax.el</groupId>
 +
        <artifactId>javax.el-api</artifactId>
 +
        <version>2.2.1</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>javax.servlet.jsp.jstl</groupId>
 +
        <artifactId>jstl-api</artifactId>
 +
        <version>1.2</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>javax.transaction</groupId>
 +
        <artifactId>transaction-api</artifactId>
 +
        <version>1.1</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>javax.enterprise</groupId>
 +
        <artifactId>cdi-api</artifactId>
 +
        <version>1.1</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>javax.annotation</groupId>
 +
        <artifactId>jsr250-api</artifactId>
 +
        <version>1.0</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>javax.validation</groupId>
 +
        <artifactId>validation-api</artifactId>
 +
        <version>1.1.0.Final</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>javax.cache</groupId>
 +
        <artifactId>cache-api</artifactId>
 +
        <version>0.8</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
 +
      <!-- Reference implementations -->
 +
      <dependency>
 +
        <groupId>org.eclipse.persistence</groupId>
 +
        <artifactId>eclipselink</artifactId>
 +
        <version>2.5.0</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>org.hibernate</groupId>
 +
        <artifactId>hibernate-validator</artifactId>
 +
        <version>4.3.1.Final</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
      <dependency>
 +
        <groupId>org.glassfish</groupId>
 +
        <artifactId>javax.faces</artifactId>
 +
        <version>2.2.2</version>
 +
        <scope>provided</scope>
 +
      </dependency>

Revision as of 17:34, 6 March 2014

Construction-48.png

Resin 4 Maven Dependencies

Resin provides it's own implementations of most JavaEE 6 WebProfile libraries.

It does not provide implementations of javax.validation, javax.persistence, or javax.faces. For these, the reference implementation is included with Resin.

All the javax API are included with Resin in javaee-16.jar located in the lib directory. For basic development, it is simplest to add this jar as a dependency which will provide your IDE with all the required APIs to code against.

For Maven development there are a few options.

1. Deploy javaee-16.jar to your local Maven repository, using deploy-file as described here: https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html

2. Add a dependency on the javax.javaee-web-api bundle available from java.net here: http://download.java.net/maven/2/javax/javaee-web-api/6.0/

Note: this bundle is convenient since it is a single dependency that include all the EE6 WebProfile APIs, but you can't "mix and match" and you can't exclude API. It also prevents you from upgrading individual APIs. This can can lead to odd and confusing issues between development and runtime since the runtime implementation often depends on a newer API version.

   <dependencies>
     <dependency>
       <groupId>javax</groupId>
       <artifactId>javaee-web-api</artifactId>
       <version>6.0</version>
       <scope>provided</scope>
     </dependency>
     ...
  <repositories>
   <repository>
     <id>java.net.m2</id>
     <name>java.net m2 repo</name>
     <url>http://download.java.net/maven/2</url>
   </repository>
   ....

3. Add all the individual API dependencies to maven. This is the most flexible but more verbose choice. Also, Caucho works to update included libraries as we release Resin, but the included reference implementations of validations, persistence, and faces may not always be the latest available. In this case you should include the API that matches the implementation version, or download the latest implementation and update the jar in Resin's lib directory.

   <dependencies>
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>javax.servlet-api</artifactId>
       <version>3.0.1</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.servlet.jsp</groupId>
       <artifactId>javax.servlet.jsp-api</artifactId>
       <version>2.2.1</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.el</groupId>
       <artifactId>javax.el-api</artifactId>
       <version>2.2.1</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.servlet.jsp.jstl</groupId>
       <artifactId>jstl-api</artifactId>
       <version>1.2</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.transaction</groupId>
       <artifactId>transaction-api</artifactId>
       <version>1.1</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.enterprise</groupId>
       <artifactId>cdi-api</artifactId>
       <version>1.1</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.annotation</groupId>
       <artifactId>jsr250-api</artifactId>
       <version>1.0</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.validation</groupId>
       <artifactId>validation-api</artifactId>
       <version>1.1.0.Final</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>javax.cache</groupId>
       <artifactId>cache-api</artifactId>
       <version>0.8</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.eclipse.persistence</groupId>
       <artifactId>eclipselink</artifactId>
       <version>2.5.0</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-validator</artifactId>
       <version>4.3.1.Final</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.glassfish</groupId>
       <artifactId>javax.faces</artifactId>
       <version>2.2.2</version>
       <scope>provided</scope>
     </dependency>
Personal tools
TOOLBOX
LANGUAGES