![](/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.