2

私はこのポンで小さなプロジェクトを持っています...

<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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example.shipcloud</groupId>
    <artifactId>shipcloud-api</artifactId>
    <description>The Java API for ShipCloud.</description>
    <version>1.0-SNAPSHOT</version>
    <prerequisites>
        <maven>3.0</maven>
    </prerequisites>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.compiler.source.version>1.8</project.compiler.source.version>
        <project.compiler.target.version>1.8</project.compiler.target.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>4.2.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.6.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <!-- More Matchers than the default version in JUnit -->
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>4.2.0.RELEASE</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>2.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.0.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Eclipse では、すべてが正常に動作し、テストが動作します (maven が見つけられないクラスを使用) AbstractCharSequenceAssert。別の public クラスの下のクラス):

class UrlParameterStringAssert extends AbstractCharSequenceAssert<UrlParameterStringAssert, String> {

情報] - - - - - - - - - - - - - - - - - - - - - - - - ------------- [エラー] コンパイル エラー:
[情報] ---------------------------- -------------------------------- [エラー] /home/fschaetz/workspaces/workspace5/.../shipcloud- api/src/test/java/com/example/shipcloud/rest/shipcloud/domain/AddressSearchFieldsTest.java:[103,39] エラー: シンボルが見つかりません [エラー] シンボル: クラス AbstractCharSequenceAssert

デバッグ出力を調べたところ、testCompile を実行すると、AssertJ jar は実際にはコンパイラに指定されたクラスパス上にあります。

-classpath ...:/home/fschaetz/.m2/repository/org/assertj/assertj-core/2.2.0/assertj-core-2.2.0.jar:...

(ファイルが存在し、読み取り可能で、クラスが含まれており、Eclipse で正常に動作します)。

クリーン(maven/eclipse)、プロジェクトの更新の実行などを試しましたが、何も機能していないようです。ジェンキンスでmavenインストールを実行しようとすると、同じことが起こります。

問題のあるクラスのインポートは...

import static de.assona.rest.shipcloud.domain.UrlParameterStringAssert.assertThat;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import org.assertj.core.api.AbstractCharSequenceAssert;
import org.junit.Before;
import org.junit.Test;

何か案は?

4

2 に答える 2