Velocity conflict mybatis-3 velocity-scripting in Eclipse

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Velocity conflict mybatis-3 velocity-scripting in Eclipse

Guy Rouillier-2
I'm working on a Groovy scripting engine, using the velocity one to
learn from.  So, in Eclipse, I have both the mybatis-3 project and the
velocity-scripting project.  The velocity-scripting project has a
dependency on mybatis-3.4.5 in its pom.xml; with that, I'm able to run
the JUnit tests in VelocityLanguageTest successfully.

However, if I comment out mybatis-3.4.5 in pom.xml and make the
velocity-scripting project dependent on the mybatis-3 project, I can
build both successfully, but I run into problems running the JUnit
tests.  In VelocityFacade.compile(), the statement

     SimpleNode node = engine.parse(reader, template);

fails with NoSuchMethodError.  I'm pretty sure that's because mybatis-3
uses Velocity 1.7 while velocity-scripting uses 2.0.  I checked the Java
build path for mybatis-3, and its Maven dependencies are not being
exported.  I'm guessing that only affects the build, and at run time the
dependencies for both projects are included.

Anyone know a way to fix this?  For now I can just use the mybatis-3.4.5
in pom.xml.

Thanks.

--
Guy Rouillier

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Velocity conflict mybatis-3 velocity-scripting in Eclipse

Guy Rouillier-2
I figured out one way around the problem.  In mybatis-3 pom.xml, I
commented out the dependency for velocity.  That causes the build to
fail, but only on the test classes.  So then I configured the Java build
path for the project to eliminate the test src tree.  Now I am able to
make the velocity-scripting project dependent on mybatis-3, and I can
successfully run the JUnit tests there.

Would still be interested to know if there is a better way to address
this issue.  I'm sure dependent projects are fairly common.

Thanks.

--
Guy Rouillier

------ Original Message ------
From: "Guy Rouillier" <[hidden email]>
To: "mybatis-user" <[hidden email]>
Sent: 5/18/2018 5:42:53 AM
Subject: Velocity conflict mybatis-3 velocity-scripting in Eclipse

>I'm working on a Groovy scripting engine, using the velocity one to
>learn from.  So, in Eclipse, I have both the mybatis-3 project and the
>velocity-scripting project.  The velocity-scripting project has a
>dependency on mybatis-3.4.5 in its pom.xml; with that, I'm able to run
>the JUnit tests in VelocityLanguageTest successfully.
>
>However, if I comment out mybatis-3.4.5 in pom.xml and make the
>velocity-scripting project dependent on the mybatis-3 project, I can
>build both successfully, but I run into problems running the JUnit
>tests.  In VelocityFacade.compile(), the statement
>
>    SimpleNode node = engine.parse(reader, template);
>
>fails with NoSuchMethodError.  I'm pretty sure that's because mybatis-3
>uses Velocity 1.7 while velocity-scripting uses 2.0.  I checked the
>Java build path for mybatis-3, and its Maven dependencies are not being
>exported.  I'm guessing that only affects the build, and at run time
>the dependencies for both projects are included.
>
>Anyone know a way to fix this?  For now I can just use the
>mybatis-3.4.5 in pom.xml.
>
>Thanks.
>
>--
>Guy Rouillier

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.