Closed GoogleCodeExporter closed 9 years ago
Original comment by jeffgbut...@gmail.com
on 29 Aug 2011 at 1:26
I just did a test and don't experience any errors. The important thing is to
make sure that the project containing your MyBatis plugin is declared as a
dependency of the generator plugin - not just a dependency of the project:
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>Generate MyBatis Artifacts</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
...
</configuration>
<dependencies>
<!-- declare your dependency here -->
<dependency>
<groupId>foo.bar</groupId>
<artifactId>MyPlugin</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Original comment by jeffgbut...@gmail.com
on 14 Sep 2011 at 1:38
Closing as invalid. Feel free to ask further questions on the user list.
Original comment by jeffgbut...@gmail.com
on 14 Sep 2011 at 3:22
Hi ,
I have the same question about this.please help me and verify it ,thanks.
when I use maven install command in eclipse ,there has an error like this:
---------------------------------------------------------------------------
Build errors for spring-mybatis-generator;
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.mybatis.generator:mybatis-generator-maven-plugin:1.3.1:generate (Generate
MyBatis Artifacts) on project spring-mybatis-generator: Cannot instantiate
object of type com.test.spring.mybatis.generator.plugins.TestPlugins
----------------------------------------------------------------------------
TestPlugins was write by myself and configuration like this :
=====================================================================
<context id="mysqlGenerator" targetRuntime="MyBatis3">
<plugin type="com.test.spring.mybatis.generator.plugins.TestPlugins"></plugin>
=====================================================================
I don't know how to resolve it,Please help me. thanks
Original comment by zhoujian...@gmail.com
on 5 Jan 2012 at 9:03
the same problem...plz get me some advice...many thanks
.
Original comment by kasa.l...@gmail.com
on 10 Jan 2012 at 9:38
My advice is to follow the instructions in comment #2 above.
Original comment by jeffgbut...@gmail.com
on 10 Jan 2012 at 11:25
to jeffgbut...@gmail.com :
<!-- declare your dependency here -->
<dependency>
<groupId>foo.bar</groupId>
<artifactId>MyPlugin</artifactId>
<version>1.0.0</version>
</dependency>
What did u mean? if my defined plugin is
"es.vass.mbg.plugin.MyMapperConfigPlugin"? How to declear it in the pom.xml?
Original comment by hillfall...@gmail.com
on 27 Feb 2012 at 7:17
Your plugin needs to be packaged as a JAR and be made available in your local
maven repository. Then you need to declare that JAR as a dependency as shown
in comment #2.
Original comment by jeffgbut...@gmail.com
on 27 Feb 2012 at 2:15
Original issue reported on code.google.com by
jorge.z...@gmail.com
on 13 Jun 2011 at 4:20