Paul Kuykendall wrote:
> 
> Jose,
> 
> I found this in a blog somewhere (I didn't bookmark it, just copied it
> into
> a "tips and tricks" email I sent myself at work).  I still ran into
> problems
> with the hibernate3-maven-plugin complaining it couldn't resolve a
> dependency somewhere down the line to maven-hibernate3-plugin.  It could
> have been something I've been doing wrong, but your problem was fairly
> easy
> to track down (after more than a few hours of google searching).  I did
> use
> a different way of doing the jta installation.  I created a jar file and
> installed that rather than the zip file.
> 
> /Paul
> 
> The below is quite shamefully included without attribution.  I take no
> claim
> for its origination.
> 
> Special dependencies
> 
> Most of the dependencies you need will be automatically downloaded by
> Maven
> from a remote repository, but two by Sun can't be held there. Go to this
> page <http://java.sun.com/products/jta/> to get the JTA interfaces from
> the
> Download link next to "Class Files 1.0.1B," then paste the following into
> a
> shell in your download directory:
> 
> mvn install:install-file -DgroupId=javax.transaction \
>   -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar \
>   -Dfile=jta-1_0_1B-classes.zip
> 
> (Or use jta.jar from the Hibernate 3.1.1 distribution, if you have that
> already — just change the -Dfile= parameter above.)
> 
> For the EJB 3.0 *public final draft* dependency, you'll need to
> download Hibernate
> Annotations<http://prdownloads.sourceforge.net/hibernate/hibernate-annotations-3.2.0.CR1.tar.gz?download>,
> expand the archive, change to its lib directory, then:
> 
> mvn install:install-file -DgroupId=javax.persistence \
>   -DartifactId=ejb -Dversion=3.0-public-draft-20060502
>  \
>   -Dpackaging=jar -Dfile=ejb3-persistence.jar
> 
> 

Is it possible to override a plugin's dependencies, like you can with a
normal dependency?  I'm trying to use the maven-hibernate3-plugin, and
getting the following error:

Missing:
----------
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)
org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060418.000301-9
        2) org.hibernate:hibernate-tools:jar:3.1.0.beta4
        3) org.hibernate:hibernate:jar:3.1.2
        4) javax.transaction:jta:jar:1.0.1B

----------
1 required artifact is missing.

for artifact: 
 
org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060418.000301-9

I'd like to do something like I can do in my normal pom.xml's - where I can
use Geronimo's JTA implementation instead:

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2.0.cr3</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>geronimo-spec</groupId>
            <artifactId>geronimo-spec-jta</artifactId>
            <version>1.0.1B-rc4</version>
        </dependency>

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/-m2--Frustration-getting-Maven-2-and-Hibernate-working-together-tf1892454.html#a5972898
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to