public class NodeInstaller extends Object
Derived from eirslett/frontend-maven-plugin
For internal use only. May be renamed or removed in a future release.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NODEJS_DOWNLOAD_ROOT |
static String |
INSTALL_PATH |
static String |
PROVIDED_VERSION |
static String |
UNOFFICIAL_NODEJS_DOWNLOAD_ROOT |
| Constructor and Description |
|---|
NodeInstaller(File installDirectory,
List<ProxyConfig.Proxy> proxies)
Create NodeInstaller with default extractor and downloader and guess
platform.
|
NodeInstaller(File installDirectory,
Platform platform,
com.vaadin.flow.server.frontend.installer.ArchiveExtractor archiveExtractor,
com.vaadin.flow.server.frontend.installer.FileDownloader fileDownloader)
Initialize a new NodeInstaller.
|
NodeInstaller(File installDirectory,
Platform platform,
List<ProxyConfig.Proxy> proxies)
Create NoodeInstaller with default extractor and downloader.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getInstallDirectory() |
void |
install()
Install node and NPM.
|
NodeInstaller |
setNodeDownloadRoot(URI nodeDownloadRoot)
Set a custom download root.
|
NodeInstaller |
setNodeVersion(String nodeVersion)
Set the node version to install.
|
NodeInstaller |
setPassword(String password)
Set password to use.
|
NodeInstaller |
setUserName(String userName)
Set user name to use.
|
public static final String INSTALL_PATH
public static final String DEFAULT_NODEJS_DOWNLOAD_ROOT
public static final String UNOFFICIAL_NODEJS_DOWNLOAD_ROOT
public static final String PROVIDED_VERSION
public NodeInstaller(File installDirectory, List<ProxyConfig.Proxy> proxies)
installDirectory - installation directoryproxies - list of proxiespublic NodeInstaller(File installDirectory, Platform platform, List<ProxyConfig.Proxy> proxies)
installDirectory - installation directoryplatform - platform informationproxies - list of proxiespublic NodeInstaller(File installDirectory, Platform platform, com.vaadin.flow.server.frontend.installer.ArchiveExtractor archiveExtractor, com.vaadin.flow.server.frontend.installer.FileDownloader fileDownloader)
installDirectory - installation directoryplatform - platform informationarchiveExtractor - archive extractorfileDownloader - file downloaderpublic NodeInstaller setNodeVersion(String nodeVersion)
nodeVersion - version stringpublic NodeInstaller setNodeDownloadRoot(URI nodeDownloadRoot)
This should be a url or directory under which we can find a directory
nodeVersion and there should then exist the archived node
packages. For instance for v14.15.4 we should have under
nodeDownloadRoot: ./v14.15.4/node-v14.15.4-linux-x64.tar.xz
./v14.15.4/node-v14.15.4-darwin-x64.tar.gz
./v14.15.4/node-v14.15.4-win-x64.zip ./v14.15.4/node-v14.15.4-win-x86.zip
nodeDownloadRoot - custom download rootpublic NodeInstaller setUserName(String userName)
userName - user namepublic NodeInstaller setPassword(String password)
password - passwordpublic void install()
throws InstallationException
InstallationException - exception thrown when installation failspublic String getInstallDirectory()
Copyright © 2025. All rights reserved.