# Actions通过maven构建项目失败

**URL:** <https://forum.gitea.com/t/actions-maven/9079>\
**Category:** 中文求助(Chinese Only)\
**Created:** [May 5, 2024, 7:41am UTC](https://forum.gitea.com/t/actions-maven/9079 "2024-05-05T07:41:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaotuyun](https://avatars.discourse-cdn.com/v4/letter/x/3d9bf3/32.png) [@xiaotuyun](https://forum.gitea.com/u/xiaotuyun)\
**Post date:** [May 5, 2024, 7:41am UTC](https://forum.gitea.com/t/actions-maven/9079/1 "2024-05-05T07:41:59Z")

</div>

1.使用maven命令mvn -B clean install打包项目，报错/var/run/act/workflow/7: line 2: mvn: command not found，显示mvn命令没找到  
2. 我通过

- name: Set up JDK 17  
uses: actions/setup-java@v4  
with:  
java-version: ‘17’  
distribution: ‘microsoft’  
cache: ‘maven’  
安装jdk17并且成功，但是使用mvn命令的就无法使用。  
请问这个要怎么解决

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [May 11, 2024, 6:12am UTC](https://forum.gitea.com/t/actions-maven/9079/2 "2024-05-11T06:12:29Z")

</div>

You can find some examples here [action-examples/Java: Gitea actions example for Java - Java - Gitea: Git with a cup of tea](https://gitea.com/action-examples/Java)
