Skip to content

Commit

Permalink
BAEL-137 Intro do JHipster (eugenp#1427)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
felipe-gdr authored and pedja4 committed Mar 21, 2017
1 parent 07c0e84 commit 78f8710
Show file tree
Hide file tree
Showing 361 changed files with 20,698 additions and 21 deletions.
24 changes: 24 additions & 0 deletions jhipster/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

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

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

[*.md]
trim_trailing_whitespace = false

[{package,bower}.json]
indent_style = space
indent_size = 2
22 changes: 22 additions & 0 deletions jhipster/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# All text files should have the "lf" (Unix) line endings
* text eol=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.java text
*.js text
*.css text
*.html text

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.jar binary
*.pdf binary
*.eot binary
*.ttf binary
*.gzip binary
*.gz binary
*.ai binary
*.eps binary
*.swf binary
143 changes: 143 additions & 0 deletions jhipster/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
######################
# Project Specific
######################
/src/main/webapp/content/css/main.css
/target/www/**
/src/test/javascript/coverage/
/src/test/javascript/PhantomJS*/

######################
# Node
######################
/node/
node_tmp/
node_modules/
npm-debug.log.*

######################
# SASS
######################
.sass-cache/

######################
# Eclipse
######################
*.pydevproject
.project
.metadata
tmp/
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
.factorypath
/src/main/resources/rebel.xml

# External tool builders
.externalToolBuilders/**

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath

######################
# Intellij
######################
.idea/
*.iml
*.iws
*.ipr
*.ids
*.orig

######################
# Visual Studio Code
######################
.vscode/

######################
# Maven
######################
/log/
/target/

######################
# Gradle
######################
.gradle/
/build/

######################
# Package Files
######################
*.jar
*.war
*.ear
*.db

######################
# Windows
######################
# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini

######################
# Mac OSX
######################
.DS_Store
.svn

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

######################
# Directories
######################
/bin/
/deploy/

######################
# Logs
######################
*.log

######################
# Others
######################
*.class
*.*~
*~
.merge_file*

######################
# Gradle Wrapper
######################
!gradle/wrapper/gradle-wrapper.jar

######################
# Maven Wrapper
######################
!.mvn/wrapper/maven-wrapper.jar

######################
# ESLint
######################
.eslintcache
/.apt_generated/
56 changes: 56 additions & 0 deletions jhipster/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules
- .maven
stages:
- build
- test
- package

before_script:
- export MAVEN_USER_HOME=`pwd`/.maven
- chmod +x mvnw
- ./mvnw com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v6.10.0 -DnpmVersion=4.3.0
- ./mvnw com.github.eirslett:frontend-maven-plugin:npm

maven-build:
stage: build
script: ./mvnw compile -Dmaven.repo.local=$MAVEN_USER_HOME

maven-test:
stage: test
script:
- ./mvnw test -Dmaven.repo.local=$MAVEN_USER_HOME
artifacts:
paths:
- target/surefire-reports/*
maven-front-test:
stage: test
script:
- ./mvnw com.github.eirslett:frontend-maven-plugin:npm -Dfrontend.yarn.arguments=test
artifacts:
paths:
- target/test-results/karma/*
gatling-test:
stage: test
allow_failure: true
script:
- ./mvnw gatling:execute -Dmaven.repo.local=$MAVEN_USER_HOME
before_script:
- export MAVEN_USER_HOME=`pwd`/.maven
- chmod +x mvnw
- ./mvnw com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v6.10.0 -DnpmVersion=4.3.0
- ./mvnw com.github.eirslett:frontend-maven-plugin:npm
- ./mvnw &
artifacts:
paths:
- target/gatling/*
maven-package:
stage: package
script:
- ./mvnw package -Pprod -DskipTests -Dmaven.repo.local=$MAVEN_USER_HOME
artifacts:
paths:
- target/*.war
39 changes: 39 additions & 0 deletions jhipster/.jhipster/Comment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"fluentMethods": true,
"relationships": [
{
"relationshipName": "post",
"otherEntityName": "post",
"relationshipType": "many-to-one",
"relationshipValidateRules": [
"required"
],
"otherEntityField": "title"
}
],
"fields": [
{
"fieldName": "text",
"fieldType": "String",
"fieldValidateRules": [
"required",
"minlength",
"maxlength"
],
"fieldValidateRulesMinlength": "10",
"fieldValidateRulesMaxlength": "100"
},
{
"fieldName": "creationDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
}
],
"changelogDate": "20170316224021",
"dto": "no",
"service": "no",
"entityTableName": "comment",
"pagination": "infinite-scroll"
}
52 changes: 52 additions & 0 deletions jhipster/.jhipster/Post.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"fluentMethods": true,
"relationships": [
{
"relationshipName": "creator",
"otherEntityName": "user",
"relationshipType": "many-to-one",
"relationshipValidateRules": [
"required"
],
"otherEntityField": "login",
"ownerSide": true,
"otherEntityRelationshipName": "post"
}
],
"fields": [
{
"fieldName": "title",
"fieldType": "String",
"fieldValidateRules": [
"required",
"minlength",
"maxlength"
],
"fieldValidateRulesMinlength": "10",
"fieldValidateRulesMaxlength": "100"
},
{
"fieldName": "content",
"fieldType": "String",
"fieldValidateRules": [
"required",
"minlength",
"maxlength"
],
"fieldValidateRulesMinlength": "10",
"fieldValidateRulesMaxlength": "1000"
},
{
"fieldName": "creationDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
}
],
"changelogDate": "20170316223211",
"dto": "no",
"service": "no",
"entityTableName": "post",
"pagination": "infinite-scroll"
}
Binary file added jhipster/.mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions jhipster/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
41 changes: 41 additions & 0 deletions jhipster/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
os:
- linux
services:
- docker
language: node_js
node_js:
- "6.10.0"
jdk:
- oraclejdk8
sudo: false
cache:
directories:
- node
- node_modules
- $HOME/.m2
env:
global:
- NODE_VERSION=6.10.0
- SPRING_OUTPUT_ANSI_ENABLED=ALWAYS
- SPRING_JPA_SHOW_SQL=false
before_install:
- jdk_switcher use oraclejdk8
- java -version
- sudo /etc/init.d/mysql stop
- sudo /etc/init.d/postgresql stop
- nvm install $NODE_VERSION
- npm install -g npm
- node -v
- npm -v
install:
- npm install
script:
- chmod +x mvnw
- ./mvnw clean test
- npm test
- ./mvnw package -Pprod -DskipTests
notifications:
webhooks:
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
Loading

0 comments on commit 78f8710

Please sign in to comment.