添加新存储库后的POM文件..
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myproject</groupId>
<artifactId>myproject</artifactId>
<version>3.3.9</version>
<packaging>jar</packaging>
<name>myproject data generation project</name>
<description>Start populating the database by typing 'mvn benerator:generate' on the command line.</description>
<dependencies>
<dependency>
<groupId>org.databene</groupId>
<artifactId>databene-benerator</artifactId>
<version>0.9.8</version>
</dependency>
<dependency>
<groupId>org.databene</groupId>
<artifactId>dbsanity</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.databene</groupId>
<artifactId>jdbacl</artifactId>
<version>0.8.19</version>
</dependency>
<dependency>
<groupId>org.databene</groupId>
<artifactId>benerator-maven-plugin</artifactId>
<version>0.9.8</version>
</dependency>
<dependency>
<groupId>org.databene</groupId>
<artifactId>databene-webdecs-0.8.4</artifactId>
<version>0.8.4</version>
</dependency>
<dependency>
<groupId>org.databene</groupId>
<artifactId>databene-commons</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.databene</groupId>
<artifactId>contiperf</artifactId>
<version>1.07</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>org.databene</id>
<url>http://mvnrepository.com/artifact/org.databene/databene-benerator</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.databene</groupId>
<artifactId>maven-benerator-plugin</artifactId>
<version>0.9.8</version>
<configuration>
<descriptor>C:\Users\sudarsan\Desktop\myproject\benerator.xml</descriptor>
<encoding>Cp1252</encoding>
<validate>true</validate>
<dbUrl>jdbc:mysql://localhost:3306/datagenerator</dbUrl>
<dbDriver>com.mysql.jdbc.Driver</dbDriver>
<dbSchema>root</dbSchema>
<dbUser>root</dbUser>
<dbPassword>generator</dbPassword>
</configuration>
<dependencies>
<dependency>
<groupId>net.sourceforge.jtds</groupId> <!-- MS SQL server and Sybase -->
<artifactId>jtds</artifactId>
<version>1.2.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.2.132</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.8</version>
<scope>runtime</scope>
</dependency>
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
正如你所提到的,我发现mvnrepository.com/artifact/org.databene/benerator-maven-plugin / ...上的新存储库试图编辑POM但是收到错误
[警告] org.databene的POM:benerator-maven-plugin:jar:jar丢失,没有可用的依赖项信息。 [错误]插件org.databene:benerator-maven-plugin:jar或其中一个依赖项无法解析:无法找到工件org.databene:benerator-maven-plugin:jar:jar in central(repo.maven.apache .ORG / maven2的)
提前致谢
答案 0 :(得分:0)
官方Maven存储库(您可能正在使用它作为默认设置)并不包含此插件的0.9.8版本: http://search.maven.org/#search|gav|1|g%3A%22org.databene%22%20AND%20a%3A%22maven-benerator-plugin%22
Databene repo包含更多版本,因此您可以自定义maven以使用此repo,但它仍然没有0.9.8版本: http://databene.org/m2/org/databene/maven-benerator-plugin/
要使用Databene repo,请将此添加到您的pom.xml(适用于项目)或〜/ .m2 / settings.xml(适用于用户):
<repositories>
<repository>
<id>databene</id>
<url>http://databene.org/m2/</url>
</repository>
</repositories>
这将允许您使用0.9.0版。如果您知道包含0.9.8的其他Maven存储库,只需添加该存储库并使用0.9.8。
<强>更新强>
看起来该插件已重命名为benerator-maven-plugin
以遵守Maven插件命名准则。因此,仅使用版本0.9.8和新名称就足够了。