Skip to content

Commit ea611a1

Browse files
committed
Bootified the project setup
1 parent 57e41c5 commit ea611a1

File tree

3 files changed

+43
-70
lines changed

3 files changed

+43
-70
lines changed

pom.xml

+22-70
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4+
5+
<!-- The project parent defines basic requirements for the add-on -->
6+
<parent>
7+
<groupId>in.virit.sb</groupId>
8+
<artifactId>viritin-addon-project-parent</artifactId>
9+
<version>0.0.3</version>
10+
</parent>
11+
412
<groupId>org.parttio</groupId>
513
<artifactId>velocity-component</artifactId>
614
<version>0.0.3-SNAPSHOT</version>
715
<name>VelocityComponent</name>
816
<description>A Helper Library to build JavaScript components for Vaadin using Velocity templating engine powered JS.</description>
917
<url>https://github.com/parttio/velocity-component</url>
1018
<properties>
19+
<!-- You can define the Vaadin version used during development as property if needed
20+
default comes from the parent though.
21+
-->
1122
<vaadin.version>24.4.10</vaadin.version>
1223
</properties>
1324
<organization>
@@ -25,17 +36,6 @@
2536
<distribution>repo</distribution>
2637
</license>
2738
</licenses>
28-
<dependencyManagement>
29-
<dependencies>
30-
<dependency>
31-
<groupId>com.vaadin</groupId>
32-
<artifactId>vaadin-bom</artifactId>
33-
<type>pom</type>
34-
<scope>import</scope>
35-
<version>${vaadin.version}</version>
36-
</dependency>
37-
</dependencies>
38-
</dependencyManagement>
3939

4040
<scm>
4141
<url>https://github.com/parttio/velocity-component</url>
@@ -57,88 +57,40 @@
5757
</issueManagement>
5858

5959
<dependencies>
60-
<dependency>
61-
<groupId>com.vaadin</groupId>
62-
<artifactId>vaadin-core</artifactId>
63-
</dependency>
60+
<!-- In simple add-ons, dependency section can be empty as the parent provides essentials -->
61+
6462
<dependency>
6563
<groupId>org.apache.velocity</groupId>
6664
<artifactId>velocity-engine-core</artifactId>
6765
<version>2.3</version>
6866
</dependency>
6967

68+
<!-- Copilot is currently excluded in the parent as it currently slows down the startup quite a bit,
69+
but can be added back if needed for development:
7070
<dependency>
71-
<groupId>org.slf4j</groupId>
72-
<artifactId>slf4j-simple</artifactId>
73-
<scope>test</scope>
74-
</dependency>
75-
<dependency>
76-
<groupId>in.virit</groupId>
77-
<artifactId>viritin</artifactId>
78-
<version>2.1.0</version>
71+
<groupId>com.vaadin</groupId>
72+
<artifactId>copilot</artifactId>
7973
<scope>test</scope>
8074
</dependency>
75+
-->
8176
</dependencies>
8277

8378
<build>
8479
<plugins>
85-
<plugin>
86-
<groupId>org.apache.maven.plugins</groupId>
87-
<artifactId>maven-compiler-plugin</artifactId>
88-
<version>3.11.0</version>
89-
<configuration>
90-
<release>17</release>
91-
</configuration>
92-
</plugin>
93-
94-
<plugin>
95-
<groupId>org.apache.maven.plugins</groupId>
96-
<artifactId>maven-jar-plugin</artifactId>
97-
<version>3.1.0</version>
98-
<configuration>
99-
<excludes>
100-
<exclude>META-INF/VAADIN/config/flow-build-info.json</exclude>
101-
</excludes>
102-
<archive>
103-
<index>true</index>
104-
<manifest>
105-
<addClasspath>false</addClasspath>
106-
<addDefaultImplementationEntries>true
107-
</addDefaultImplementationEntries>
108-
</manifest>
109-
<manifestEntries>
110-
<Vaadin-Package-Version>1</Vaadin-Package-Version>
111-
</manifestEntries>
112-
</archive>
113-
</configuration>
114-
</plugin>
115-
80+
<!-- The maven-release-plugin is used to deploy this add-on to Maven Central.
81+
Plugin configs required for Vaadin add-on itself are defined in the parent pom.
82+
-->
11683
<plugin>
11784
<groupId>org.apache.maven.plugins</groupId>
11885
<artifactId>maven-release-plugin</artifactId>
119-
<version>3.0.0-M7</version>
86+
<version>3.1.0</version>
12087
<configuration>
12188
<autoVersionSubmodules>true</autoVersionSubmodules>
12289
<useReleaseProfile>false</useReleaseProfile>
12390
<releaseProfiles>release</releaseProfiles>
12491
<goals>deploy</goals>
12592
</configuration>
12693
</plugin>
127-
128-
<plugin>
129-
<groupId>org.eclipse.jetty</groupId>
130-
<artifactId>jetty-maven-plugin</artifactId>
131-
<version>11.0.15</version>
132-
<configuration>
133-
<scan>-1</scan>
134-
<!-- Use test scope because the UI/test classes are in
135-
the test package. -->
136-
<useTestScope>true</useTestScope>
137-
<supportedPackagings>
138-
<supportedPackaging>jar</supportedPackaging>
139-
</supportedPackagings>
140-
</configuration>
141-
</plugin>
14294
</plugins>
14395
</build>
14496

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package org.vaadin.addons.usageexample;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class TestServer {
8+
9+
/**
10+
* This main method runs the test server, configure to custom port
11+
* 9998 in application.properties (so that it doesn't conflict with
12+
* potential actual application developed concurrently).
13+
*
14+
* @param args args
15+
*/
16+
public static void main(String[] args) {
17+
SpringApplication.run(TestServer.class, args);
18+
}
19+
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
server.port=9998

0 commit comments

Comments
 (0)