derepositories.mbg-maven-plugin.1.0.source-code.pom.xml Maven / Gradle / Ivy
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>maven-plugins</artifactId> <groupId>com.github.coderepositories</groupId> <version>1.0</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>mbg-maven-plugin</artifactId> <packaging>maven-plugin</packaging> <name>mbg-maven-plugin Maven Plugin</name> <!-- FIXME change it to the project's website --> <url>https://github.com/coderepositories/jcommons</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <!-- Maven插件依赖 --> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> </dependency> <!-- Maven测试依赖 --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.maven.plugin-testing</groupId> <artifactId>maven-plugin-testing-harness</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-artifact</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-compat</artifactId> </dependency> <!-- jcommons-tools-mbg --> <dependency> <groupId>com.github.coderepositories</groupId> <artifactId>jcommons-tools-mbg</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> <configuration> <goalPrefix>mbg-maven-plugin</goalPrefix> <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound> </configuration> <executions> <execution> <id>mojo-descriptor</id> <goals> <goal>descriptor</goal> </goals> </execution> <execution> <id>help-goal</id> <goals> <goal>helpmojo</goal> </goals> </execution> </executions> </plugin> <!-- surefire --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <includes> <include>**/MbgMojoTest.java</include> </includes> </configuration> </plugin> <!-- mybatis-generator 参考:http://mbg.cndocs.tk/running/runningWithMaven.html --> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>${mybatis-generator.version}</version> <!-- 驱动 --> <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql-connector-java.version}</version> </dependency> </dependencies> <configuration> <!-- XML配置文件位置 默认:${basedir}/src/main/resources/generatorConfig.xml --> <!-- <configurationFile>${basedir}/src/main/resources/generatorConfig.xml</configurationFile> --> <!-- MGB生成文件存放的目录 默认:${project.build.directory}/generated-sources/mybatis-generator --> <outputDirectory>${basedir}/src/main/java</outputDirectory> <!-- 是否覆盖之前生成的文件 --> <overwrite>true</overwrite> <!-- 是否记录日志 --> <verbose>true</verbose> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>run-its</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-invoker-plugin</artifactId> <version>2.0.0</version> <configuration> <debug>true</debug> <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo> <pomIncludes> <pomInclude>*/pom.xml</pomInclude> </pomIncludes> <postBuildHookScript>verify</postBuildHookScript> <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath> <settingsFile>src/it/settings.xml</settingsFile> <goals> <goal>clean</goal> <goal>test-compile</goal> </goals> </configuration> <executions> <execution> <id>integration-test</id> <goals> <goal>install</goal> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>