1 Haziran 2013 Cumartesi

How to Download Sun Jars in Maven Projects

Sun jars cannot be hosted in Maven central repository due to Sun's Binary License, e.g:

  • javax.sql:jdbc-stdex
  • javax.transaction:jta
  • javax.activation:activation

java.net provides a Maven repository to access Sun jars. It is a good practice to add following repository in your settings.xml file:
<repository>
      <id>maven2-repository.dev.java.net</id>
      <name>Java.net Repository for Maven</name>
      <url>http://download.java.net/maven/2/</url>
      <layout>default</layout>
</repository>

More details can be found at:
http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html

Hiç yorum yok: