Skip to content

Commit b979137

Browse files
committed
Merge branch 'master' into update-from-template-xdev-software/standard-maven-template-merged
2 parents b24ea85 + c5dab9e commit b979137

File tree

15 files changed

+362
-47
lines changed

15 files changed

+362
-47
lines changed

.github/workflows/check-build.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
timeout-minutes: 30
2929
strategy:
3030
matrix:
31-
java: [17, 21, 25]
31+
java: [21, 25]
3232
distribution: [temurin]
3333
steps:
3434
- uses: actions/checkout@v6
@@ -47,6 +47,15 @@ jobs:
4747
restore-keys: |
4848
${{ runner.os }}-mvn-build-
4949
50+
- name: Cache Vaadin prod bundles
51+
uses: actions/cache@v5
52+
with:
53+
path: |
54+
**/bundles/prod.bundle
55+
key: ${{ runner.os }}-vaadin-prod-bundles-${{ hashFiles('**/pom.xml') }}
56+
restore-keys: |
57+
${{ runner.os }}-vaadin-prod-bundles-
58+
5059
- name: Build with Maven
5160
run: ./mvnw -B clean package
5261

@@ -64,7 +73,7 @@ jobs:
6473
echo ----------------------------------------
6574
echo Troubleshooting
6675
echo ----------------------------------------
67-
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package"
76+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package -Pproduction"
6877
exit 1
6978
fi
7079
@@ -117,7 +126,7 @@ jobs:
117126
timeout-minutes: 15
118127
strategy:
119128
matrix:
120-
java: [17]
129+
java: [21]
121130
distribution: [temurin]
122131
steps:
123132
- uses: actions/checkout@v6

.github/workflows/release.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up JDK
2424
uses: actions/setup-java@v5
2525
with:
26-
java-version: '17'
26+
java-version: '21'
2727
distribution: 'temurin'
2828

2929
# Try to reuse existing cache from check-build
@@ -36,7 +36,7 @@ jobs:
3636
${{ runner.os }}-mvn-build-
3737
3838
- name: Build with Maven
39-
run: ./mvnw -B clean package -T2C
39+
run: ./mvnw -B clean package -Pproduction -T2C
4040

4141
- name: Check for uncommited changes
4242
run: |
@@ -52,7 +52,7 @@ jobs:
5252
echo ----------------------------------------
5353
echo Troubleshooting
5454
echo ----------------------------------------
55-
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package"
55+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package -Pproduction"
5656
exit 1
5757
fi
5858
@@ -110,6 +110,9 @@ jobs:
110110
</dependency>
111111
```
112112
113+
### Additional notes
114+
* [Spring-Boot] You may have to include ``software/xdev`` inside [``vaadin.allowed-packages``](https://vaadin.com/docs/latest/integrations/spring/configuration#configure-the-scanning-of-packages)
115+
113116
publish-maven:
114117
runs-on: ubuntu-latest
115118
needs: [prepare-release]
@@ -127,7 +130,7 @@ jobs:
127130
uses: actions/setup-java@v5
128131
with: # running setup-java overwrites the settings.xml
129132
distribution: 'temurin'
130-
java-version: '17'
133+
java-version: '21'
131134
server-id: github-central
132135
server-password: PACKAGES_CENTRAL_TOKEN
133136
gpg-passphrase: MAVEN_GPG_PASSPHRASE
@@ -144,7 +147,7 @@ jobs:
144147
uses: actions/setup-java@v5
145148
with: # running setup-java again overwrites the settings.xml
146149
distribution: 'temurin'
147-
java-version: '17'
150+
java-version: '21'
148151
server-id: sonatype-central-portal
149152
server-username: MAVEN_CENTRAL_USERNAME
150153
server-password: MAVEN_CENTRAL_TOKEN
@@ -174,7 +177,7 @@ jobs:
174177
- name: Setup - Java
175178
uses: actions/setup-java@v5
176179
with:
177-
java-version: '17'
180+
java-version: '21'
178181
distribution: 'temurin'
179182

180183
# Try to reuse existing cache from check-build

.github/workflows/test-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-java@v5
1818
with: # running setup-java overwrites the settings.xml
1919
distribution: 'temurin'
20-
java-version: '17'
20+
java-version: '21'
2121
server-id: github-central
2222
server-password: PACKAGES_CENTRAL_TOKEN
2323
gpg-passphrase: MAVEN_GPG_PASSPHRASE
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/setup-java@v5
3535
with: # running setup-java again overwrites the settings.xml
3636
distribution: 'temurin'
37-
java-version: '17'
37+
java-version: '21'
3838
server-id: sonatype-central-portal
3939
server-username: MAVEN_CENTRAL_USERNAME
4040
server-password: MAVEN_CENTRAL_TOKEN

.github/workflows/update-from-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
env:
2222
UPDATE_BRANCH: update-from-template
2323
UPDATE_BRANCH_MERGED: update-from-template-merged
24-
REMOTE_URL: https://github.com/xdev-software/standard-maven-template.git
24+
REMOTE_URL: https://github.com/xdev-software/vaadin-addon-template.git
2525
REMOTE_BRANCH: master
2626

2727
permissions:

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,30 @@ hs_err_pid*
3333
.classpath
3434
.project
3535

36+
#vaadin/node webpack/frontend stuff
37+
# Ignore Node
38+
node/
39+
40+
# The following files are generated/updated by vaadin-maven-plugin
41+
node_modules/
42+
43+
# Vaadin
44+
package.json
45+
package-lock.json
46+
.npmrc
47+
pnpm-lock.yaml
48+
webpack.generated.js
49+
webpack.config.js
50+
tsconfig.json
51+
types.d.ts
52+
vite.config.ts
53+
vite.generated.ts
54+
**/src/main/frontend/generated/
55+
**/src/main/frontend/index.html
56+
**/src/main/bundles/
57+
*.lock
58+
59+
3660
# == IntelliJ ==
3761
*.iml
3862
*.ipr

.run/Run Demo.run.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
3-
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.vaadin.Application" />
44
<module name="template-placeholder-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>
8-
<option name="PATTERN" value="software.xdev.*" />
8+
<option name="PATTERN" value="software.xdev.vaadin.*" />
99
<option name="ENABLED" value="true" />
1010
</pattern>
1111
</extension>

CONTRIBUTING.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,20 @@ You should have the following things installed:
3232
* Import the project
3333
* Ensure that everything is encoded in ``UTF-8``
3434
* Ensure that the JDK/Java-Version is correct
35-
35+
* To enable AUTOMATIC reloading/restarting while developing and running the app do this (further information in "
36+
SpringBoot-Devtools" section below; [Source](https://stackoverflow.com/q/33349456)):
37+
* ``Settings > Build, Execution, Deployment > Compiler``:<br/>
38+
Enable [``Build project automatically``](https://www.jetbrains.com/help/idea/compiling-applications.html#auto-build)
39+
* ``Settings > Advanced Settings``:<br/>
40+
Enable [``Allow auto-make to start even if developed application is currently running``](https://www.jetbrains.com/help/idea/advanced-settings.html#advanced_compiler)
41+
* To launch the Demo execute the predefined (launch) configuration ``Run Demo``
42+
43+
#### [SpringBoot-Developer-Tools](https://docs.spring.io/spring-boot/docs/current/reference/html/using.html#using.devtools)
44+
... should automatically be enabled.<br/>
45+
If you are changing a file and build the project, parts of the app get restarted.<br/>
46+
Bigger changes may require a complete restart.
47+
* [Vaadin automatically reloads the UI on each restart](https://vaadin.com/docs/latest/configuration/live-reload/spring-boot).<br/>
48+
You can control this behavior with the ``vaadin.devmode.liveReload.enabled`` property (default: ``true``).
3649

3750
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/release.yml?branch=master)](https://github.com/xdev-software/template-placeholder/actions/workflows/release.yml)
3851

@@ -44,6 +57,7 @@ If the ``develop`` is ready for release, create a pull request to the ``master``
4457

4558
When the release is finished do the following:
4659
* Merge the auto-generated PR (with the incremented version number) back into the ``develop``
60+
* Ensure that [Vaadin Directory](https://vaadin.com/directory) syncs the update and maybe update the component / version there
4761

4862
### Release failures
4963

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1+
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0?logo=vaadin)](https://vaadin.com/directory/component/template-placeholder)
12
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/template-placeholder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/template-placeholder)
23
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop)
4+
![Vaadin 25+](https://img.shields.io/badge/Vaadin%20Platform/Flow-25+-00b4f0)
35

46
# template-placeholder
7+
A Vaadin Template Repo
8+
9+
![demo](assets/demo.png)
510

611

712
## Installation
813
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
914

15+
### Spring-Boot
16+
* You may have to include ``software/xdev`` inside [``vaadin.allowed-packages``](https://vaadin.com/docs/latest/integrations/spring/configuration#configure-the-scanning-of-packages)
17+
18+
## Run the Demo
19+
* Checkout the repo
20+
* Run ``mvn install && mvn -f template-placeholder-demo spring-boot:run``
21+
* Open http://localhost:8080
22+
23+
<details>
24+
<summary>Show example</summary>
25+
26+
![demo](assets/demo.avif)
27+
</details>
28+
1029
## Support
1130
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
1231

assets/demo.avif

1.4 KB
Binary file not shown.

assets/demo.png

13.9 KB
Loading

0 commit comments

Comments
 (0)