Install Sun Jar Files

Most of Sun Java libraries are not available in the default Maven repository due to limitations of the Sun’s Binary License.

If you come across this (e.g. JMS, JavaMail, JTA) then you are required to install manually those artifacts. To install the jar file into your Local Repository use:

mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1
  -Dpackaging=jar -Dfile=C:/jms.jar

Alternatively, if you have an Internal Repository running on your company intranet, you can deploy (mvn deploy:deploy-file..) the Sun jar files on this.

Using provides a Maven 2 repository which you can configure in your POM or settings.xml:

          <name> Repository for Maven</name>

Refer to the Maven Guide to Sun JARs for more information.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: