legacy-knowledge-base
公開されました Jul. 2, 2025

「Cannot run program ./gradlew」エラーが原因で Jenkins ビルドが失敗する

written-by

Matheus Monteiro

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 次のエラーが原因で、Jenkins でのビルドが失敗します。
    Cannot run program "./gradlew" (in directory "/var/jenkins_home/workspace/YOUR_REPO_NAME_master"): error=13, Permission denied

Screen_Shot_2020-08-05_at_09.13.18.png

環境

  • Liferay Experience Cloud - 自己管理型
  • Jenkins イメージ 3.2.8 以前

解決策

  • ローカル リポジトリのルート フォルダーで、次のコマンドを使用してファイル gradlew のアクセス許可を確認してください (Linux または Mac を使用している場合)。
    ls -la
  • gradlew ファイルに実行権限がないことを確認したら、次のように権限を変更します。
    chmod +x gradlew
  • コミットして再度ビルドする
  • それでもエラーが発生する場合 (ファイルのアクセス許可を変更したブランチに基づいてビルドしていることを確認してください)、サポート チケットを開いてください。
did-this-article-resolve-your-issue

legacy-knowledge-base