当前位置: 首页 > news >正文

【智慧物联网平台】编译jar环境 Linux 系统Maven 安装——仙盟创梦IDE

编辑系统环境

/etc/profile

 

手动安装指定版本(适合需要特定版本的场景)

若包管理器中的 Maven 版本不符合需求(如项目要求 3.8.x 或更高),可手动安装:

1. 安装依赖 JDK

Maven 依赖 Java 环境,先确保已安装 JDK(以 OpenJDK 1.8 为例):

bash

sudo dnf install -y java-1.8.0-openjdk-devel
java -version  # 验证 Java 安装

2. 下载 Maven 二进制包

从 Maven 官网 复制最新版或指定版本的下载链接(以 3.9.6 为例):

下载地址

Index of /maven

bash

# 创建安装目录
sudo mkdir -p /usr/local/maven# 下载并解压
wget https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
sudo tar -zxvf apache-maven-3.9.6-bin.tar.gz -C /usr/local/maven --strip-components=1

3. 配置环境变量

编辑 /etc/profile(全局生效)或 ~/.bashrc(当前用户生效):

bash

sudo nano /etc/profile

在文件末尾添加:

bash

export MAVEN_HOME=/usr/local/maven
export PATH=$MAVEN_HOME/bin:$PATH

保存后使配置生效:

bash

source /etc/profile

4. 验证安装

bash

mvn -version

输出示例:

plaintext

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08ccf28cc506)
Maven home: /usr/local/maven
Java version: 1.8.0_382, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.382.b05-1.al8.x86_64/jre
...

 

阿雪技术观


在科技发展浪潮中,我们不妨积极投身技术共享。不满足于做受益者,更要主动担当贡献者。无论是分享代码、撰写技术博客,还是参与开源项目维护改进,每一个微小举动都可能蕴含推动技术进步的巨大能量。东方仙盟是汇聚力量的天地,我们携手在此探索硅基生命,为科技进步添砖加瓦。

Hey folks, in this wild tech - driven world, why not dive headfirst into the whole tech - sharing scene? Don't just be the one reaping all the benefits; step up and be a contributor too. Whether you're tossing out your code snippets, hammering out some tech blogs, or getting your hands dirty with maintaining and sprucing up open - source projects, every little thing you do might just end up being a massive force that pushes tech forward. And guess what? The Eastern FairyAlliance is this awesome place where we all come together. We're gonna team up and explore the whole silicon - based life thing, and in the process, we'll be fueling the growth of technology.

http://www.dtcms.com/a/302524.html

相关文章:

  • Leaflet 综合案例-聚类图层控制
  • django ManyToManyField 如何添加数据
  • Django缓存机制详解:从配置到实战应用
  • MGRE 实验
  • Django 视图详解(View):处理请求与返回响应的核心
  • Linux IPC实战:管道与命名管道的进程对话术
  • 语音识别数据增强
  • llama系列
  • 1688寻源通接口接入要点||电商API接口
  • 电脑ip地址在哪里看
  • 如何提升 TCP 传输数据的性能?详解
  • 信息收集工具ARL资产侦察灯塔系统搭建教程
  • 最新的前端技术和趋势(2025)
  • STM32启动流程
  • 防水医用无人机市场报告:现状、趋势与洞察
  • 无人机喷洒系统技术要点与难点解析
  • Go性能优化深度指南:从原理到实战
  • 机器学习与深度学习评价指标
  • 实战经验总结:如何快速理解一套完整的移动端设计规范
  • 代理 ARP 的三种应用场景:端口隔离、VLAN聚合、单臂路由
  • 在 Windows 系统 下直接使用了 Linux/macOS 的环境变量设置语法 PLATFORM=android
  • IP协议解析:从寻址到路由
  • 企业管理双核心:ERP 系统与 CRM 系统的功能对比
  • 跨境电商更换外模,无实景拍摄,制作商品图
  • 策略路由(PBR技术)
  • Cloudflare CDN 中设置地域限制并返回特定界面
  • Java排序算法之<归并排序>
  • ORA-13516: AWR Operation failed: CATPROC not valid
  • AT89C 系列单片机知识点总结
  • clion解决引入头文件后找不到函数实现:Undefined symbols for architecture x86_64