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

Default nodejs root to https #270

Merged
merged 2 commits into from
Sep 25, 2015
Merged
Show file tree
Hide file tree
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
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ The working directory is where you've put `package.json` and your frontend confi
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>...</version>

<!-- optional -->
<configuration>
<workingDirectory>src/main/frontend</workingDirectory>
</configuration>

<executions>
...
</executions>
</plugin>
```

### Installing node and npm
The versions of Node and npm are downloaded from http://nodejs.org/dist, extracted and put into a `node` folder created in your working directory. (Remember to gitignore the `node` folder, unless you actually want to commit it)
The versions of Node and npm are downloaded from https://nodejs.org/dist, extracted and put into a `node` folder created in your working directory. (Remember to gitignore the `node` folder, unless you actually want to commit it)
Node/npm will only be "installed" locally to your project. It will not be installed globally on the whole system (and it will not interfere with any Node/npm installations already present.)
```xml
<execution>
Expand All @@ -76,7 +76,7 @@ Node/npm will only be "installed" locally to your project. It will not be instal
<configuration>
<nodeVersion>v0.10.18</nodeVersion>
<npmVersion>1.3.8</npmVersion>
<!-- optional: where to download node and npm from. Defaults to http://nodejs.org/dist/ -->
<!-- optional: where to download node and npm from. Defaults to https://nodejs.org/dist/ -->
<downloadRoot>http://myproxy.example.org/nodejs/dist/</downloadRoot>
<!-- optional: where to install node and npm. Defaults to the working directory -->
<installDirectory>target</installDirectory>
Expand All @@ -91,7 +91,7 @@ You can also specify separate download roots for npm and node as they are now st
<configuration>
<nodeVersion>v0.12.1</nodeVersion>
<npmVersion>2.7.1</npmVersion>
<nodeDownloadRoot>http://nodejs.org/nodejs/dist/</nodeDownloadRoot>
<nodeDownloadRoot>https://nodejs.org/nodejs/dist/</nodeDownloadRoot>
<npmDownloadRoot>http://npm.org/npm/-/</npmDownloadRoot>
</configuration>
</execution>
Expand All @@ -109,10 +109,10 @@ By default, no colors will be shown in the log.
<goals>
<goal>npm</goal>
</goals>

<!-- optional: default phase is "generate-resources" -->
<phase>generate-resources</phase>

<configuration>
<!-- optional: The default argument is actually
"install", so unless you need to run some other npm command,
Expand All @@ -131,15 +131,15 @@ All bower dependencies will be installed in the `bower_components` folder in you
<goals>
<goal>bower</goal>
</goals>

<configuration>
<!-- optional: The default argument is actually
"install", so unless you need to run some other bower command,
you can remove this whole <configuration> section.
-->
<arguments>install</arguments>
</configuration>
</execution>
</execution>
```

### Running jspm
Expand All @@ -150,15 +150,15 @@ All jspm dependencies will be installed in the `jspm_packages` folder in your wo
<goals>
<goal>jspm</goal>
</goals>

<configuration>
<!-- optional: The default argument is actually
"install", so unless you need to run some other jspm command,
you can remove this whole <configuration> section.
-->
<arguments>install</arguments>
</configuration>
</execution>
</execution>
```

### Running Grunt
Expand All @@ -170,10 +170,10 @@ By default, no colors will be shown in the log.
<goals>
<goal>grunt</goal>
</goals>

<!-- optional: the default phase is "generate-resources" -->
<phase>generate-resources</phase>

<configuration>
<!-- optional: if not specified, it will run Grunt's default
task (and you can remove this whole <configuration> section.) -->
Expand All @@ -191,10 +191,10 @@ By default, no colors will be shown in the log.
<goals>
<goal>gulp</goal>
</goals>

<!-- optional: the default phase is "generate-resources" -->
<phase>generate-resources</phase>

<configuration>
<!-- optional: if not specified, it will run gulp's default
task (and you can remove this whole <configuration> section.) -->
Expand All @@ -210,11 +210,11 @@ By default, no colors will be shown in the log.
<goals>
<goal>karma</goal>
</goals>

<!-- optional: the default plase is "test". Some developers
choose to run karma in the "integration-test" phase. -->
<phase>test</phase>

<configuration>
<!-- optional: the default is "karma.conf.js" in your working directory -->
<karmaConfPath>src/test/javascript/karma.conf.ci.js</karmaConfPath>
Expand Down Expand Up @@ -258,9 +258,9 @@ as part of the `grunt` or `gulp` execution. That will help to separate your fron

# Eclipse M2E support

This plugin contains support for M2E, including lifecycle mappings and support for incremental builds in Eclipse.
The `install-node-and-npm` goal will only run on a full project build. The other goals support incremental builds
to avoid doing unnecessary work. During an incremental build the `npm` goal will only run if the `package.json` file
This plugin contains support for M2E, including lifecycle mappings and support for incremental builds in Eclipse.
The `install-node-and-npm` goal will only run on a full project build. The other goals support incremental builds
to avoid doing unnecessary work. During an incremental build the `npm` goal will only run if the `package.json` file
has been changed. The `grunt` and `gulp` goals have new `srcdir` and `triggerfiles` optional configuration options; if
these are set they check for changes in your source files before being run. See the wiki for more information.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

public interface NodeAndNPMInstaller {

String DEFAULT_NODEJS_DOWNLOAD_ROOT = "http://nodejs.org/dist/";
String DEFAULT_NODEJS_DOWNLOAD_ROOT = "https://nodejs.org/dist/";
String DEFAULT_NPM_DOWNLOAD_ROOT = "http://registry.npmjs.org/npm/-/";

void install(String nodeVersion, String npmVersion, String nodeDownloadRoot, String npmDownloadRoot) throws InstallationException;
Expand Down Expand Up @@ -153,17 +153,17 @@ private void installNpm() throws InstallationException {
FileUtils.copyDirectory(packageDirectory, npmDirectory);
}
}

// create a copy of the npm scripts next to the node executable
for (String script : Arrays.asList("npm", "npm.cmd")) {
File scriptFile = new File(npmDirectory, "bin/"+script);
if (scriptFile.exists()) {
File copy = new File(config.getInstallDirectory(), "/node/"+script);
FileUtils.copyFile(scriptFile, copy);
copy.setExecutable(true);
}
}
}

logger.info("Installed NPM locally.");
} catch (DownloadException e) {
throw new InstallationException("Could not download npm", e);
Expand Down