File tree 7 files changed +32
-6
lines changed
7 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -405,6 +405,8 @@ if File.file?(validator_output)
405
405
print_errors_summary 'html5validator' , errors_count
406
406
end
407
407
408
+ # @todo #1060 Danger: handle Babel errors from frontend-maven-plugin
409
+
408
410
# Handle `mvn org.apache.maven.plugins:maven-compiler-plugin:compile` output
409
411
# Handle `mvn org.apache.maven.plugins:maven-compiler-plugin:testCompile` output
410
412
# Handle `mvn org.codehaus.gmavenplus:gmavenplus-plugin:testCompile` output
@@ -696,8 +698,9 @@ if github.branch_for_head !~ /^gh[0-9]+_/
696
698
end
697
699
698
700
js_file = %r{^src/main/javascript/.*\. js$}
701
+ component_file = %r{^src/main/frontend/src/.*\. js$}
699
702
css_file = %r{^src/main/webapp/.*\. css$}
700
- modified_resources = git . modified_files . any? { |file | file =~ js_file || file =~ css_file }
703
+ modified_resources = git . modified_files . any? { |file | file =~ js_file || file =~ component_file || file =~ css_file }
701
704
updated_url = git . modified_files . include? 'src/main/java/ru/mystamps/web/feature/site/ResourceUrl.java'
702
705
if modified_resources && !updated_url
703
706
warn ( "danger check: looks like you forgot to update `ResourceUrl.RESOURCES_VERSION` after modifying JS/CSS file(s)" )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ If you are programmer/sysadmin or you just feeling that you are able to run a lo
36
36
37
37
* * At the heart of* : Spring Framework (and especially Spring Boot)
38
38
* * Template engine* : Thymeleaf
39
- * * UI* : HTML, Bootstrap and a bit of JavaScript with JQuery
39
+ * * UI* : HTML, Bootstrap and JavaScript (React, JQuery)
40
40
* * Security* : Spring Security
41
41
* * Databases* : H2, MySQL or PostgreSQL
42
42
* * Database access* : Spring's ` JdbcTemplate `
Original file line number Diff line number Diff line change 1223
1223
</profile >
1224
1224
<profile >
1225
1225
<id >frontend</id >
1226
+ <activation >
1227
+ <file >
1228
+ <!-- Should be in sync with Babel configuration from src/main/frontend/package.json -->
1229
+ <missing >target/classes/js/components</missing >
1230
+ </file >
1231
+ </activation >
1226
1232
<build >
1227
1233
<plugins >
1234
+ <!-- @todo #1060 Document usage of frontend-maven-plugin -->
1228
1235
<!--
1229
1236
We assume that most of the time we develop backend rather frontend.
1230
1237
So, we cache and skip the frontend-related things by default. This
1257
1264
<arguments >ci</arguments >
1258
1265
</configuration >
1259
1266
</execution >
1267
+ <execution >
1268
+ <id >npm-run-build</id >
1269
+ <goals >
1270
+ <goal >npm</goal >
1271
+ </goals >
1272
+ <phase >generate-resources</phase >
1273
+ <configuration >
1274
+ <arguments >run build</arguments >
1275
+ </configuration >
1276
+ </execution >
1260
1277
</executions >
1261
1278
</plugin >
1262
1279
</plugins >
Original file line number Diff line number Diff line change 10
10
"babel-preset-react" : " ^6.24.1"
11
11
},
12
12
"scripts" : {
13
- "test" : " echo \" Error: no test specified\" && exit 1"
13
+ "build" : " babel src --out-dir ../../../target/classes/js" ,
14
+ "watch" : " babel src --out-dir ../../../target/classes/js --watch"
14
15
},
15
16
"repository" : {
16
17
"type" : " git" ,
Original file line number Diff line number Diff line change
1
+ //
2
+ // IMPORTANT:
3
+ // You must update ResourceUrl.RESOURCES_VERSION each time whenever you're modified this file!
4
+ //
5
+
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
200
200
print_status " $ENFORCER_STATUS " ' Run maven-enforcer-plugin'
201
201
202
202
if [ " $TEST_STATUS " != ' skip' ]; then
203
- mvn --batch-mode test -Denforcer.skip=true -Dmaven.resources.skip=true -DskipMinify=true -DdisableXmlReport=false \
203
+ mvn --batch-mode test -Denforcer.skip=true -Dmaven.resources.skip=true -DskipMinify=true -DdisableXmlReport=false -Dskip.npm -Dskip.installnodenpm \
204
204
> test.log 2>&1 || TEST_STATUS=fail
205
205
fi
206
206
print_status " $TEST_STATUS " ' Run unit tests'
@@ -220,7 +220,7 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
220
220
print_status " $SPOTBUGS_STATUS " ' Run SpotBugs'
221
221
fi
222
222
223
- mvn --batch-mode verify -Denforcer.skip=true -DskipUnitTests=true \
223
+ mvn --batch-mode --activate-profiles frontend verify -Denforcer.skip=true -DskipUnitTests=true \
224
224
> verify-raw.log 2>&1 || VERIFY_STATUS=fail
225
225
# Workaround for #538
226
226
" $( dirname " $0 " ) /filter-out-htmlunit-messages.pl" < verify-raw.log > verify.log
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ set -o pipefail
15
15
16
16
JACOCO_FAIL=
17
17
18
- mvn --batch-mode jacoco:prepare-agent test jacoco:report -Denforcer.skip=true -DskipMinify=true > jacoco.log 2>&1 || JACOCO_FAIL=yes
18
+ mvn --batch-mode jacoco:prepare-agent test jacoco:report -Denforcer.skip=true -DskipMinify=true -Dskip.npm -Dskip.installnodenpm > jacoco.log 2>&1 || JACOCO_FAIL=yes
19
19
20
20
# -Z Exit with 1 if not successful. Default will Exit with 0
21
21
bash <( curl -s https://codecov.io/bash) -Z >> jacoco.log 2>&1 || JACOCO_FAIL=yes
You can’t perform that action at this time.
0 commit comments