diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index 2ac65305..93378be5 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -43,7 +43,7 @@ jobs: cache: 'maven' - name: Build with Maven - run: ./mvnw -B clean package + run: ./mvnw -B clean package -Pproduction - name: Check for uncommited changes run: | @@ -59,7 +59,7 @@ jobs: echo ---------------------------------------- echo Troubleshooting echo ---------------------------------------- - echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package" + echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package -Pproduction" exit 1 fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0bf3805c..98416791 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: cache: 'maven' - name: Build with Maven - run: ./mvnw -B clean package + run: ./mvnw -B clean package -Pproduction - name: Check for uncommited changes run: | @@ -41,7 +41,7 @@ jobs: echo ---------------------------------------- echo Troubleshooting echo ---------------------------------------- - echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package" + echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package -Pproduction" exit 1 fi @@ -106,6 +106,9 @@ jobs: ``` + ### Additional notes + * [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) + publish-maven: runs-on: ubuntu-latest needs: [prepare-release] diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index aa33de40..36d059ae 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -21,7 +21,7 @@ on: env: UPDATE_BRANCH: update-from-template UPDATE_BRANCH_MERGED: update-from-template-merged - REMOTE_URL: https://github.com/xdev-software/standard-maven-template.git + REMOTE_URL: https://github.com/xdev-software/vaadin-addon-template.git REMOTE_BRANCH: master permissions: diff --git a/.gitignore b/.gitignore index 116a656e..41570f9a 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,29 @@ hs_err_pid* /*/.project /*/RemoteSystemsTempFiles/ + +#vaadin/node webpack/frontend stuff +# Ignore Node +node/ + +# The following files are generated/updated by vaadin-maven-plugin +node_modules/ + +# Vaadin +package.json +package-lock.json +webpack.generated.js +webpack.config.js +tsconfig.json +types.d.ts +vite.config.ts +vite.generated.ts +/*/src/main/frontend/generated/ +/*/src/main/frontend/index.html +/*/src/main/dev-bundle/ +/*/src/main/bundles/ +*.lock + #custom .flattened-pom.xml .tern-project diff --git a/.run/Run Demo.run.xml b/.run/Run Demo.run.xml index 5fb2bc27..30917454 100644 --- a/.run/Run Demo.run.xml +++ b/.run/Run Demo.run.xml @@ -1,11 +1,11 @@ - - - org.apache.maven.plugins - maven-assembly-plugin - 3.7.1 - - - - ${mainClass} - - - true - - - - jar-with-dependencies - - false - - - - make-assembly - package - - single - - - - + + + + production + + + + com.vaadin + vaadin-core + + + com.vaadin + vaadin-dev + + + + + + + + com.vaadin + vaadin-maven-plugin + ${vaadin.version} + + + + prepare-frontend + build-frontend + + + + + + org.springframework.boot + spring-boot-maven-plugin + + ${mainClass} + + + + repackage + + repackage + + package + + + + + + + diff --git a/template-placeholder-demo/src/main/java/software/xdev/vaadin/Application.java b/template-placeholder-demo/src/main/java/software/xdev/vaadin/Application.java new file mode 100644 index 00000000..f5a4d96b --- /dev/null +++ b/template-placeholder-demo/src/main/java/software/xdev/vaadin/Application.java @@ -0,0 +1,22 @@ +package software.xdev.vaadin; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +import com.vaadin.flow.component.page.AppShellConfigurator; +import com.vaadin.flow.component.page.Push; +import com.vaadin.flow.spring.annotation.EnableVaadin; + + +@SpringBootApplication +@EnableVaadin +@Push +public class Application extends SpringBootServletInitializer implements AppShellConfigurator +{ + public static void main(final String[] args) + { + SpringApplication.run(Application.class, args); + } +} + diff --git a/template-placeholder-demo/src/main/resources/application.yml b/template-placeholder-demo/src/main/resources/application.yml new file mode 100644 index 00000000..b336051b --- /dev/null +++ b/template-placeholder-demo/src/main/resources/application.yml @@ -0,0 +1,8 @@ +vaadin: + allowed-packages: software/xdev,com/vaadin/flow + +spring: + devtools: + restart: + poll-interval: 2s + quiet-period: 1s diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index dce6e136..8760af4d 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -18,7 +18,7 @@ scm:git:https://github.com/xdev-software/template-placeholder.git - 2023 + 2022 XDEV Software @@ -47,8 +47,23 @@ UTF-8 UTF-8 + + + 24.4.11 + + + + com.vaadin + vaadin-bom + pom + import + ${vaadin.version} + + + + @@ -84,6 +99,13 @@ + + + com.vaadin + vaadin-core + + + @@ -129,6 +151,21 @@ + + + com.vaadin + vaadin-maven-plugin + ${vaadin.version} + + + + prepare-frontend + + + + + org.apache.maven.plugins maven-compiler-plugin @@ -172,6 +209,30 @@ + + org.apache.maven.plugins + maven-jar-plugin + 3.4.2 + + + true + + false + true + + + + 1 + + + + + + META-INF/VAADIN/ + + + +