我刚接触AWS。我需要使用eclipse将我的文件保存在s3中。对于这个
当我尝试运行该项目时,我收到如下错误。我对pom.xml文件感到困惑。我添加了aws-java-sdk等等。但是当我试图以maven安装方式运行项目时,我会收到如下错误
无法在项目演示中执行目标org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile(default-compile):编译失败:编译失败:
[错误]错误:读取C:\ Users \ rameeha.c.m2 \ repository \ org \ apache \ httpcomponents \ _ httpclient \ 4.5.2 \ httpclient-4.5.2.jar; LOC标头无效(签名错误) [错误]错误:读取C:\ Users \ rameeha.c.m2 \ repository \ org \ apache \ httpcomponents \ httpcore \ 4.4.4 \ httpcore-4.4.4.jar; LOC标头无效(签名错误) [ERROR]错误:读取错误C:\ Users \ rameeha.c.m2 \ repository \ commons-codec \ commons-codec \ 1.9 \ commons-codec-1.9.jar; LOC标头无效(签名错误) [ERROR]错误:读取C:\ Users \ rameeha.c.m2 \ repository \ software \ amazon \ ion \ ion-java \ 1.0.2 \ ion-java-1.0.2.jar; LOC标头无效(签名错误) [ERROR]错误:读取C:\ Users \ rameeha.c.m2 \ repository \ joda-time \ joda-time \ 2.8.1 \ joda-time-2.8.1.jar; LOC标头无效(签名错误) [错误]错误:读取错误C:\ Users \ rameeha.c.m2 \ repository \ com \ fasterxml \ jackson \ core \ jackson-databind \ 2.6.7.1 \ jackson-databind-2.6.7.1.jar; LOC标题无效(签名错误)
请帮助我用我的项目解决这个问题
我的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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
<groupId>com.amazonaws.lambda</groupId> <artifactId>demo</artifactId> <version>1.0.0</version> <packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>1.11.244</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies> </dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.7.22</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-events</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-core</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.8.1</version> </dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.7.1</version> </dependency> </dependencies> </project>