Skip to content

Commit 78f8710

Browse files
felipe-gdrpedja4
authored andcommitted
BAEL-137 Intro do JHipster (eugenp#1427)
* refactor: Reorder tests without lambda Moves inner implementations of Answer and ArgumentMatcher to the top of the test classes. Also changes the lambda expression to a regular "pre java 8" expression in one of the tests. Resolves: BAEL-632 * feat: Create basic Monolithic JHipster project Commit just after creating a JHipster project, before making any modifications. Resolves: BAEL-137 * chore: Change the artifactId and name of the project From baeldung to jhipster-monolithic and JHipster Monolithic Application Relates to: BAEL-137 * feat: Create entities Post and Comment Relates to: BAEL-137 * feat: Fix Gatling configuration in pom.xml Relates to: BAEL-137 * feat: Add files for Continuous Integration Relates to: BAEL-137 * feat: Change pom.xml to conform to Baeldung standards - moved the <properties> element to the bottom of the file - excluded integration tests in the default surefire configuration - added a new profile, called integration, and added the integration tests there - added Java 8 in the <source> and <target> tags, under maven-compiler solves: BAEL-137 * chore: Add jhipster module to parent pom
1 parent 07c0e84 commit 78f8710

361 files changed

Lines changed: 20698 additions & 21 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎jhipster/.editorconfig‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
# Change these settings to your own preference
10+
indent_style = space
11+
indent_size = 4
12+
13+
# We recommend you to keep these unchanged
14+
end_of_line = lf
15+
charset = utf-8
16+
trim_trailing_whitespace = true
17+
insert_final_newline = true
18+
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
22+
[{package,bower}.json]
23+
indent_style = space
24+
indent_size = 2

‎jhipster/.gitattributes‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# All text files should have the "lf" (Unix) line endings
2+
* text eol=lf
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.java text
7+
*.js text
8+
*.css text
9+
*.html text
10+
11+
# Denote all files that are truly binary and should not be modified.
12+
*.png binary
13+
*.jpg binary
14+
*.jar binary
15+
*.pdf binary
16+
*.eot binary
17+
*.ttf binary
18+
*.gzip binary
19+
*.gz binary
20+
*.ai binary
21+
*.eps binary
22+
*.swf binary

‎jhipster/.gitignore‎

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
######################
2+
# Project Specific
3+
######################
4+
/src/main/webapp/content/css/main.css
5+
/target/www/**
6+
/src/test/javascript/coverage/
7+
/src/test/javascript/PhantomJS*/
8+
9+
######################
10+
# Node
11+
######################
12+
/node/
13+
node_tmp/
14+
node_modules/
15+
npm-debug.log.*
16+
17+
######################
18+
# SASS
19+
######################
20+
.sass-cache/
21+
22+
######################
23+
# Eclipse
24+
######################
25+
*.pydevproject
26+
.project
27+
.metadata
28+
tmp/
29+
tmp/**/*
30+
*.tmp
31+
*.bak
32+
*.swp
33+
*~.nib
34+
local.properties
35+
.classpath
36+
.settings/
37+
.loadpath
38+
.factorypath
39+
/src/main/resources/rebel.xml
40+
41+
# External tool builders
42+
.externalToolBuilders/**
43+
44+
# Locally stored "Eclipse launch configurations"
45+
*.launch
46+
47+
# CDT-specific
48+
.cproject
49+
50+
# PDT-specific
51+
.buildpath
52+
53+
######################
54+
# Intellij
55+
######################
56+
.idea/
57+
*.iml
58+
*.iws
59+
*.ipr
60+
*.ids
61+
*.orig
62+
63+
######################
64+
# Visual Studio Code
65+
######################
66+
.vscode/
67+
68+
######################
69+
# Maven
70+
######################
71+
/log/
72+
/target/
73+
74+
######################
75+
# Gradle
76+
######################
77+
.gradle/
78+
/build/
79+
80+
######################
81+
# Package Files
82+
######################
83+
*.jar
84+
*.war
85+
*.ear
86+
*.db
87+
88+
######################
89+
# Windows
90+
######################
91+
# Windows image file caches
92+
Thumbs.db
93+
94+
# Folder config file
95+
Desktop.ini
96+
97+
######################
98+
# Mac OSX
99+
######################
100+
.DS_Store
101+
.svn
102+
103+
# Thumbnails
104+
._*
105+
106+
# Files that might appear on external disk
107+
.Spotlight-V100
108+
.Trashes
109+
110+
######################
111+
# Directories
112+
######################
113+
/bin/
114+
/deploy/
115+
116+
######################
117+
# Logs
118+
######################
119+
*.log
120+
121+
######################
122+
# Others
123+
######################
124+
*.class
125+
*.*~
126+
*~
127+
.merge_file*
128+
129+
######################
130+
# Gradle Wrapper
131+
######################
132+
!gradle/wrapper/gradle-wrapper.jar
133+
134+
######################
135+
# Maven Wrapper
136+
######################
137+
!.mvn/wrapper/maven-wrapper.jar
138+
139+
######################
140+
# ESLint
141+
######################
142+
.eslintcache
143+
/.apt_generated/

‎jhipster/.gitlab-ci.yml‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
cache:
3+
key: "$CI_BUILD_REF_NAME"
4+
paths:
5+
- node_modules
6+
- .maven
7+
stages:
8+
- build
9+
- test
10+
- package
11+
12+
before_script:
13+
- export MAVEN_USER_HOME=`pwd`/.maven
14+
- chmod +x mvnw
15+
- ./mvnw com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v6.10.0 -DnpmVersion=4.3.0
16+
- ./mvnw com.github.eirslett:frontend-maven-plugin:npm
17+
18+
maven-build:
19+
stage: build
20+
script: ./mvnw compile -Dmaven.repo.local=$MAVEN_USER_HOME
21+
22+
maven-test:
23+
stage: test
24+
script:
25+
- ./mvnw test -Dmaven.repo.local=$MAVEN_USER_HOME
26+
artifacts:
27+
paths:
28+
- target/surefire-reports/*
29+
maven-front-test:
30+
stage: test
31+
script:
32+
- ./mvnw com.github.eirslett:frontend-maven-plugin:npm -Dfrontend.yarn.arguments=test
33+
artifacts:
34+
paths:
35+
- target/test-results/karma/*
36+
gatling-test:
37+
stage: test
38+
allow_failure: true
39+
script:
40+
- ./mvnw gatling:execute -Dmaven.repo.local=$MAVEN_USER_HOME
41+
before_script:
42+
- export MAVEN_USER_HOME=`pwd`/.maven
43+
- chmod +x mvnw
44+
- ./mvnw com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v6.10.0 -DnpmVersion=4.3.0
45+
- ./mvnw com.github.eirslett:frontend-maven-plugin:npm
46+
- ./mvnw &
47+
artifacts:
48+
paths:
49+
- target/gatling/*
50+
maven-package:
51+
stage: package
52+
script:
53+
- ./mvnw package -Pprod -DskipTests -Dmaven.repo.local=$MAVEN_USER_HOME
54+
artifacts:
55+
paths:
56+
- target/*.war

‎jhipster/.jhipster/Comment.json‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"fluentMethods": true,
3+
"relationships": [
4+
{
5+
"relationshipName": "post",
6+
"otherEntityName": "post",
7+
"relationshipType": "many-to-one",
8+
"relationshipValidateRules": [
9+
"required"
10+
],
11+
"otherEntityField": "title"
12+
}
13+
],
14+
"fields": [
15+
{
16+
"fieldName": "text",
17+
"fieldType": "String",
18+
"fieldValidateRules": [
19+
"required",
20+
"minlength",
21+
"maxlength"
22+
],
23+
"fieldValidateRulesMinlength": "10",
24+
"fieldValidateRulesMaxlength": "100"
25+
},
26+
{
27+
"fieldName": "creationDate",
28+
"fieldType": "LocalDate",
29+
"fieldValidateRules": [
30+
"required"
31+
]
32+
}
33+
],
34+
"changelogDate": "20170316224021",
35+
"dto": "no",
36+
"service": "no",
37+
"entityTableName": "comment",
38+
"pagination": "infinite-scroll"
39+
}

‎jhipster/.jhipster/Post.json‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"fluentMethods": true,
3+
"relationships": [
4+
{
5+
"relationshipName": "creator",
6+
"otherEntityName": "user",
7+
"relationshipType": "many-to-one",
8+
"relationshipValidateRules": [
9+
"required"
10+
],
11+
"otherEntityField": "login",
12+
"ownerSide": true,
13+
"otherEntityRelationshipName": "post"
14+
}
15+
],
16+
"fields": [
17+
{
18+
"fieldName": "title",
19+
"fieldType": "String",
20+
"fieldValidateRules": [
21+
"required",
22+
"minlength",
23+
"maxlength"
24+
],
25+
"fieldValidateRulesMinlength": "10",
26+
"fieldValidateRulesMaxlength": "100"
27+
},
28+
{
29+
"fieldName": "content",
30+
"fieldType": "String",
31+
"fieldValidateRules": [
32+
"required",
33+
"minlength",
34+
"maxlength"
35+
],
36+
"fieldValidateRulesMinlength": "10",
37+
"fieldValidateRulesMaxlength": "1000"
38+
},
39+
{
40+
"fieldName": "creationDate",
41+
"fieldType": "LocalDate",
42+
"fieldValidateRules": [
43+
"required"
44+
]
45+
}
46+
],
47+
"changelogDate": "20170316223211",
48+
"dto": "no",
49+
"service": "no",
50+
"entityTableName": "post",
51+
"pagination": "infinite-scroll"
52+
}
48.3 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip

‎jhipster/.travis.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
os:
2+
- linux
3+
services:
4+
- docker
5+
language: node_js
6+
node_js:
7+
- "6.10.0"
8+
jdk:
9+
- oraclejdk8
10+
sudo: false
11+
cache:
12+
directories:
13+
- node
14+
- node_modules
15+
- $HOME/.m2
16+
env:
17+
global:
18+
- NODE_VERSION=6.10.0
19+
- SPRING_OUTPUT_ANSI_ENABLED=ALWAYS
20+
- SPRING_JPA_SHOW_SQL=false
21+
before_install:
22+
- jdk_switcher use oraclejdk8
23+
- java -version
24+
- sudo /etc/init.d/mysql stop
25+
- sudo /etc/init.d/postgresql stop
26+
- nvm install $NODE_VERSION
27+
- npm install -g npm
28+
- node -v
29+
- npm -v
30+
install:
31+
- npm install
32+
script:
33+
- chmod +x mvnw
34+
- ./mvnw clean test
35+
- npm test
36+
- ./mvnw package -Pprod -DskipTests
37+
notifications:
38+
webhooks:
39+
on_success: change # options: [always|never|change] default: always
40+
on_failure: always # options: [always|never|change] default: always
41+
on_start: false # default: false

0 commit comments

Comments
 (0)