Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify comments in generated user config. #624

Merged
merged 1 commit into from
Jan 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 57 additions & 56 deletions cli/impl/src/main/java/io/helidon/build/cli/impl/UserConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,62 +64,63 @@ public class UserConfig {
private static final String SYSTEM_PROPERTY_PREFIX = "system_";
private static final String DEFAULT_CONFIG =
"\n"
+ "# When using the init command to create a new project, default values for the\n"
+ "# project name, group id and artifact id are defined here. Property substitution\n"
+ "# is performed with values looked up first from system properties then environment\n"
+ "# variables. A few special properties are defined and resolved during init command\n"
+ "# execution and are distinguished with an \"init_\" prefix:\n"
+ "#\n"
+ "# init_flavor the selected Helidon flavor, e.g. \"SE\", converted to lowercase\n"
+ "# init_archetype the name of the selected archetype, e.g. \"quickstart\"\n"
+ "# init_build the selected build type, e.g. \"maven\", converted to lowercase\n"
+ "\n"
+ DEFAULT_GROUP_ID_KEY + "=" + DEFAULT_GROUP_ID_DEFAULT_VALUE + "\n"
+ DEFAULT_ARTIFACT_ID_KEY + "=" + DEFAULT_ARTIFACT_DEFAULT_VALUE + "\n"
+ DEFAULT_PACKAGE_NAME_KEY + "=" + DEFAULT_PACKAGE_NAME_DEFAULT_VALUE + "\n"
+ DEFAULT_PROJECT_NAME_KEY + "=" + DEFAULT_PROJECT_NAME_DEFAULT_VALUE + "\n"
+ "\n"
+ "# NOTE: Starting in Helidon 3.0.0, " + DEFAULT_PROJECT_NAME_KEY + " is ignored and\n"
+ "# " + DEFAULT_ARTIFACT_ID_KEY + " is used instead to name project directories.\n"
+ "\n"
+ "# When using the init command and a project with the same name/artifactId already\n"
+ "# exists, this value controls whether it should fail or if the name should be made\n"
+ "# unique by appending a unique digit, e.g. \"quickstart-se-1\".\n"
+ "\n"
+ FAIL_ON_PROJECT_NAME_COLLISION_KEY + "=" + FAIL_ON_PROJECT_NAME_COLLISION_DEFAULT_VALUE + "\n"
+ "\n"
+ "# The CLI can use rich text (color, italic, etc.) where supported; setting this\n"
+ "# value to \"false\" will disable this feature and is equivalent to using the\n"
+ "# \"--plain\" option on all commands.\n"
+ "\n"
+ RICH_TEXT_KEY + "=" + RICH_TEXT_DEFAULT_VALUE + "\n"
+ "\n"
+ "# The CLI regularly updates information about new Helidon and/or CLI releases, and\n"
+ "# this value controls the minimum number of hours between rechecks. Update checks\n"
+ "# can be forced on every invocation with a zero value or disabled with a negative\n"
+ "# value.\n"
+ "\n"
+ UPDATE_INTERVAL_HOURS_KEY + "=" + UPDATE_INTERVAL_HOURS_DEFAULT_VALUE + "\n"
+ "\n"
+ "# The CLI can download new releases to help reduce the number of installation\n"
+ "# steps, and this value controls whether or not to do so.\n"
+ "\n"
+ DOWNLOAD_UPDATES_KEY + "=" + DOWNLOAD_UPDATES_DEFAULT_VALUE + "\n"
+ "\n"
+ "# System properties can be set by using the \"system_\" key prefix, e.g.:\n"
+ "\n"
+ "# " + "system_http.proxyHost=http://proxy.acme.com" + "\n"
+ "# " + "system_http.proxyPort=80" + "\n"
+ "# " + "system_http.nonProxyHosts=*.local|localhost|127.0.0.1|*.acme.com" + "\n"
+ "# " + "system_https.proxyHost=http://proxy.acme.com" + "\n"
+ "# " + "system_https.proxyPort=80" + "\n"
+ "# " + "system_https.nonProxyHosts=*.local|localhost|127.0.0.1|*.acme.com" + "\n"
+ "\n"
+ "# The CLI fetches update information from this location. Setting this may be\n"
+ "# necessary in environments with restricted internet access.\n"
+ "\n"
+ "# " + UPDATE_URL_KEY + "=" + UPDATE_URL_DEFAULT_VALUE + "\n"
+ "\n";
+ "# When using the init command to create a new project, default values for the\n"
+ "# project name, group id and artifact id are defined here. Property substitution\n"
+ "# is performed with values looked up first from system properties then environment\n"
+ "# variables. A few special properties are defined and resolved during init command\n"
+ "# execution and are distinguished with an \"init_\" prefix:\n"
+ "#\n"
+ "# init_flavor the selected Helidon flavor, e.g. \"SE\", converted to lowercase\n"
+ "# init_archetype the name of the selected archetype, e.g. \"quickstart\"\n"
+ "# init_build the selected build type, e.g. \"maven\", converted to lowercase\n"
+ "\n"
+ DEFAULT_GROUP_ID_KEY + "=" + DEFAULT_GROUP_ID_DEFAULT_VALUE + "\n"
+ DEFAULT_ARTIFACT_ID_KEY + "=" + DEFAULT_ARTIFACT_DEFAULT_VALUE + "\n"
+ DEFAULT_PACKAGE_NAME_KEY + "=" + DEFAULT_PACKAGE_NAME_DEFAULT_VALUE + "\n"
+ DEFAULT_PROJECT_NAME_KEY + "=" + DEFAULT_PROJECT_NAME_DEFAULT_VALUE + "\n"
+ "\n"
+ "# NOTE: Starting in Helidon 3.x, " + DEFAULT_PROJECT_NAME_KEY + " is ignored and\n"
+ "# " + DEFAULT_ARTIFACT_ID_KEY + " will be used instead to name project\n"
+ "# directories when artifactId is not supplied on the command line.\n"
+ "\n"
+ "# When using the init command and a project with the same directory name already\n"
+ "# exists, this value controls whether it should fail or if the name should be made\n"
+ "# unique by appending a unique digit, e.g. \"quickstart-se-1\".\n"
+ "\n"
+ FAIL_ON_PROJECT_NAME_COLLISION_KEY + "=" + FAIL_ON_PROJECT_NAME_COLLISION_DEFAULT_VALUE + "\n"
+ "\n"
+ "# The CLI can use rich text (color, italic, etc.) where supported; setting this\n"
+ "# value to \"false\" will disable this feature and is equivalent to using the\n"
+ "# \"--plain\" option on all commands.\n"
+ "\n"
+ RICH_TEXT_KEY + "=" + RICH_TEXT_DEFAULT_VALUE + "\n"
+ "\n"
+ "# The CLI regularly updates information about new Helidon and/or CLI releases, and\n"
+ "# this value controls the minimum number of hours between rechecks. Update checks\n"
+ "# can be forced on every invocation with a zero value or disabled with a negative\n"
+ "# value.\n"
+ "\n"
+ UPDATE_INTERVAL_HOURS_KEY + "=" + UPDATE_INTERVAL_HOURS_DEFAULT_VALUE + "\n"
+ "\n"
+ "# The CLI can download new releases to help reduce the number of installation\n"
+ "# steps, and this value controls whether or not to do so.\n"
+ "\n"
+ DOWNLOAD_UPDATES_KEY + "=" + DOWNLOAD_UPDATES_DEFAULT_VALUE + "\n"
+ "\n"
+ "# System properties can be set by using the \"system_\" key prefix, e.g.:\n"
+ "\n"
+ "# " + "system_http.proxyHost=http://proxy.acme.com" + "\n"
+ "# " + "system_http.proxyPort=80" + "\n"
+ "# " + "system_http.nonProxyHosts=*.local|localhost|127.0.0.1|*.acme.com" + "\n"
+ "# " + "system_https.proxyHost=http://proxy.acme.com" + "\n"
+ "# " + "system_https.proxyPort=80" + "\n"
+ "# " + "system_https.nonProxyHosts=*.local|localhost|127.0.0.1|*.acme.com" + "\n"
+ "\n"
+ "# The CLI fetches update information from this location. Setting this may be\n"
+ "# necessary in environments with restricted internet access.\n"
+ "\n"
+ "# " + UPDATE_URL_KEY + "=" + UPDATE_URL_DEFAULT_VALUE + "\n"
+ "\n";

private final Path homeDir;
private final Path configDir;
Expand Down