The Answer to Life, the Universe, and Everything

Tuesday, June 12, 2007

Maven2 with Hibernate

Maven cannot solve the dependency regarding jta as it is released by Sun and based upon their binary license it cannot be deployed on the maven repository.

You will see something like this below.
1) javax.transaction:jta:jar:1.0.1B
Try downloading the file manually from:
http://java.sun.com/products/jta
Then, install it using the command:
mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta \
-Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file
Path to dependency:
1) RssUpdater:RssUpdater:package:0.0.1
2) org.hibernate:hibernate:jar:3.2.4.ga
3) javax.transaction:jta:jar:1.0.1B
1 required artifact is missing.
for artifact:
RssUpdater:RssUpdater:package:0.0.1
from the specified remote repositories:
codehaus.org (http://snapshots.repository.codehaus.org/org/codehaus/mojo/),
maven.seasar.org (http://maven.seasar.org/maven2),
central (http://repo1.maven.org/maven2)



In order to avoid this, download jta and deploy it onto your local maven repos.

mvn install:install-file \
-Dfile=./jta-1_0_1B-classes.zip \
-DgroupId=javax.transaction \
-DartifactId=jta -Dversion=1.0.1B \
-Dpackaging=jar

No comments: