![](/img/trans.png)
[英]Assertion Error when running `SolrTestCaseJ4` tests: Fix your classpath to have tests-framework.jar before lucene-core.jar
[英]Your projects contains error please fix them before running:Eclipse
我正在构建Android应用程序,其中我已从此链接https://github.com/devnied/EMV-NFC-Paycard-Enrollment导入了一个Maven库。我的项目名称为Nfcs,并且在该项目中没有错误,并且我已经在项目中成功添加了所有依赖项,但是当我运行项目时,错误窗口打开,显示“您的项目包含错误,请在运行前修复它们”。请帮助我找出错误...
库项目的pom.xml。
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>library</artifactId>
<packaging>jar</packaging>
<name>EMV paycard library</name>
<parent>
<groupId>com.github.devnied.emvnfccard</groupId>
<artifactId>parent</artifactId>
<version>1.1.1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>com.github.devnied</groupId>
<artifactId>bit-lib4j</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!-- Unit test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
您的错误消息说:
... Run Maven->Update Project or Use Quick Fix.
如您所见,错误出在Maven项目上,则应遵循Eclipse给您的提示! 然后右键单击您的Maven项目> Maven>更新项目。
通常,Eclipse提示非常有用。
阅读这篇文章,以了解此功能的用途。 您必须记住,Maven不是Eclipse中的“本机”构建管理器,因此需要进行一些改动和其他操作才能使其正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.