Resin 4 Maven Dependencies

From Resin 4.0 Wiki

(Difference between revisions)
Jump to: navigation, search
Line 11: Line 11:
 
For Maven development there are a few options.   
 
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
+
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.  Then add a dependency on it to your pom.xml.
  
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/
+
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/ to your pom.xml
  
 
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.
 
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.
Line 25: Line 25:
 
       </dependency>
 
       </dependency>
 
       ...
 
       ...
 
+
 
   <repositories>
 
   <repositories>
 
     <repository>
 
     <repository>
Line 34: 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.
+
3. Add all the individual WebProfile 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>
 
     <dependencies>
 
+
 
       <!-- API's -->
 
       <!-- API's -->
 
       <dependency>
 
       <dependency>
Line 93: Line 93:
 
         <scope>provided</scope>
 
         <scope>provided</scope>
 
       </dependency>
 
       </dependency>
+
      <dependency>
 +
        <groupId>javax.ejb</groupId>
 +
        <artifactId>ejb-api</artifactId>
 +
        <version>3.0</version>
 +
        <scope>provided</scope>
 +
      </dependency>
 +
 
       <!-- Reference implementations -->
 
       <!-- Reference implementations -->
 
       <dependency>
 
       <dependency>

Revision as of 17:36, 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. Then add a dependency on it to your pom.xml.

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/ to your pom.xml

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 WebProfile 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>javax.ejb</groupId>
       <artifactId>ejb-api</artifactId>
       <version>3.0</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