You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询:Jenkins 1.651.3中如何获取Maven 3.5.0及以上版本

Solution for Installing Maven 3.5.0 in Jenkins 1.651.3

Got it, let's tackle this problem head-on. Jenkins 1.651.3 is a pretty dated release, so its built-in Maven installer doesn't include newer versions like 3.5.0 by default. Here are two key parts to solve this: getting Maven 3.5.0 working with your Jenkins instance, and trying to get the installer to recognize newer versions.

Fixing the Maven 3.5.0 Compatibility Issue

The most reliable way (especially for older Jenkins versions) is to install Maven manually on your server and then point Jenkins to it:

  1. Manually install Maven 3.5.0 on your Jenkins server

    • SSH into the server running Jenkins.
    • Download the Maven 3.5.0 binary archive:
      wget https://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz
      
    • Extract it to a stable directory (e.g., /opt/maven):
      sudo tar -xzf apache-maven-3.5.0-bin.tar.gz -C /opt/maven/
      
    • (Optional) Set up environment variables so the system recognizes Maven globally:
      Edit your shell profile (e.g., ~/.bashrc or /etc/profile) and add:
      export MAVEN_HOME=/opt/maven/apache-maven-3.5.0
      export PATH=$MAVEN_HOME/bin:$PATH
      
      Apply the changes with source ~/.bashrc.
  2. Configure Jenkins to use the manually installed Maven

    • Open your Jenkins dashboard, go to Manage Jenkins > Global Tool Configuration.
    • Scroll down to the Maven section.
    • Click Add Maven, then uncheck the Install automatically box.
    • Give this Maven installation a name (e.g., Maven 3.5.0), then paste the path to your installed Maven in the MAVEN_HOME field (/opt/maven/apache-maven-3.5.0 in our example).
    • Save the configuration. Now when you set up or edit a Jenkins job, you can select this Maven 3.5.0 version from the Maven dropdown.

Getting the Jenkins Installer to Recognize Newer Maven Versions

If you prefer using Jenkins' automatic installer, here's what you can try (note: success depends on plugin compatibility with your old Jenkins version):

  1. Update the Maven Installer Plugin

    • Go to Manage Jenkins > Manage Plugins.
    • Switch to the Available tab, search for Maven Installer.
    • Check if there's an updated version of the plugin that's compatible with Jenkins 1.651.3. Install it, then restart Jenkins.
    • After restarting, go back to Global Tool Configuration > Maven—you should now see newer Maven versions (including 3.5.0) in the dropdown when you check Install automatically.
  2. Manually enter the Maven version

    • Some older Jenkins versions let you bypass the dropdown and manually type the version number. Go to Global Tool Configuration > Maven, click Add Maven, check Install automatically, then type 3.5.0 directly into the Version field.
    • Save the configuration—Jenkins will attempt to download and install Maven 3.5.0 automatically. If this works, great! If not, stick with the manual installation method above.

Important Note

Jenkins 1.651.3 is no longer supported (it was released in 2016), so you might run into other compatibility issues with newer tools or plugins. If possible, upgrading to a supported Jenkins version is the long-term solution—but if you're stuck with 1.651.3, the manual installation method is your safest bet.

内容的提问来源于stack exchange,提问作者DenCowboy

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:55:19