Skip to content

Commit

Permalink
chore: refactoring demo and added quarkus demo (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollovati authored Aug 20, 2022
1 parent 9dcd56f commit 4886125
Show file tree
Hide file tree
Showing 26 changed files with 248 additions and 33 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,14 @@ buildNumber.properties
**/VAADIN/themes/**/*.scss.cache
node/
node_modules/
webpack*

demos/**/package.json
demos/**/package-lock.json
demos/**/pnpm-lock.yaml
demos/**/pnpmfile.js
demos/**/tsconfig.json
demos/**/types.d.ts
demos/**/webpack.*.js
demos/**/vite.*.js
demos/**/frontend/

46 changes: 46 additions & 0 deletions demos/demo-commons/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets-demos</artifactId>
<version>3.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>twitter-widgets-demo-commons</artifactId>

<dependencies>
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>1.2.2</version>
<executions>
<execution>
<id>make-index</id>
<goals>
<goal>jandex</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
16 changes: 4 additions & 12 deletions twitter-widgets-demo/pom.xml → demos/jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets-root</artifactId>
<artifactId>twitter-widgets-demos</artifactId>
<version>3.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>twitter-widgets-demo</artifactId>
<artifactId>twitter-widgets-jetty-demo</artifactId>
<packaging>war</packaging>
<name>Twitter widgets for Vaadin Demo</name>

Expand All @@ -33,17 +33,9 @@
<dependencies>
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets</artifactId>
<artifactId>twitter-widgets-demo-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-push</artifactId>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
24 changes: 24 additions & 0 deletions demos/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets-root</artifactId>
<version>3.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>twitter-widgets-demos</artifactId>
<packaging>pom</packaging>

<modules>
<module>demo-commons</module>
<module>jetty</module>
<module>quarkus</module>
</modules>

</project>
124 changes: 124 additions & 0 deletions demos/quarkus/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets-demos</artifactId>
<version>3.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>twitter-widgets-quarkus-demo</artifactId>
<name>Twitter widgets for Vaadin Quarkus Demo</name>

<properties>
<quarkus.version>2.7.4.Final</quarkus.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${quarkus.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-quarkus-extension</artifactId>
<version>${vaadin.version}</version>
</dependency>

<!-- Uncomment the following if you are using any of the Pro components -->
<!--
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-jandex</artifactId>
</dependency>
-->

<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets-demo-commons</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Quarkus always pulls in slf4j-jboss-logmanager into target/lib; don't use slf4j-simple -->
<dependency>
<groupId>org.jboss.slf4j</groupId>
<artifactId>slf4j-jboss-logmanager</artifactId>
<version>1.1.0.Final</version>
</dependency>

</dependencies>

<build>
<defaultGoal>package quarkus:dev</defaultGoal>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
<configuration>
<noDeps>true</noDeps>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<!-- Vaadin Production mode is activated using -Pproduction -->
<id>production</id>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<configuration>
<productionMode>true</productionMode>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
5 changes: 5 additions & 0 deletions demos/quarkus/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
quarkus.http.test-port=8888
quarkus.http.host=0.0.0.0

quarkus.index-dependency.twitter-widgets-addon.group-id=org.vaadin.addon
quarkus.index-dependency.twitter-widgets-addon.artifact-id=twitter-widgets
49 changes: 34 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets-root</artifactId>
Expand All @@ -12,7 +13,7 @@
</prerequisites>
<modules>
<module>twitter-widgets-addon</module>
<module>twitter-widgets-demo</module>
<module>demos</module>
</modules>

<organization>
Expand Down Expand Up @@ -49,7 +50,7 @@
<license.directory>${project.parent.relativePath}/license</license.directory>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<vaadin.version>22.0.6</vaadin.version>
<vaadin.version>23.1.6</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<maven-compiler-plugin.version>3.10.0</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
Expand Down Expand Up @@ -229,31 +230,49 @@
</build>

<repositories>
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
<repository>
<id>vaadin-addons</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<id>vaadin-prereleases</id>
<url>
https://maven.vaadin.com/vaadin-prereleases/
</url>
<snapshots>
<enabled>false</enabled>
</releases>
</snapshots>
</repository>
<!-- Repository used by many Vaadin add-ons -->
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>true</enabled>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
<pluginRepository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</releases>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>
https://maven.vaadin.com/vaadin-prereleases/
</url>
<snapshots>
<enabled>true</enabled>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Expand Down
3 changes: 0 additions & 3 deletions twitter-widgets-demo/src/main/webapp/META-INF/MANIFEST.MF

This file was deleted.

2 changes: 0 additions & 2 deletions twitter-widgets-demo/src/main/webapp/META-INF/context.xml

This file was deleted.

0 comments on commit 4886125

Please sign in to comment.