Skip to main content

NSX Expanders Project

Create a new expansion resource project.

  • Expansion resource: net.democritus.initializer:nsx-expanders-initializer@4.32.0
  • Command: nsinit expanders
  • Example project: Bitbucket

Overview

The NSX expanders project initializer is an initializer bundle which is used to create new expansion resource projects with support for tooling and infrastructure used at NSX.

This initializer can provision a very comprehensive setup for a new expanders project containing the following:

  • A Maven project for the expansion resource and the Maven project directory structure.
  • Some typical project files are generated, such as README.md and CHANGELOG.md as stub files to be filled out by the user. Also an EditorConfig file with a basic setup for clean editing of the files in the repository is generated.
  • Support for the Jenkins CI/CD platform with a Jenkinsfile that builds and deploys the expansion resource. It also integrates with SonarQube for automated code quality tracking.
  • Initialization of a local git repository for the project, with an initial commit containing everything that should be committed to the repository.

Generated files

  • pom.xml Maven project file with the name of the output directory as the artifactId.
  • .gitignore file to ignore any known files that should not be committed to a Git repository.
  • .editorconfig file with some basic standard rules for formatting code in files.
  • README.md file to provide some basic information about the project.
  • CHANGELOG.md file to document changes to the project.
  • Jenkinsfile file with basic configuration to expand and build the project in Jenkins.
  • A local git repository with a first commit containing all generated files.

Parameters

For an overview, run nsinit app -h.

OptionDescription
-h,
--help
Returns the help with an overview of all commands.
--groupid,
--group-id
The groupId for the pom.xml Maven project file.
--artifactidThe artifactId for the pom.xml Maven project file.
--[no-]jenkinsGenerate a Jenkinsfile. Default: true
--[no-]sonarAdd SonarQube integration to the generated project. Implied no Jenkinsfile is generated. Default: true
--[no-]gitInitialize a local git repository and generate a .gitignore file. Default: true
-DAllows you to set any argument or flag defined for the project type, even those that are implicit. For an argument, the key should be prefixed by arg. and for a flag with flag.. E.g.: -Darg.artifactId=test-expanders
-o,
--output
The directory where the project should be generated, rather than the current directory.
-y,
--yes-to-all
Disables the interactive mode and accepts defaults for all settings that were not specified as arguments.
-f,
--force
Forces the creation of the project, even when the output directory is not empty.

Example

nsinit expanders -y -o my-new-expanders --groupid com.example

Resulting project:

my-new-expanders/
├── CHANGELOG.md
├── .editorconfig
├── .git
├── .gitignore
├── Jenkinsfile
├── pom.xml
├── README.md
├── renovate.json
├── scripts
│   ├── release.nss
│   ├── _set_version.nss
│   └── set_version.nss
└── src
├── main
│   ├── java
│   └── resources
│   └── data
│   └── optionTypes.xml
└── test
├── java
└── resources