Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Initial application generated by JHipster-6.0.0
  • Loading branch information
jdubois committed May 2, 2019
1 parent 6e42d1c commit 30db72e
Show file tree
Hide file tree
Showing 383 changed files with 14,146 additions and 28,282 deletions.
15 changes: 7 additions & 8 deletions .editorconfig
Expand Up @@ -6,19 +6,18 @@ root = true


[*] [*]


# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged # We recommend you to keep these unchanged
end_of_line = lf end_of_line = lf
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true


[*.md] # Change these settings to your own preference
trim_trailing_whitespace = false

[package.json]
indent_style = space indent_style = space
indent_size = 4

[*.{ts,tsx,js,jsx,json,css,scss}]
indent_size = 2 indent_size = 2

[*.md]
trim_trailing_whitespace = false
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,7 +1,8 @@
###################### ######################
# Project Specific # Project Specific
###################### ######################
/target/www/** /src/main/webapp/content/css/main.css
/target/classes/static/**
/src/test/javascript/coverage/ /src/test/javascript/coverage/


###################### ######################
Expand Down
59 changes: 33 additions & 26 deletions .mvn/wrapper/MavenWrapperDownloader.java
@@ -1,34 +1,31 @@
/* /*
Licensed to the Apache Software Foundation (ASF) under one * Copyright 2007-present the original author or authors.
or more contributor license agreements. See the NOTICE file *
distributed with this work for additional information * Licensed under the Apache License, Version 2.0 (the "License");
regarding copyright ownership. The ASF licenses this file * you may not use this file except in compliance with the License.
to you under the Apache License, Version 2.0 (the * You may obtain a copy of the License at
"License"); you may not use this file except in compliance *
with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0
*
http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Unless required by applicable law or agreed to in writing, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
software distributed under the License is distributed on an * See the License for the specific language governing permissions and
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * limitations under the License.
KIND, either express or implied. See the License for the */
specific language governing permissions and limitations
under the License.
*/

import java.net.*; import java.net.*;
import java.io.*; import java.io.*;
import java.nio.channels.*; import java.nio.channels.*;
import java.util.Properties; import java.util.Properties;


public class MavenWrapperDownloader { public class MavenWrapperDownloader {


private static final String WRAPPER_VERSION = "0.5.4";
/** /**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/ */
private static final String DEFAULT_DOWNLOAD_URL = private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + " .jar";


/** /**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
Expand Down Expand Up @@ -57,7 +54,7 @@ public static void main(String args[]) {
// wrapperUrl parameter. // wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL; String url = DEFAULT_DOWNLOAD_URL;
if (mavenWrapperPropertyFile.exists()) { if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null; FileInputStream mavenWrapperPropertyFileInputStream = null;
try { try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Expand All @@ -68,21 +65,21 @@ public static void main(String args[]) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally { } finally {
try { try {
if (mavenWrapperPropertyFileInputStream != null) { if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close(); mavenWrapperPropertyFileInputStream.close();
} }
} catch (IOException e) { } catch (IOException e) {
// Ignore ... // Ignore ...
} }
} }
} }
System.out.println("- Downloading from: : " + url); System.out.println("- Downloading from: " + url);


File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if (!outputFile.getParentFile().exists()) { if(!outputFile.getParentFile().exists()) {
if (!outputFile.getParentFile().mkdirs()) { if(!outputFile.getParentFile().mkdirs()) {
System.out.println( System.out.println(
"- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
} }
} }
System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
Expand All @@ -98,6 +95,16 @@ public static void main(String args[]) {
} }


private static void downloadFileFromURL(String urlString, File destination) throws Exception { private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString); URL website = new URL(urlString);
ReadableByteChannel rbc; ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream()); rbc = Channels.newChannel(website.openStream());
Expand Down
Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties
@@ -1 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.4/maven-wrapper-0.5.4.jar
1 change: 1 addition & 0 deletions .prettierignore
@@ -1,3 +1,4 @@
node_modules node_modules
target target
package-lock.json package-lock.json
.git
2 changes: 1 addition & 1 deletion .prettierrc
Expand Up @@ -2,7 +2,7 @@


printWidth: 140 printWidth: 140
singleQuote: true singleQuote: true
tabWidth: 4 tabWidth: 2
useTabs: false useTabs: false


# js and ts rules: # js and ts rules:
Expand Down
7 changes: 4 additions & 3 deletions .yo-rc.json
Expand Up @@ -23,9 +23,9 @@
"en" "en"
], ],
"serverPort": 8080, "serverPort": 8080,
"jhipsterVersion": "5.8.2", "jhipsterVersion": "6.0.0",
"enableSocialSignIn": false, "enableSocialSignIn": false,
"useSass": false, "useSass": true,
"jhiPrefix": "jhi", "jhiPrefix": "jhi",
"messageBroker": false, "messageBroker": false,
"serviceDiscoveryType": false, "serviceDiscoveryType": false,
Expand All @@ -37,6 +37,7 @@
"reactive": false, "reactive": false,
"otherModules": [], "otherModules": [],
"entitySuffix": "", "entitySuffix": "",
"dtoSuffix": "DTO" "dtoSuffix": "DTO",
"clientTheme": "none"
} }
} }
62 changes: 40 additions & 22 deletions README.md
@@ -1,13 +1,13 @@
# jhipsterSampleApplication # jhipsterSampleApplication


This application was generated using JHipster 5.8.2, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v5.8.2](https://www.jhipster.tech/documentation-archive/v5.8.2). This application was generated using JHipster 6.0.0, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v6.0.0](https://www.jhipster.tech/documentation-archive/v6.0.0).


## Development ## Development


Before you can build this project, you must install and configure the following dependencies on your machine: Before you can build this project, you must install and configure the following dependencies on your machine:


1. [Node.js][]: We use Node to run a development web server and build the project. 1. [Node.js][]: We use Node to run a development web server and build the project.
Depending on your system, you can install Node either from source or as a pre-packaged bundle. Depending on your system, you can install Node either from source or as a pre-packaged bundle.


After installing Node, you should be able to run the following command to install development tools. After installing Node, you should be able to run the following command to install development tools.
You will only need to run this command when dependencies change in [package.json](package.json). You will only need to run this command when dependencies change in [package.json](package.json).
Expand All @@ -32,15 +32,15 @@ The `npm run` command will list all of the scripts available to run for this pro


Service workers are commented by default, to enable them please uncomment the following code. Service workers are commented by default, to enable them please uncomment the following code.


- The service worker registering script in index.html - The service worker registering script in index.html


```html ```html
<script> <script>
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
navigator.serviceWorker navigator.serviceWorker.register('./service-worker.js').then(function() {
.register('./service-worker.js') console.log('Service Worker Registered');
.then(function() { console.log('Service Worker Registered'); }); });
} }
</script> </script>
``` ```


Expand Down Expand Up @@ -89,24 +89,32 @@ will generate few files:


## Building for production ## Building for production


To optimize the jhipsterSampleApplication application for production, run: ### Packaging as jar


./mvnw -Pprod clean package To build the final jar and optimize the jhipsterSampleApplication application for production, run:

./mvnw -Pprod clean verify


This will concatenate and minify the client CSS and JavaScript files. It will also modify `index.html` so it references these new files. This will concatenate and minify the client CSS and JavaScript files. It will also modify `index.html` so it references these new files.
To ensure everything worked, run: To ensure everything worked, run:


java -jar target/*.war java -jar target/*.jar


Then navigate to [http://localhost:8080](http://localhost:8080) in your browser. Then navigate to [http://localhost:8080](http://localhost:8080) in your browser.


Refer to [Using JHipster in production][] for more details. Refer to [Using JHipster in production][] for more details.


### Packaging as war

To package your application as a war in order to deploy it to an application server, run:

./mvnw -Pprod,war clean verify

## Testing ## Testing


To launch your application's tests, run: To launch your application's tests, run:


./mvnw clean test ./mvnw verify


### Client tests ### Client tests


Expand All @@ -124,12 +132,22 @@ Sonar is used to analyse code quality. You can start a local Sonar server (acces
docker-compose -f src/main/docker/sonar.yml up -d docker-compose -f src/main/docker/sonar.yml up -d
``` ```


You can run a Sonar analysis with using the [sonar-scanner](https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner) or by using the maven plugin.

Then, run a Sonar analysis: Then, run a Sonar analysis:


``` ```
./mvnw -Pprod clean test sonar:sonar ./mvnw -Pprod clean verify sonar:sonar
``` ```


If you need to re-run the Sonar phase, please be sure to specify at least the `initialize` phase since Sonar properties are loaded from the sonar-project.properties file.

```
./mvnw initialize sonar:sonar
```

or

For more information, refer to the [Code quality page][]. For more information, refer to the [Code quality page][].


## Using Docker to simplify development (optional) ## Using Docker to simplify development (optional)
Expand All @@ -147,7 +165,7 @@ To stop it and remove the container, run:
You can also fully dockerize your application and all the services that it depends on. You can also fully dockerize your application and all the services that it depends on.
To achieve this, first build a docker image of your app by running: To achieve this, first build a docker image of your app by running:


./mvnw package -Pprod verify jib:dockerBuild ./mvnw -Pprod verify jib:dockerBuild


Then run: Then run:


Expand All @@ -160,13 +178,13 @@ For more information refer to [Using Docker and Docker-Compose][], this page als
To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information. To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information.


[jhipster homepage and latest documentation]: https://www.jhipster.tech [jhipster homepage and latest documentation]: https://www.jhipster.tech
[jhipster 5.8.2 archive]: https://www.jhipster.tech/documentation-archive/v5.8.2 [jhipster 6.0.0 archive]: https://www.jhipster.tech/documentation-archive/v6.0.0
[using jhipster in development]: https://www.jhipster.tech/documentation-archive/v5.8.2/development/ [using jhipster in development]: https://www.jhipster.tech/documentation-archive/v6.0.0/development/
[using docker and docker-compose]: https://www.jhipster.tech/documentation-archive/v5.8.2/docker-compose [using docker and docker-compose]: https://www.jhipster.tech/documentation-archive/v6.0.0/docker-compose
[using jhipster in production]: https://www.jhipster.tech/documentation-archive/v5.8.2/production/ [using jhipster in production]: https://www.jhipster.tech/documentation-archive/v6.0.0/production/
[running tests page]: https://www.jhipster.tech/documentation-archive/v5.8.2/running-tests/ [running tests page]: https://www.jhipster.tech/documentation-archive/v6.0.0/running-tests/
[code quality page]: https://www.jhipster.tech/documentation-archive/v5.8.2/code-quality/ [code quality page]: https://www.jhipster.tech/documentation-archive/v6.0.0/code-quality/
[setting up continuous integration]: https://www.jhipster.tech/documentation-archive/v5.8.2/setting-up-ci/ [setting up continuous integration]: https://www.jhipster.tech/documentation-archive/v6.0.0/setting-up-ci/
[node.js]: https://nodejs.org/ [node.js]: https://nodejs.org/
[yarn]: https://yarnpkg.org/ [yarn]: https://yarnpkg.org/
[webpack]: https://webpack.github.io/ [webpack]: https://webpack.github.io/
Expand Down
68 changes: 34 additions & 34 deletions angular.json
@@ -1,39 +1,39 @@
{ {
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1, "version": 1,
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"jhipster-sample-application": { "jhipster-sample-application": {
"root": "", "root": "",
"sourceRoot": "src/main/webapp", "sourceRoot": "src/main/webapp",
"projectType": "application", "projectType": "application",
"architect": {} "architect": {}
} }
},
"defaultProject": "jhipster-sample-application",
"cli": {
"packageManager": "npm"
},
"schematics": {
"@schematics/angular:component": {
"inlineStyle": true,
"inlineTemplate": false,
"spec": false,
"prefix": "jhi",
"styleExt": "scss"
},
"@schematics/angular:directive": {
"spec": false,
"prefix": "jhi"
},
"@schematics/angular:guard": {
"spec": false
}, },
"defaultProject": "jhipster-sample-application", "@schematics/angular:pipe": {
"cli": { "spec": false
"packageManager": "npm"
}, },
"schematics": { "@schematics/angular:service": {
"@schematics/angular:component": { "spec": false
"inlineStyle": true,
"inlineTemplate": false,
"spec": false,
"prefix": "jhi",
"styleExt": "css"
},
"@schematics/angular:directive": {
"spec": false,
"prefix": "jhi"
},
"@schematics/angular:guard": {
"spec": false
},
"@schematics/angular:pipe": {
"spec": false
},
"@schematics/angular:service": {
"spec": false
}
} }
}
} }

0 comments on commit 30db72e

Please sign in to comment.