Intellij
Plugins
- Gitlink: useful for copy permalink.
- ideavim:
- https://github.com/JetBrains/ideavim#finding-action-ids tells how to get the action id, so we can map it.
- put .ideavimrc file in homefolder
JDK and Maven issue
When a maven project fails to build, you first need to check if the mvn package -DskipTests
can work directly in cmd line or not. If yes, then it is most likely the JDK version or maven version issue.
Intellij ships with a bundled maven which may be too old. You can check its version as below. You can choose maven wrapper which is a repo specific maven script.
mvnw
is similar to gradlew
. You can set it up by mvn wrapper:wrapper. The generated property file is like below.
1
2
3
4
$ cat .mvn/wrapper/maven-wrapper.properties
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.10/apache-maven-3.9.10-bin.zip
It also generates a shell script mvnw
that basically does the following thing.
- Check if
$HOME/.m2/wrapper/dists/apache-maven-<version>-bin
exits or not. - If exists, then use it to run maven command.
- If not, then download it first.
Issues
- go to definition not working
Choose the right source root. The right source root can be found from the import pattern.
This post is licensed under CC BY 4.0 by the author.