Skip to content

Development Setup

ljacqu edited this page Dec 18, 2016 · 12 revisions

Some tips and recommendations for people who want to work on AuthMe.

IntelliJ

  • Make sure you are running idea64.exe if on a 64-bit operating system (faster).

  • Maven: if asked to enable auto-import, select it. This will update your dependencies automatically when they are changed in the pom.xml

  • If @Inject fields are marked with the "never declared" warning, go to Settings > search "unused declaration," select the Java one and press the button "Configure annotations." Add @Inject and @InjectDelayed.

  • You can make issue numbers in commit messages clickable by going to Settings > search "issue navigation", add a new rule:

Issue ID: #(\d+)
Issue link: https://github.com/Xephi/AuthMeReloaded/issues/$1
  • Do you get an error message "missing argLine" when trying to run unit tests? Go to settings > search "Running Tests" and uncheck "argLine"

Forking AuthMe

  • Please fork the AuthMe/AuthMeReloaded repo, NOT the one under Xephi's name. The AuthMe/AuthMeReloaded repo is sometimes hundreds of commits ahead.

  • Tip: add the AuthMe repository to Git. Execute in console: git remote add upstream https://github.com/AuthMe/AuthMeReloaded.git. In IntelliJ use Ctrl+Shift+A > "fetch" and you will see the branches of your repository as well as of the AuthMe-Team.

  • Do not commit any changes to your master. Use it only to keep in sync with the upstream repo. This way you can always pull new changes from the parent repo into your local master without any conflicts. Then you can merge your local master with your custom branches to keep them up to date.

    • If you commit changes to your fork's master directly, you will generate a merge commit every time you pull new changes from AuthMe/AuthMeReloaded into your local master. This creates unnecessary noise in the Git history and generates ugly pull requests.

Debugging AuthMe in IntelliJ

See Run Configuration to Debug Bukkit/Minecraft Plugin in IntelliJ IDEA on StackOverflow.

If you get ClassDefNotFoundError, make sure you extract all dependencies into the JAR. Right-click the dependencies on the right and select "Extract Into Output Root." Then move them inside the JAR file.

Screenshot dependencies setup