Maven:java包不存在

时间:2018-04-11 18:44:47

标签: java maven intellij-idea

我在这个项目上工作了几个月,一切都很顺利。有一天,我打开项目,突然maven无法识别任何依赖项。我一直无休止地在网上寻找答案,但却没有发现任何有帮助的事情。

我尝试了几件事:mvn clean install,我删除了项目并将其从git中删除。有时它会适用于几个编译,但之后它会给我同样的错误。这让我很头疼,并且已经尝试修复它几天了但是我很累,试图找到能够解决这个问题的事情。以前有人有这个问题吗?同样,同一个项目已经工作好几个月,除了有一天我打开它并决定使用它,Maven给我的错误类似于:Error: package doesn't exist

经过几次成功的编译后,我会再次尝试再次编译应用程序时向我显示大约100个类似的错误:Error:(4, 26) java: package com.amazonaws.auth does not exist

pom.xml文件:

<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>

<properties>
    <!-- Use latest version whenever available -->
    <jackson.version>2.9.4</jackson.version>
    <aws.version>1.11.295</aws.version>
    <apache.commons.version>2.6</apache.commons.version>
</properties>

<dependencies>

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk</artifactId>
        <version>${aws.version}</version>
    </dependency>

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-kinesisvideo</artifactId>
        <version>${aws.version}</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-kinesisvideo -->
    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-kinesisvideo</artifactId>
        <version>${aws.version}</version>
    </dependency>


    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>amazon-kinesis-client</artifactId>
        <version>1.9.0</version>
    </dependency>

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>amazon-kinesis-producer</artifactId>
        <version>0.12.8</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-cbor</artifactId>
        <version>${jackson.version}</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${apache.commons.version}</version>
    </dependency>


    <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.25</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.eclipse.paho/org.eclipse.paho.client.mqttv3 -->
    <dependency>
        <groupId>org.eclipse.paho</groupId>
        <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
        <version>1.0.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.scream3r/jssc -->
    <dependency>
        <groupId>org.scream3r</groupId>
        <artifactId>jssc</artifactId>
        <version>2.8.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.openpnp/opencv -->
    <dependency>
        <groupId>org.openpnp</groupId>
        <artifactId>opencv</artifactId>
        <version>3.2.0-0</version>
    </dependency>

</dependencies>

0 个答案:

没有答案