現行のjavaアプリ(ver.1.6)が参照しているファイルデータをAWS互換のS3ストレージに移行する対応をしているのですが、「AWS SDK for Java」のセットアップに手間取っております。
https://docs.aws.amazon.com/ja_jp/sdk-for-java/v1/developer-guide/setup-install.html
上記の、プロジェクトにSDKを含めるのところで
Apache Ant またはその他の方法でセットアップ・・・を試みているのですが上手くいきません。
javaのバージョンが1.6なので、「以前のバージョンのSDKのインストール」の手順を行っています。
4.開発システムのディレクトリ・・・・
↑ これが指しているのは対象アプリのディレクトリ直下(C:\pleiades\workspace\【アプリ名】/aws-sdk-java-1.6.10)でよいのでしょうか。
> mvn clean install [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.amazonaws:aws-java-sdk:jar:1.6.10 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-gpg-plugin is missing. @ line 170, column 17 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ---------------------< com.amazonaws:aws-java-sdk >--------------------- [INFO] Building AWS SDK for Java 1.6.10 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ aws-java-sdk --- [INFO] Deleting C:\pleiades\workspace\【アプリ名】\aws-sdk-java-1.6.10\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ aws-java-sdk --- [WARNING] Using platform encoding (MS932 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 13 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ aws-java-sdk --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 6377 source files to C:\pleiades\workspace\【アプリ名】\aws-sdk-java-1.6.10\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.527 s [INFO] Finished at: 2019-11-05T14:57:18+09:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project aws-java-sdk: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
このERRORを解消したらセットアップ完了でしょうか。
詳しい方いらっしゃいましたら、ご教示頂けますと幸いです。
※20191203追記
上記のライブラリをダウンロードして実装を試みました。
アプリのプロジェクトのFWはSeasar2を利用しており、
WEB-INF/lib直下に必要なjarを配置して「Javaのビルドパス」→ jarの追加でクラスパスを通したのですがEclipseのマーカーに「Archive for required library: 'C:/pleiades/workspace/【アプリ名】/src/main/webapp/WEB-INF/lib/aws-java-sdk-1.11.683.jar' in project '【アプリ名】' cannot be read or is not a valid ZIP file」と出ます。
古いaws-sdk-java を利用したほうがよいでしょうか?
その場合、AWS公式ドキュメントによるとmavenで構築することになるのでしょうか。
あなたの回答
tips
プレビュー