Java环境常用工具地址
背景
Java程序员必备工具
安装包
- JDK (mac 1.8):https://d6.injdk.cn/oraclejdk/8/jdk-8u301-macosx-x64.dmg
- JDK (mac 1.8): https://mirrors.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-macosx-x64.dmg
- maven 3.6.3:https://mirrors.aliyun.com/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip
- gradle 7.1.1: https://mirrors.cloud.tencent.com/gradle/gradle-7.1.1-bin.zip
- tomcat: https://mirrors.aliyun.com/apache/tomcat/tomcat-9/v9.0.80/bin/
- jenkins: https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable/2.414.1/ (不能直接wget,有头的验证)
pom文件
maven不支持第一个路径下没有jar时,自动搜索下一个路径。
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- 中央仓库1 -->
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
<!-- 中央仓库2 -->
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
</mirrors>
</settings>
gradle
配置文件
repositories {
maven{ url 'https://maven.aliyun.com/repository/central' }
maven{ url 'https://maven.aliyun.com/repository/public' }
maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
}
Idea
Idea必备插件
- Maven Helper
Linux下Idea图标
在桌面建 idea.desktop
文件,内容如下:
[Desktop Entry]
Name=IntelliJ IDEA
Comment=IntelliJ IDEA
Exec=/var/local/idea/bin/idea.sh
Icon=/var/local/idea/bin/idea.png
Terminal=false
Type=Application
Categories=Developer;
gradle
编写文件 ~/.gradle/init.gradle
,内容如下:
allprojects {
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
}
}
repositories {
maven {
url 'https://maven.aliyun.com/repository/public'
}
maven {
url 'https://maven.aliyun.com/repository/spring'
}
maven {
url 'https://maven.aliyun.com/repository/google'
}
maven {
url 'https://maven.aliyun.com/repository/central'
}
maven {
url 'https://maven.aliyun.com/repository/gradle-plugin'
}
maven {
url 'https://maven.aliyun.com/repository/spring-plugin'
}
maven {
url 'https://maven.aliyun.com/repository/grails-core'
}
maven {
url 'https://maven.aliyun.com/repository/apache-snapshots'
}
}
}
字体大小
在Linux下,idea的字体默认大小太小了,这样修改: File->Settings->Editor->Font
。
字体
cp CustomizedFonts /usr/share/fonts/truetype
mkfontscale
mkfontdir
fc-cache