SagaBegins / java-multi-module-project-helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java multi module project Helper

Description

java-helper is a bash script/configuration which makes navigating between, building and running java multi module projects easier. Currently supports gradle projects but can be modified to support others. Maven support will be added soon.

helper.ps1 is a powershell script which supports selecting gradle multi-projects, navigating between the sub-projects under the base multi-project. More features will be added soon.

Some other helpful shell scripts and a multi-module project to test the java-helper file can be found here.

Using java-helper.rc

source <path to helper> [options]

Java-HelperrcDemo

Options supported by java-helper

  • -n|--no-info: Does not print helper info.
  • -v|--vpn: Connects to openvpn server.
  • -c|--chdir: Changes directory to Base of project.
  • -p|--custom-ps1: Uses custom ps1

Most of the commands available have -h|--help option to describe how the command can be used.

Some commands which java-helper supports

  • helper_info: Prints some helpful information.
  • chdir <project-name>: Change directory between subprojects.
  • bld [project-name] [options]: Clean builds a specific project.
  • btrun [project-name] [options]: Runs spring boot project.
  • show_jacoco [project-name]: Opens the java code coverage html of the specified project or current directory if nothing is provided.
  • show_checkstyle [project-name]: Opens the checkstyle html of the specified project or current directory if nothing is provided.
  • edit_config: Opens config in gedit.
  • edit_helper: Opens helper in gedit.
  • open_file <code-file-names>: Opens the specified code file in visual studio code.
  • scan_code [Kotlin|Java] : Scans for codes files of specified language. Scans for java files by default.

Using helper.ps1

powershell -noexit -executionpolicy bypass -File <path to helper.ps1>

HelperPs1Demo

Commands

  • Select-Project <path>: Scans for gradle sub projects in the specified absolute path to the base project.
  • Get-ProjectName <path>: Returns project name extracted from the path.
  • Set-Project-Location [project-name]: Changes directory to the specified project. If no argument is passed changes directory to base directory of the multi-project.
  • Open-Files <first-file-name>[, second-file-name[, ...]]: Opens the specified code file name.
  • Scan-Code [-Language <Java|Kotlin>]: Scans the present directory for code files of specified language.

About


Languages

Language:Shell 85.0%Language:PowerShell 15.0%