Skip to content

Commit 217ac87

Browse files
committed
Merge branch 'master' into update-from-template-merged
2 parents f697749 + f440a41 commit 217ac87

File tree

13 files changed

+291
-38
lines changed

13 files changed

+291
-38
lines changed

.github/workflows/check-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
cache: 'maven'
4444

4545
- name: Build with Maven
46-
run: ./mvnw -B clean package
46+
run: ./mvnw -B clean package -Pproduction
4747

4848
- name: Check for uncommited changes
4949
run: |
@@ -59,7 +59,7 @@ jobs:
5959
echo ----------------------------------------
6060
echo Troubleshooting
6161
echo ----------------------------------------
62-
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package"
62+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package -Pproduction"
6363
exit 1
6464
fi
6565

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
cache: 'maven'
2626

2727
- name: Build with Maven
28-
run: ./mvnw -B clean package
28+
run: ./mvnw -B clean package -Pproduction
2929

3030
- name: Check for uncommited changes
3131
run: |
@@ -41,7 +41,7 @@ jobs:
4141
echo ----------------------------------------
4242
echo Troubleshooting
4343
echo ----------------------------------------
44-
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package"
44+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package -Pproduction"
4545
exit 1
4646
fi
4747
@@ -106,6 +106,9 @@ jobs:
106106
</dependency>
107107
```
108108
109+
### Additional notes
110+
* [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)
111+
109112
publish-maven:
110113
runs-on: ubuntu-latest
111114
needs: [prepare-release]

.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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,29 @@ target/
6262
/*/.project
6363
/*/RemoteSystemsTempFiles/
6464

65+
66+
#vaadin/node webpack/frontend stuff
67+
# Ignore Node
68+
node/
69+
70+
# The following files are generated/updated by vaadin-maven-plugin
71+
node_modules/
72+
73+
# Vaadin
74+
package.json
75+
package-lock.json
76+
webpack.generated.js
77+
webpack.config.js
78+
tsconfig.json
79+
types.d.ts
80+
vite.config.ts
81+
vite.generated.ts
82+
/*/frontend/generated/
83+
/*/frontend/index.html
84+
/*/src/main/dev-bundle/
85+
/*/src/main/bundles/
86+
*.lock
87+
6588
#custom
6689
.flattened-pom.xml
6790
.tern-project

.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,3 +57,4 @@ 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

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
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)
34
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_template-placeholder&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_template-placeholder)
5+
![Vaadin 24+](https://img.shields.io/badge/Vaadin%20Platform/Flow-24+-00b4f0)
46

57
# template-placeholder
8+
A Vaadin Template Repo
9+
10+
![demo](assets/demo.png)
611

712

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

16+
## Run the Demo
17+
* Checkout the repo
18+
* Run ``mvn install && mvn -f template-placeholder-demo spring-boot:run``
19+
* Open http://localhost:8080
20+
21+
<details>
22+
<summary>Show example</summary>
23+
24+
![demo](assets/demo.avif)
25+
</details>
26+
1127
## Support
1228
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).
1329

assets/demo.avif

1.4 KB
Binary file not shown.

assets/demo.png

13.9 KB
Loading

template-placeholder-demo/pom.xml

Lines changed: 128 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,98 @@
2121
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2222
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2323

24-
<mainClass>software.xdev.Application</mainClass>
24+
<mainClass>software.xdev.vaadin.Application</mainClass>
25+
26+
<!-- Dependency-Versions -->
27+
<vaadin.version>24.3.13</vaadin.version>
28+
29+
<org.springframework.boot.version>3.3.0</org.springframework.boot.version>
2530
</properties>
2631

32+
<dependencyManagement>
33+
<dependencies>
34+
<dependency>
35+
<groupId>com.vaadin</groupId>
36+
<artifactId>vaadin-bom</artifactId>
37+
<type>pom</type>
38+
<scope>import</scope>
39+
<version>${vaadin.version}</version>
40+
</dependency>
41+
42+
<!-- Spring Boot -->
43+
<!-- This bom provides versions for ~500 dependencies -->
44+
<!-- Nearly at the end so that it doesn't accidentally overwrite other versions -->
45+
<dependency>
46+
<groupId>org.springframework.boot</groupId>
47+
<artifactId>spring-boot-dependencies</artifactId>
48+
<version>${org.springframework.boot.version}</version>
49+
<type>pom</type>
50+
<scope>import</scope>
51+
</dependency>
52+
</dependencies>
53+
</dependencyManagement>
54+
2755
<dependencies>
56+
<dependency>
57+
<groupId>com.vaadin</groupId>
58+
<artifactId>vaadin-core</artifactId>
59+
<exclusions>
60+
<!-- https://github.com/vaadin/flow/issues/18449 -->
61+
<exclusion>
62+
<groupId>com.vaadin</groupId>
63+
<artifactId>copilot</artifactId>
64+
</exclusion>
65+
</exclusions>
66+
</dependency>
2867
<dependency>
2968
<groupId>software.xdev</groupId>
3069
<artifactId>template-placeholder</artifactId>
3170
<version>${project.version}</version>
3271
</dependency>
72+
73+
<!-- Spring -->
74+
<dependency>
75+
<groupId>com.vaadin</groupId>
76+
<artifactId>vaadin-spring-boot-starter</artifactId>
77+
</dependency>
78+
<!-- Temporarily excluded by Vaadin due to "security vulnerability" -->
79+
<dependency>
80+
<groupId>org.yaml</groupId>
81+
<artifactId>snakeyaml</artifactId>
82+
</dependency>
83+
<dependency>
84+
<groupId>org.springframework.boot</groupId>
85+
<artifactId>spring-boot-devtools</artifactId>
86+
<optional>true</optional>
87+
</dependency>
3388
</dependencies>
3489

3590
<build>
3691
<finalName>${project.artifactId}</finalName>
92+
93+
<pluginManagement>
94+
<plugins>
95+
<plugin>
96+
<groupId>org.springframework.boot</groupId>
97+
<artifactId>spring-boot-maven-plugin</artifactId>
98+
<version>${org.springframework.boot.version}</version>
99+
</plugin>
100+
</plugins>
101+
</pluginManagement>
37102

38103
<plugins>
104+
<plugin>
105+
<groupId>com.vaadin</groupId>
106+
<artifactId>vaadin-maven-plugin</artifactId>
107+
<version>${vaadin.version}</version>
108+
<executions>
109+
<execution>
110+
<goals>
111+
<goal>prepare-frontend</goal>
112+
</goals>
113+
</execution>
114+
</executions>
115+
</plugin>
39116
<plugin>
40117
<groupId>org.apache.maven.plugins</groupId>
41118
<artifactId>maven-compiler-plugin</artifactId>
@@ -47,37 +124,59 @@
47124
</compilerArgs>
48125
</configuration>
49126
</plugin>
50-
<plugin>
51-
<groupId>org.apache.maven.plugins</groupId>
52-
<artifactId>maven-assembly-plugin</artifactId>
53-
<version>3.7.1</version>
54-
<configuration>
55-
<archive>
56-
<manifest>
57-
<mainClass>${mainClass}</mainClass>
58-
</manifest>
59-
<manifestEntries>
60-
<Multi-Release>true</Multi-Release>
61-
</manifestEntries>
62-
</archive>
63-
<descriptorRefs>
64-
<descriptorRef>jar-with-dependencies</descriptorRef>
65-
</descriptorRefs>
66-
<appendAssemblyId>false</appendAssemblyId>
67-
</configuration>
68-
<executions>
69-
<execution>
70-
<id>make-assembly</id> <!-- this is used for inheritance merges -->
71-
<phase>package</phase> <!-- bind to the packaging phase -->
72-
<goals>
73-
<goal>single</goal>
74-
</goals>
75-
</execution>
76-
</executions>
77-
</plugin>
78127
</plugins>
79128
</build>
129+
80130
<profiles>
131+
<profile>
132+
<id>production</id>
133+
<dependencies>
134+
<!-- Exclude development dependencies from production -->
135+
<dependency>
136+
<groupId>com.vaadin</groupId>
137+
<artifactId>vaadin-core</artifactId>
138+
<exclusions>
139+
<exclusion>
140+
<groupId>com.vaadin</groupId>
141+
<artifactId>vaadin-dev</artifactId>
142+
</exclusion>
143+
</exclusions>
144+
</dependency>
145+
</dependencies>
146+
<build>
147+
<plugins>
148+
<plugin>
149+
<groupId>com.vaadin</groupId>
150+
<artifactId>vaadin-maven-plugin</artifactId>
151+
<version>${vaadin.version}</version>
152+
<executions>
153+
<execution>
154+
<goals>
155+
<goal>prepare-frontend</goal>
156+
<goal>build-frontend</goal>
157+
</goals>
158+
</execution>
159+
</executions>
160+
</plugin>
161+
<plugin>
162+
<groupId>org.springframework.boot</groupId>
163+
<artifactId>spring-boot-maven-plugin</artifactId>
164+
<configuration>
165+
<mainClass>${mainClass}</mainClass>
166+
</configuration>
167+
<executions>
168+
<execution>
169+
<id>repackage</id>
170+
<goals>
171+
<goal>repackage</goal>
172+
</goals>
173+
<phase>package</phase>
174+
</execution>
175+
</executions>
176+
</plugin>
177+
</plugins>
178+
</build>
179+
</profile>
81180
<profile>
82181
<id>checkstyle</id>
83182
<build>

0 commit comments

Comments
 (0)