<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>www.jugpadova.it: Maven 2: Spring and JTA dependencies</title>
    <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Java User Group [Padova]</description>
    <item>
      <title>Maven 2: Spring and JTA dependencies</title>
      <description>&lt;p&gt;Few weeks ago I started using &lt;a href="http://maven.apache.org"&gt;Maven 2&lt;/a&gt; for one of my development projects. The project is very simple, but it has dependencies with some external libraries, in particular with &lt;a href="http://www.springframework.org"&gt;Spring&lt;/a&gt;:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_xml "&gt;&lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;dependency&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;groupId&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;org.springframework&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;groupId&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;artifactId&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;spring&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;artifactId&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;version&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;1.2.6&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;version&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;scope&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;runtime&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;scope&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;dependency&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Introducing this dependency I had the following errors:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;Downloading: -&amp;gt;
    http://repo1.maven.org/maven2/javax/transaction -&amp;gt;
      /jta/1.0.1B/jta-1.0.1B.jar
[WARNING] Unable to get resource from repository central -&amp;gt;
    (http://repo1.maven.org/maven2)
...
[INFO] Failed to resolve artifact.

required artifacts missing:
 javax.transaction:jta:jar:1.0.1B&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This happened because Spring has a transitive dependency with the Sun&amp;#8217;s JTA classes, but the JTA jar can&amp;#8217;t be inserted in the &lt;a href="http://www.ibiblio.org/maven2/"&gt;Maven repository&lt;/a&gt; because the Sun&amp;#8217;s Binary License.&lt;/p&gt;

&lt;p&gt;For solving this dependency you have to download the &lt;em&gt;jta-1_0_1B-classes.zip&lt;/em&gt; file from the &lt;a href="http://java.sun.com/products/jta/"&gt;Sun&amp;#8217;s site&lt;/a&gt; and install it into your local repository using the following command:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;mvn install:install-file \
  -Dfile=./jta-1_0_1B-classes.zip \
  -DgroupId=javax.transaction \
  -DartifactId=jta -Dversion=1.0.1B \
  -Dpackaging=jar&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;More general information in these Maven&amp;#8217;s mini guides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html"&gt;Coping with SUN JARs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://maven.apache.org/guides/mini/guide-installing-3rd-party-jars.html"&gt;Guide to installing 3rd party JARs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <pubDate>Sat, 26 Nov 2005 09:06:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:5c3a5a64-f042-489c-bfb0-83d624c95cce</guid>
      <author>Lucio Benfante</author>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies</link>
      <category>Tips &amp; Tricks</category>
      <category>maven</category>
      <category>spring</category>
      <category>jta</category>
      <category>dependency</category>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Bakhyt</title>
      <description>&lt;p&gt;Thanx, helpful! )))&lt;/p&gt;</description>
      <pubDate>Thu, 01 Apr 2010 23:02:15 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:be4940ae-aa53-4a67-81ea-795f53412640</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-54063</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Gustaf</title>
      <description>&lt;p&gt;Really helpful!
Thanks a lot&amp;#8230;/G&lt;/p&gt;</description>
      <pubDate>Tue, 16 Mar 2010 04:10:18 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1516238f-6414-4332-ad76-b378323307ce</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-54054</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by mvnhtr</title>
      <description>&lt;p&gt;And this is still a problem over 4 years later! geez.&lt;/p&gt;</description>
      <pubDate>Wed, 24 Feb 2010 10:11:01 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:57ccf59d-21ea-4ef6-9f6e-d685627103aa</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-54044</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Tyler Pedersen</title>
      <description>&lt;p&gt;Very well written. Thanks.&lt;/p&gt;</description>
      <pubDate>Wed, 17 Feb 2010 16:29:57 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:25073463-e577-41dc-a2f4-49911c29b165</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-54043</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by kris</title>
      <description>&lt;p&gt;this what i am looking for&lt;/p&gt;</description>
      <pubDate>Sat, 13 Feb 2010 03:44:03 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:7d8cbd3b-fb26-4afa-a069-cc23e76ec8e8</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-54041</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by felipper</title>
      <description>&lt;p&gt;Cool!
Exactaly what I want.&lt;/p&gt;</description>
      <pubDate>Thu, 17 Dec 2009 19:24:33 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:d334e4bc-2685-46d9-b35e-b88f92f940fb</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-54034</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by chris_five</title>
      <description>&lt;p&gt;no luck at mvnrepository.com. jar file can be downloaded here:
&lt;a href="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/" rel="nofollow"&gt;http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 16 Sep 2008 01:25:33 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:0e534014-2682-4b85-aa19-3fea7e06a0ec</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53998</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by simon massey</title>
      <description>that will teach me not to preview! the pom fragments are as follows:
&lt;pre&gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;hibernate-entitymanager&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;${hibernate.version}&amp;lt;/version&amp;gt;
            &amp;lt;exclusions&amp;gt;
              &amp;lt;exclusion&amp;gt;
                &amp;lt;groupId&amp;gt;javax.transaction&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;jta&amp;lt;/artifactId&amp;gt;
              &amp;lt;/exclusion&amp;gt;
            &amp;lt;/exclusions&amp;gt;
        &amp;lt;/dependency&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;and&lt;/p&gt;


&lt;pre&gt;
&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.apache.geronimo.specs&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;geronimo-jta_1.0.1B_spec&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.1.1&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&lt;/pre&gt;</description>
      <pubDate>Tue, 19 Aug 2008 19:27:25 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:10f468d7-951a-41a1-bf3d-c5eda62e5ade</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53994</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by simon massey</title>
      <description>&lt;p&gt;N.B. the above approaches of directly injected into your cache or including a different maven server will make our project unportable to other developer workstations as they will have to hack their settings.xml to get things to work. instead you can do the following:&lt;/p&gt;


	&lt;p&gt;configure maven to include hibernate artifacts but not the dependency to jta. particularly if you are going to deploy to a container that will provide the class itself you will have to do nothing else. use the following syntax:&lt;/p&gt;



    org.hibernate
    hibernate-entitymanager
    ${hibernate.version}
    
        
            javax.transaction
            jta
        
    


	&lt;p&gt;if you are actually going to compile against jta then use the geronimo implimentation of the jta library that does not have a liciensing issue.&lt;/p&gt;



org.apache.geronimo.specs
    geronimo-jta_1.0.1B_spec
    1.1.1


	&lt;p&gt;simply go to mvnrepository.com and search for geronimo-jta to find the correct version of the jta spec to include for your project.&lt;/p&gt;


	&lt;p&gt;happy coding.&lt;/p&gt;</description>
      <pubDate>Tue, 19 Aug 2008 19:25:31 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d01e0e1f-b71f-42cd-882a-00abfda78afc</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53993</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Jörn Zaefferer</title>
      <description>&lt;p&gt;Henriks hint at the java.net repository was a very welcome addition. Just add it to your repositories element:&lt;/p&gt;


&lt;pre&gt;
&amp;lt;repository&amp;gt;
    &amp;lt;id&amp;gt;java.net&amp;lt;/id&amp;gt;
    &amp;lt;name&amp;gt;java.net&amp;lt;/name&amp;gt;
    &amp;lt;url&amp;gt;&lt;a href="http://download.java.net/maven/2/" rel="nofollow"&gt;http://download.java.net/maven/2/&lt;/a&gt;&amp;lt;/url&amp;gt;
&amp;lt;/repository&amp;gt;
&lt;/pre&gt;</description>
      <pubDate>Fri, 11 Jul 2008 13:53:31 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:90ecf556-4b0d-4715-a8ba-212d53027653</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53989</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by gerardo</title>
      <description>&lt;p&gt;gracias, me sirvio mucho , directo y conciso&lt;/p&gt;</description>
      <pubDate>Thu, 05 Jun 2008 01:28:03 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4edd2ce7-74a1-47f8-ac08-742c42e23d9d</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53981</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by salvi</title>
      <description>&lt;p&gt;thanks, this solve my problem&lt;/p&gt;</description>
      <pubDate>Sat, 31 May 2008 18:56:26 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4fd09a10-760b-4b3c-a8a5-b8777c8b6017</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53980</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Sunil</title>
      <description>&lt;p&gt;Thanks dude, this helped&lt;/p&gt;</description>
      <pubDate>Wed, 14 May 2008 16:50:06 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:a17acd87-8e2b-4e80-ab90-5c88c96ebecc</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53977</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Pierre</title>
      <description>&lt;p&gt;Thanks! It solved my packaging problem!&lt;/p&gt;</description>
      <pubDate>Tue, 11 Mar 2008 01:51:03 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b46fbd89-9447-4492-83bd-25b2613986fd</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53961</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Nuwi</title>
      <description>&lt;p&gt;Gracias!!!&lt;/p&gt;</description>
      <pubDate>Tue, 05 Feb 2008 03:39:54 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:5a7f903e-5dc8-45e3-bf7b-380701989d02</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53952</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Olivier</title>
      <description>&lt;p&gt;Thanks a lot :p&lt;/p&gt;</description>
      <pubDate>Tue, 22 Jan 2008 22:13:41 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b534353d-cc2b-4dbf-8fa5-d9bf96b4b494</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53949</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Imran M Yousuf</title>
      <description>&lt;p&gt;Thanks! it is quite helpful&lt;/p&gt;</description>
      <pubDate>Mon, 31 Dec 2007 07:26:18 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:a6422a9d-e129-4e36-8c1c-387b4d51e0e7</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53946</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by James</title>
      <description>&lt;p&gt;Exactly the information I needed, thanks!&lt;/p&gt;</description>
      <pubDate>Thu, 27 Dec 2007 20:16:03 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:e57522c6-d4ea-42c0-9652-547f643f5569</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53945</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Retschgi</title>
      <description>&lt;p&gt;Thank you! You made my day!&lt;/p&gt;</description>
      <pubDate>Tue, 25 Dec 2007 13:57:50 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b63a8e55-411f-43c9-a51a-77172c4f1b92</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53944</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by dcasiel@yahoo.com</title>
      <description>&lt;p&gt;Thanks a lot :)
This is the only good explanation of the problem that I saw after long search.&lt;/p&gt;</description>
      <pubDate>Mon, 24 Dec 2007 09:06:17 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b3f376bc-6640-46ac-a0b2-188f0bf7991c</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53943</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Henrik</title>
      <description>&lt;p&gt;U can also point the maven rep to: &lt;a href="http://download.java.net/maven/2/javax/transaction/jta/1.0.1B/" rel="nofollow"&gt;http://download.java.net/maven/2/javax/transaction/jta/1.0.1B/&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 31 Oct 2007 19:33:41 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:a8918f07-e27c-40c1-9e37-927081d94344</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53929</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Nick</title>
      <description>&lt;p&gt;thanks man, you saved me a lot of time&lt;/p&gt;</description>
      <pubDate>Fri, 14 Sep 2007 17:50:21 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:5787821e-0f0f-4f73-9e5c-09c878df4d8d</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53920</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by Sumit</title>
      <description>&lt;p&gt;Thanks, was just what I needed to know.&lt;/p&gt;</description>
      <pubDate>Sun, 09 Sep 2007 20:07:19 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:20b95d93-101c-4f1e-9177-979e15f24d3b</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53888</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by mike</title>
      <description>&lt;p&gt;Thank you!  Clean &amp;#38; concise, this is exactly what I wanted.&lt;/p&gt;</description>
      <pubDate>Fri, 10 Aug 2007 21:45:44 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:efeea33d-a202-4a9f-a41b-9a076d14e2ce</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-53883</link>
    </item>
    <item>
      <title>"Maven 2: Spring and JTA dependencies" by cav</title>
      <description>&lt;p&gt;Thanks , the problem is solved!&lt;/p&gt;</description>
      <pubDate>Tue, 12 Jun 2007 16:37:01 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:05f57db8-e898-4d5c-8beb-11a98f583625</guid>
      <link>http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies#comment-50915</link>
    </item>
  </channel>
</rss>
