------ Guide to Coping with Sun JARs ------ Jason van Zyl ------ 2008-01-01 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Coping with Sun JARs Often users are confronted with the need to build against JARs provide by Sun like the {{{http://java.sun.com/products/javamail/}JavaMail}} JAR, or the {{{http://java.sun.com/products/javabeans/jaf/downloads/index.html}Activation}} JAR and users have found these JARs not present in central repository resulting in a broken build. Unfortunately most of these artifacts fall under Sun's Binary License which disallows us from distributing them from Ibiblio. Another problem is that Sun's appears not to have any sort of convention for naming their own JARs so we have taken steps in suggesting some common names for Sun's artifacts. You can find a list of our suggestions here: *----------------------------------------------------------+-------------------+----------------+ | Product artifact | Group ID | Artifact ID *----------------------------------------------------------+-------------------+----------------+ | Java Activation Framework | javax.activation | activation *----------------------------------------------------------+-------------------+----------------+ | J2EE | javax.j2ee | j2ee *----------------------------------------------------------+-------------------+----------------+ | Java Data Object (JDO) | javax.jdo | jdo *----------------------------------------------------------+-------------------+----------------+ | Java Message Service (JMS) | javax.jms | jms *----------------------------------------------------------+-------------------+----------------+ | JavaMail | javax.mail | mail *----------------------------------------------------------+-------------------+----------------+ | Java Persistence API (JPA) / EJB 3 | javax.persistence | persistence-api *----------------------------------------------------------+-------------------+----------------+ | J2EE Connector Architecture | javax.resource | connector *----------------------------------------------------------+-------------------+----------------+ | J2EE Connector Architecture API | javax.resource | connector-api *----------------------------------------------------------+-------------------+----------------+ | Java Authentication and Authorization Service (JAAS) | javax.security | jaas *----------------------------------------------------------+-------------------+----------------+ | Java Authorization Contract for Containers | javax.security | jacc *----------------------------------------------------------+-------------------+----------------+ | Servlet API | javax.servlet | servlet-api *----------------------------------------------------------+-------------------+----------------+ | Servlet JavaServer Pages (JSP) | javax.servlet | jsp-api *----------------------------------------------------------+-------------------+----------------+ | Servlet JavaServer Pages Standard Tag Library (JSTL) | javax.servlet | jstl *----------------------------------------------------------+-------------------+----------------+ | JDBC 2.0 Optional Package | javax.sql | jdbc-stdext *----------------------------------------------------------+-------------------+----------------+ | Java Transaction API (JTA) | javax.transaction | jta *----------------------------------------------------------+-------------------+----------------+ | Java XML RPC | javax.xml | jaxrpc *----------------------------------------------------------+-------------------+----------------+ | Portlet | javax.portlet | portlet-api *----------------------------------------------------------+-------------------+----------------+ | Java Naming and Directory Interface (JNDI) | javax.naming | jndi *----------------------------------------------------------+-------------------+----------------+ If you use our suggestions as noted above when adding a Sun dependency to your POM, Maven 2.x can help you locate the JARs by providing the site where they can be retrieved. It is important that you follow the suggested naming conventions as we cannot store the JARs at the central repository. We can only store metadata about those JARs and it is the metadata that contains location and retrieval information. Once you have downloaded a particular Sun JAR to your system you can install the JAR in your local repository. Please refer to our {{{./guide-3rd-party-jars-local.html}Guide to installing 3rd party JARs}} for instructions on how to accomplish this. <>: Java.net provides a {{{http://download.java.net/maven/2/}Maven 2 repository}}. You could specify it directly in your POM or in your settings.xml between the tags \: ----- ... maven2-repository.dev.java.net Java.net Repository for Maven http://download.java.net/maven/2/ default ... -----