diff --git a/.config/pmd/ruleset.xml b/.config/pmd/java/ruleset.xml similarity index 100% rename from .config/pmd/ruleset.xml rename to .config/pmd/java/ruleset.xml diff --git a/.gitattributes b/.gitattributes index 9c74e428..8ac80271 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,4 +6,4 @@ # Force MVN Wrapper Linux files LF mvnw text eol=lf -.mvn/wrapper/maven-wrapper.properties text eol=lf +maven-wrapper.properties text eol=lf diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ba085304..57f229ec 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -33,6 +33,15 @@ body: validations: required: true + - type: textarea + id: description + attributes: + label: Description of the problem + description: | + Describe as exactly as possible what is not working. + validations: + required: true + - type: textarea id: steps-to-reproduce attributes: @@ -47,20 +56,6 @@ body: validations: required: true - - type: textarea - id: expected-behavior - attributes: - label: Expected behavior - description: | - Tell us what you expect to happen. - - - type: textarea - id: actual-behavior - attributes: - label: Actual behavior - description: | - Tell us what happens with the steps given above. - - type: textarea id: additional-information attributes: diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 16a3f376..e2f3597a 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -31,13 +31,13 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Close issue if everything is fine - if: env.lychee_exit_code == 0 && steps.find-issue.outputs.number != '' + if: steps.lychee.outputs.exit_code == 0 && steps.find-issue.outputs.number != '' run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }} env: GH_TOKEN: ${{ github.token }} - name: Create Issue From File - if: env.lychee_exit_code != 0 + if: steps.lychee.outputs.exit_code != 0 uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5 with: issue-number: ${{ steps.find-issue.outputs.number }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd32352f..c3420b88 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: needs: [check-code] timeout-minutes: 10 outputs: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.create-release.outputs.upload_url }} steps: - uses: actions/checkout@v4 @@ -61,15 +61,7 @@ jobs: git config --global user.name "GitHub Actions" - name: Un-SNAP - run: | - mvnwPath=$(readlink -f ./mvnw) - modules=("") # root - modules+=($(grep -oP '(?<=)[^<]+' 'pom.xml')) - for i in "${modules[@]}" - do - echo "Processing $i/pom.xml" - (cd "$i" && $mvnwPath -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false) - done + run: ./mvnw -B versions:set -DremoveSnapshot -DprocessAllModules -DgenerateBackupPoms=false - name: Get version id: version @@ -88,8 +80,8 @@ jobs: git push origin --tags - name: Create Release - id: create_release - uses: shogo82148/actions-create-release@e5f206451d4ace2da9916d01f1aef279997f8659 # v1 + id: create-release + uses: shogo82148/actions-create-release@4661dc54f7b4b564074e9fbf73884d960de569a3 # v1 with: tag_name: v${{ steps.version.outputs.release }} release_name: v${{ steps.version.outputs.release }} @@ -123,20 +115,36 @@ jobs: git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" git pull + + - name: Set up JDK + uses: actions/setup-java@v4 + with: # running setup-java overwrites the settings.xml + distribution: 'temurin' + java-version: '17' + server-id: github-central + server-password: PACKAGES_CENTRAL_TOKEN + gpg-passphrase: MAVEN_GPG_PASSPHRASE + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once + - name: Publish to GitHub Packages Central + run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central + working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} + env: + PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + - name: Set up JDK uses: actions/setup-java@v4 with: # running setup-java again overwrites the settings.xml - java-version: '17' distribution: 'temurin' + java-version: '17' server-id: sonatype-central-portal server-username: MAVEN_CENTRAL_USERNAME server-password: MAVEN_CENTRAL_TOKEN gpg-passphrase: MAVEN_GPG_PASSPHRASE - gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - name: Publish to Central Portal - run: ../mvnw -B deploy -P publish-sonatype-central-portal -DskipTests + run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests env: MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }} MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }} @@ -188,15 +196,7 @@ jobs: git pull - name: Inc Version and SNAP - run: | - mvnwPath=$(readlink -f ./mvnw) - modules=("") # root - modules+=($(grep -oP '(?<=)[^<]+' 'pom.xml')) - for i in "${modules[@]}" - do - echo "Processing $i/pom.xml" - (cd "$i" && $mvnwPath -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true -DupdateMatchingVersions=false) - done + run: ./mvnw -B versions:set -DnextSnapshot -DprocessAllModules -DgenerateBackupPoms=false - name: Git Commit and Push run: | diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml deleted file mode 100644 index df6dbb7e..00000000 --- a/.github/workflows/sonar.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Sonar - -on: - workflow_dispatch: - push: - branches: [ develop ] - paths-ignore: - - '**.md' - - '.config/**' - - '.github/**' - - '.idea/**' - - 'assets/**' - pull_request: - branches: [ develop ] - paths-ignore: - - '**.md' - - '.config/**' - - '.github/**' - - '.idea/**' - - 'assets/**' - -env: - SONARCLOUD_ORG: ${{ github.event.organization.login }} - SONARCLOUD_HOST: https://sonarcloud.io - -jobs: - token-check: - runs-on: ubuntu-latest - if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }} - timeout-minutes: 5 - outputs: - hasToken: ${{ steps.check-token.outputs.has }} - steps: - - id: check-token - run: | - [ -z $SONAR_TOKEN ] && echo "has=false" || echo "has=true" >> "$GITHUB_OUTPUT" - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - sonar-scan: - runs-on: ubuntu-latest - needs: token-check - if: ${{ needs.token-check.outputs.hasToken }} - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 17 - - - name: Cache SonarCloud packages - uses: actions/cache@v4 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - - name: Build with Maven - run: | - ./mvnw -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ - -DskipTests \ - -Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} \ - -Dsonar.organization=${{ env.SONARCLOUD_ORG }} \ - -Dsonar.host.url=${{ env.SONARCLOUD_HOST }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 8a858912..046be633 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -12,6 +12,23 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: # running setup-java overwrites the settings.xml + distribution: 'temurin' + java-version: '17' + server-id: github-central + server-password: PACKAGES_CENTRAL_TOKEN + gpg-passphrase: MAVEN_GPG_PASSPHRASE + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once + + - name: Publish to GitHub Packages Central + run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central + working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} + env: + PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Set up JDK uses: actions/setup-java@v4 @@ -22,10 +39,9 @@ jobs: server-username: MAVEN_CENTRAL_USERNAME server-password: MAVEN_CENTRAL_TOKEN gpg-passphrase: MAVEN_GPG_PASSPHRASE - gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - name: Publish to Central Portal - run: ../mvnw -B deploy -P publish-sonatype-central-portal -DskipTests + run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} env: MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }} diff --git a/.gitignore b/.gitignore index 8ffb4709..e567ca9f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,12 @@ # Maven target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties -# https://github.com/takari/maven-wrapper#usage-without-binary-jar + +# Maven Wrapper .mvn/wrapper/maven-wrapper.jar +# Maven Flatten Plugin +.flattened-pom.xml # Compiled class file *.class @@ -18,20 +14,12 @@ buildNumber.properties # Log file *.log -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - # Package/Binary Files don't belong into a git repo *.jar *.war -*.nar *.ear *.zip *.tar.gz -*.rar *.dll *.exe *.bin @@ -39,24 +27,11 @@ buildNumber.properties # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -# JRebel -**/resources/rebel.xml -**/resources/rebel-remote.xml - -# eclispe stuff for root -/.settings/ -/.classpath -/.project - - -# eclispe stuff for modules -/*/.metadata/ -/*/.apt_generated_tests/ -/*/.settings/ -/*/.classpath -/*/.project -/*/RemoteSystemsTempFiles/ - +# Eclipse +.metadata +.settings +.classpath +.project #vaadin/node webpack/frontend stuff # Ignore Node @@ -80,9 +55,6 @@ vite.generated.ts /*/src/main/bundles/ *.lock -#custom -.flattened-pom.xml -.tern-project # == IntelliJ == *.iml diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 4d624fa9..6a6b8b2c 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip diff --git a/CHANGELOG.md b/CHANGELOG.md index 524159b0..de163364 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 4.6.4 +* Updated dependencies + # 4.6.3 * Migrated deployment to _Sonatype Maven Central Portal_ [#155](https://github.com/xdev-software/standard-maven-template/issues/155) * Updated dependencies diff --git a/README.md b/README.md index 2fa3d3e1..c1500401 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0?logo=vaadin)](https://vaadin.com/directory/component/leafletmap-for-vaadin) [![Latest version](https://img.shields.io/maven-central/v/software.xdev/vaadin-maps-leaflet-flow?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/vaadin-maps-leaflet-flow) [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/vaadin-maps-leaflet-flow/check-build.yml?branch=develop)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/check-build.yml?query=branch%3Adevelop) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_vaadin-maps-leaflet-flow&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_vaadin-maps-leaflet-flow) ![Vaadin 24+](https://img.shields.io/badge/Vaadin%20Platform/Flow-24+-00b4f0) # LeafletMap for Vaadin diff --git a/pom.xml b/pom.xml index cbdf4dc5..7713dee6 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ com.puppycrawl.tools checkstyle - 10.23.1 + 10.26.1 @@ -70,24 +70,24 @@ org.apache.maven.plugins maven-pmd-plugin - 3.26.0 + 3.27.0 true true - .config/pmd/ruleset.xml + .config/pmd/java/ruleset.xml net.sourceforge.pmd pmd-core - 7.13.0 + 7.16.0 net.sourceforge.pmd pmd-java - 7.13.0 + 7.16.0 diff --git a/vaadin-maps-leaflet-flow-demo/pom.xml b/vaadin-maps-leaflet-flow-demo/pom.xml index a4f40a66..f77120f8 100644 --- a/vaadin-maps-leaflet-flow-demo/pom.xml +++ b/vaadin-maps-leaflet-flow-demo/pom.xml @@ -29,9 +29,9 @@ software.xdev.vaadin.Application - 24.7.4 + 24.8.5 - 3.4.5 + 3.5.4 @@ -62,10 +62,35 @@ com.vaadin vaadin-core + com.vaadin hilla-dev + + com.vaadin + copilot + + + + com.vaadin + vaadin-material-theme + + + + com.vaadin + flow-react + + + + com.vaadin + collaboration-engine + + + + com.vaadin.servletdetector + throw-if-servlet3 + @@ -79,6 +104,7 @@ com.vaadin vaadin-spring-boot-starter + com.vaadin hilla @@ -122,6 +148,30 @@ + + + + false + + false + + + + + software.xdev + *vaadin* + + + com.vaadin + + + + + com.vaadin.external* + + + + org.apache.maven.plugins diff --git a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java index 187ecfbc..0d9760b7 100644 --- a/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java +++ b/vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java @@ -56,6 +56,20 @@ public class ComplexDemo extends AbstractDemo private static final Logger LOG = LoggerFactory.getLogger(ComplexDemo.class); private static final String ID = "leaflet-demo-view"; + @SuppressWarnings("checkstyle:LineLength") + private static final String INLINED_XDEV_LOGO = """ + data:image/svg+xml;utf8, + + + + + + + + + """; private final LDefaultComponentManagementRegistry reg; private final LMap map; @@ -130,19 +144,10 @@ public ComplexDemo() @SuppressWarnings("checkstyle:LineLength") final LIcon iconXDEV = new LIcon(this.reg, new LIconOptions() - .withIconUrl(""" - data:image/svg+xml;utf8, - - - - - - - - - """) + .withIconUrl(INLINED_XDEV_LOGO) + // You can also use the URL directly but note you may have to whitelist the resources accordingly + // Comment this out to see the inline version above + .withIconUrl("assets/XDEV_LOGO.svg") .withIconSize(new LPoint(this.reg, 125, 25))); final LLatLng locationXDEV = new LLatLng(this.reg, 49.6756, 12.1610); diff --git a/vaadin-maps-leaflet-flow-demo/src/main/resources/META-INF/resources/assets/XDEV_LOGO.svg b/vaadin-maps-leaflet-flow-demo/src/main/resources/META-INF/resources/assets/XDEV_LOGO.svg new file mode 100644 index 00000000..05f9cc11 --- /dev/null +++ b/vaadin-maps-leaflet-flow-demo/src/main/resources/META-INF/resources/assets/XDEV_LOGO.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/vaadin-maps-leaflet-flow/pom.xml b/vaadin-maps-leaflet-flow/pom.xml index 75ade0fe..de816cad 100644 --- a/vaadin-maps-leaflet-flow/pom.xml +++ b/vaadin-maps-leaflet-flow/pom.xml @@ -49,7 +49,7 @@ UTF-8 - 24.7.4 + 24.8.5 @@ -73,13 +73,13 @@ com.fasterxml.jackson.core jackson-databind - 2.19.0 + 2.19.2 org.apache.commons commons-text - 1.13.1 + 1.14.0 @@ -214,13 +214,13 @@ - publish-sonatype-central-portal + publish org.codehaus.mojo flatten-maven-plugin - 1.7.0 + 1.7.2 ossrh @@ -237,7 +237,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.7 + 3.2.8 sign-artifacts @@ -256,11 +256,17 @@ - + + + + + publish-sonatype-central-portal + + org.sonatype.central central-publishing-maven-plugin - 0.7.0 + 0.8.0 true sonatype-central-portal @@ -282,7 +288,7 @@ com.puppycrawl.tools checkstyle - 10.23.1 + 10.26.1 @@ -307,24 +313,24 @@ org.apache.maven.plugins maven-pmd-plugin - 3.26.0 + 3.27.0 true true - ../.config/pmd/ruleset.xml + ../.config/pmd/java/ruleset.xml net.sourceforge.pmd pmd-core - 7.13.0 + 7.16.0 net.sourceforge.pmd pmd-java - 7.13.0 + 7.16.0