diff --git a/.github/workflows/central-sync.yml b/.github/workflows/central-sync.yml new file mode 100644 index 00000000..e60a4c67 --- /dev/null +++ b/.github/workflows/central-sync.yml @@ -0,0 +1,34 @@ +# WARNING: Do not edit this file directly. Instead, go to: +# +# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# +# and edit them there. Note that it will be sync'ed to all the Micronaut repos +name: Maven Central Sync +on: + release: + types: [published] +jobs: + central-sync: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Set the current release version + id: release_version + run: | + release_version=${GITHUB_REF:11} + sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties + echo ::set-output name=release_version::${release_version} + - name: Publish to Sonatype OSSRH + env: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} + GPG_FILE: ${{ secrets.GPG_FILE }} + run: echo $GPG_FILE | base64 -d > secring.gpg && ./gradlew publish && ./gradlew closeAndReleaseRepository diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml new file mode 100644 index 00000000..d0eed836 --- /dev/null +++ b/.github/workflows/dependency-check.yml @@ -0,0 +1,26 @@ +# WARNING: Do not edit this file directly. Instead, go to: +# +# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# +# and edit them there. Note that it will be sync'ed to all the Micronaut repos +name: Check Dependencies +on: + schedule: + - cron: '0 16 * * MON-FRI' +jobs: + check-dependencies: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Check Dependencies + run: ./gradlew dependencyUpdates diff --git a/.github/workflows/dependency-update.yml b/.github/workflows/dependency-update.yml new file mode 100644 index 00000000..a71906a5 --- /dev/null +++ b/.github/workflows/dependency-update.yml @@ -0,0 +1,40 @@ +# WARNING: Do not edit this file directly. Instead, go to: +# +# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# +# and edit them there. Note that it will be sync'ed to all the Micronaut repos +name: Update Dependencies +on: + schedule: + - cron: '0 4 * * MON-FRI' +jobs: + dependency-updates: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Export Gradle Properties + uses: micronaut-projects/github-actions/export-gradle-properties@master + - name: Check Dependencies + run: ./gradlew useLatestVersions + - name: Create Pull Request + uses: peter-evans/create-pull-request@v2 + with: + token: ${{ secrets.GH_TOKEN }} + committer: GitHub + author: micronaut-build + commit-message: Update dependencies + title: 'Dependency upgrades' + body: Upgrades dependencies to their latest versions + labels: "type: dependency-upgrade" + base: ${{ env.githubBranch }} + branch: dependency-updates \ No newline at end of file diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 00000000..301aa6a0 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,52 @@ +# WARNING: Do not edit this file directly. Instead, go to: +# +# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# +# and edit them there. Note that it will be sync'ed to all the Micronaut repos +name: Java CI +on: + push: + branches: + - master + - '[1-9]+.[0-9]+.x' + pull_request: + branches: + - master + - '[1-9]+.[0-9]+.x' +jobs: + build: + if: github.repository != 'micronaut-projects/micronaut-project-template' + runs-on: ubuntu-latest + strategy: + matrix: + java: ['8', '11', '14'] + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Build with Gradle + run: ./gradlew dependencyUpdates check --parallel --continue + env: + TESTCONTAINERS_RYUK_DISABLED: true + - name: Publish to JFrog OSS + if: success() && github.event_name == 'push' && matrix.java == '8' + env: + BINTRAY_USER: ${{ secrets.BINTRAY_USER }} + BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} + run: ./gradlew publish docs + - name: Publish to Github Pages + if: success() && github.event_name == 'push' && matrix.java == '8' + uses: micronaut-projects/github-pages-deploy-action@master + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + BASE_BRANCH: ${{ env.githubBranch }} + BRANCH: gh-pages + FOLDER: build/docs diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml new file mode 100644 index 00000000..0918db3d --- /dev/null +++ b/.github/workflows/label-sync.yml @@ -0,0 +1,21 @@ +# WARNING: Do not edit this file directly. Instead, go to: +# +# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# +# and edit them there. Note that it will be sync'ed to all the Micronaut repos +name: Sync labels +on: + issues: + types: [opened, edited, deleted, labeled, closed] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Download labels.yml + run: curl -O https://raw.githubusercontent.com/micronaut-projects/micronaut-build/master/labels.yml + - uses: micnncim/action-label-syncer@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + manifest: labels.yml \ No newline at end of file diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml new file mode 100644 index 00000000..89933a8f --- /dev/null +++ b/.github/workflows/release-notes.yml @@ -0,0 +1,56 @@ +# WARNING: Do not edit this file directly. Instead, go to: +# +# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# +# and edit them there. Note that it will be sync'ed to all the Micronaut repos +name: Release Notes +on: + pull_request: + types: [closed, labeled] + branches: + - master + - '[1-9]+.[0-9]+.x' + issues: + types: [closed,reopened, labeled] + push: + branches: + - master + - '[1-9]+.[0-9]+.x' + paths: + - ".github/workflows/release-notes.yml" +jobs: + release_notes: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check if it has release drafter config file + id: check_release_drafter + run: | + has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false") + echo ::set-output name=has_release_drafter::${has_release_drafter} + + # If it has release drafter: + - uses: release-drafter/release-drafter@v5 + if: steps.check_release_drafter.outputs.has_release_drafter == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Otherwise: + - name: Export Gradle Properties + if: steps.check_release_drafter.outputs.has_release_drafter == 'false' + uses: micronaut-projects/github-actions/export-gradle-properties@master + - uses: micronaut-projects/github-actions/release-notes@master + if: steps.check_release_drafter.outputs.has_release_drafter == 'false' + id: release_notes + with: + branch: ${{ env.githubBranch }} + - uses: ncipollo/release-action@v1 + if: steps.check_release_drafter.outputs.has_release_drafter == 'false' + with: + allowUpdates: true + commit: ${{ env.githubBranch }} + draft: true + name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }} + tag: v${{ steps.release_notes.outputs.next_version }} + bodyFile: CHANGELOG.md + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b4c9fbc5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,62 @@ +# WARNING: Do not edit this file directly. Instead, go to: +# +# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# +# and edit them there. Note that it will be sync'ed to all the Micronaut repos +name: Release +on: + release: + types: [published] +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Set the current release version + id: release_version + run: echo ::set-output name=release_version::${GITHUB_REF:11} + - name: Run pre-release + uses: micronaut-projects/github-actions/pre-release@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Publish to Bintray + env: + BINTRAY_USER: ${{ secrets.BINTRAY_USER }} + BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} + run: ./gradlew bintrayUpload docs + - name: Export Gradle Properties + uses: micronaut-projects/github-actions/export-gradle-properties@master + - name: Publish to Github Pages + if: success() + uses: micronaut-projects/github-pages-deploy-action@master + env: + BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + BASE_BRANCH: ${{ env.githubBranch }} + BRANCH: gh-pages + FOLDER: build/docs + VERSION: ${{ steps.release_version.outputs.release_version }} + - name: Checkout micronaut-core + uses: actions/checkout@v2 + with: + token: ${{ secrets.GH_TOKEN }} + repository: micronaut-projects/micronaut-core + ref: ${{ env.githubCoreBranch }} + path: micronaut-core # Must be micronaut-core + continue-on-error: true + - name: Update BOM + uses: micronaut-projects/github-actions/update-bom@master + with: + token: ${{ secrets.GH_TOKEN }} + continue-on-error: true + - name: Run post-release + if: success() + uses: micronaut-projects/github-actions/post-release@master + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 60e64810..e01c9ee4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,31 @@ +dist/ +.DS_Store +target/ .gradle/ .idea/ build/ +classes/ +out/ +*.db +*.log +*.iml +.classpath +.factorypath +bin/ +.settings/ +.project +*/test/ +*/META-INF/ +*.ipr +*.iws +.kotlintest +*/.kotlintest/ # ignore resources, are downloaded via a gradle task from micronaut_docs src/main/docs/resources/css/highlight/*.css src/main/docs/resources/css/highlight/*.png src/main/docs/resources/css/highlight/*.jpg src/main/docs/resources/css/*.css -src/main/docs/resources/img/*.svg src/main/docs/resources/js/*.js -src/main/docs/resources/style/*.html \ No newline at end of file +src/main/docs/resources/style/*.html +src/main/docs/resources/img/micronaut-logo-white.svg diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index db080951..00000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -dist: trusty -language: java -jdk: -- oraclejdk8 -- openjdk11 -sudo: required -env: - global: - - TERM=dumb - - MALLOC_ARENA_MAX=1 - - GRADLE_OPTS="-Xmx768m -Xms256m -XX:MaxPermSize=372m -XX:+CMSClassUnloadingEnabled" - - GIT_NAME="Graeme Rocher" - - GIT_EMAIL="graeme.rocher@gmail.com" - - secure: TFyoO2la9gUFPGPpH5F6wdnjNh85Ad+X1owDw+mBp52gInONy3CQlxVVjsrePxdldkV98M4TZY0fCRTv2/LuBPoGjDqaermFAnPESKkg6ksrVfVx9I95CGKWLBrVB8HzcZCvZjlkqP+d7FtccYOBbgGqvu8ed3ZHEnIsW1S3cq8d3nhxegIvViDwr3QZLv7Pz+e5WiEtJHPDt+U6V7Qfs/IVj+byWRio2i0YWXBUsyB62ETls1vRmr/1R2hW+uhW69Fx8MJtICrjkp5RgV6LOP8IAaVXpbni7YqsAJBFdRAJSza+r4KsLMSfJ4fvgn1COO1ZhYJC1T+wxv4S2zGBk6xxfDz5GAT95QhcJ5zpArdYcBM9bksaK/SECh9DI9r120e8FALrcadacYSSlk2JOIc3iT67QmDaY2fACaty7fTOLKJ7rbmPLsUeY0QzCCsAtoHbKt83D0699BaiaQw0MWI2X8VaZc+AS5UrdJLU0UduSLh64uIdkWDlxygUNnxrvZRe1dwu5auBP2BFQnrXNcUlOzG/Huctfs0MpWpNVPiytojUzZ1ICTOUxLpnZFeUT5u9lDLmZKtjc1rdM9KtL68wCCElp+lzLVRZzUuEFUpB0F8vq3RPKy+Z5QpMyMttNeO8LPlMK0IxeB70QUDQ2YDuz77l+Z1Bi2WH2S/37WI= - - secure: t61BopE5vtdJiHNw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grU2INaVGBYUwaDDE1ME= - - secure: u5SPcT7HpetEO3LxOtqAUU4VJcmjc9cQg5m1IP8xrk6PdGjx3dIdD0VTydBVICJEtwGDaLY0YLa0Nr6hMnDACI4r5cyHdBuqrgFkib+YH20WL8qc2my77pkwO5QzgKnUd36WPW3pUD0j0eoZzEaixn5IjLi95TZsRCHgnrvmY86eKLgV8KLOlICR6ZcsOQICAEuEyBDuQJ5rWg20EA22XIw55eYYiTeFO4ZVHbwxW4XKTWjeK2WV304QAEWjZEUh2JJAuM79btMqvIDPYZ9Y2DhN4dgamYBnITT/g+lp6OEC4UGfbJbvDmrNFIGVfarLwT5EYtCtnmA8duphFwRVxl6ZCJy4WQfzC2OYV8MN3zlZP1FTc6C4UCZWb36ZExysUXd60pCOPKnSVdJsY/549aXOyTLSKzqEPASQlWRpyMb9BozdRFuGtk8Geo2G7kZjUw37xrLmS3fTlrLTkldYNZOOXS1ypL3q00l+UCpy6q+OGcV5l/k1/dGvgGL+ACus3630mih3VorzNrzCOSchCcArRzQkPhaSRuc7JD78ihqv7ERgbQJQreJYXAls3bjbRTbvEVNUJwXjg0wccz9Dtnus66lJp4guurRvJ4YM2+Hx05pbcvvfoTzdGTYX7VLPjXQyTwGd3fHDc9FYPHhX6yaEeZObhC7IBA0xdUsZaL0= -install: "/bin/true" -script: -- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./travis-build-pr.sh; fi -- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./travis-build.sh; fi -before_cache: -- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock -- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ -cache: - directories: - - "$HOME/.gradle/caches/" - - "$HOME/.gradle/wrapper/" diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..3fcd4c64 --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,36 @@ +Thanks for reporting an issue, please review the task list below before submitting the +issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed. + +NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions. + +### Task List + +- [ ] Steps to reproduce provided +- [ ] Stacktrace (if present) provided +- [ ] Example that reproduces the problem uploaded to Github +- [ ] Full description of the issue provided (see below) + +### Steps to Reproduce + +1. TODO +2. TODO +3. TODO + +### Expected Behaviour + +Tell us what should happen + +### Actual Behaviour + +Tell us what happens instead + +### Environment Information + +- **Operating System**: TODO +- **Micronaut Version:** TODO +- **JDK Version:** TODO + +### Example Application + +- TODO: link to github repository with example that reproduces the issue + diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..b5312355 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 180e53cb..c135039b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Micronaut JMX -[![Maven Central](https://img.shields.io/maven-central/v/io.micronaut.configuration/micronaut-jmx.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.micronaut.configuration%22%20AND%20a:%22micronaut-jmx%22) -[![Build Status](https://travis-ci.org/micronaut-projects/micronaut-jmx.svg?branch=master)](https://travis-ci.org/micronaut-projects/micronaut-jmx) - +[![Maven Central](https://img.shields.io/maven-central/v/io.micronaut.jmx/micronaut-jmx.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.micronaut.jmx%22%20AND%20a:%22micronaut-jmx%22) This project includes support for exposing Micronaut management endpoints over JMX in [Micronaut](http://micronaut.io). diff --git a/build.gradle b/build.gradle index e0c48e54..c488d244 100644 --- a/build.gradle +++ b/build.gradle @@ -1,164 +1,63 @@ buildscript { repositories { + jcenter() + maven { url "https://dl.bintray.com/micronaut/core-releases-local" } maven { url "https://repo.grails.org/grails/core" } } dependencies { - classpath "org.grails:grails-gradle-plugin:$grailsVersion" - classpath "org.grails:grails-docs:$grailsVersion" - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' - classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' - classpath 'io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1' - classpath "io.micronaut.docs:micronaut-docs-asciidoc-extensions:$micronautDocsVersion" - classpath "io.micronaut.docs:micronaut-docs-gradle-plugins:$micronautDocsVersion" + classpath "io.micronaut.build:micronaut-gradle-plugins:2.0.0.RC10" } } -plugins { - id 'com.github.hierynomus.license' version '0.14.0' apply false -} - -repositories { - mavenCentral() - maven { url "https://repo.grails.org/grails/core" } -} - -version project.projectVersion - -ext { - distInstallDir = file("$buildDir/dist-tmp") - homeBinDir = file("bin") - homeLibDir = file("lib") - homeSrcDir = file("src") -} - subprojects { Project subproject -> + group "io.micronaut.jmx" - version project.projectVersion - group "io.micronaut.configuration" - ext { - isConfiguration = subproject.projectDir.parentFile.name == 'configurations' - isBuildSnapshot = version.toString().endsWith("-SNAPSHOT") - } - + apply plugin: "io.micronaut.build.common" - repositories { - maven { url "https://repo.grails.org/grails/core" } - maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + micronautBuild { + enforcedPlatform = true } - apply plugin: "groovy" - apply plugin: "java" - - sourceCompatibility = '1.8' - targetCompatibility = '1.8' - apply from: "https://raw.githubusercontent.com/micronaut-projects/micronaut-build/v${micronautBuildVersion}/publishing.gradle" - - jar { - manifest { - attributes('Automatic-Module-Name': "${subproject.group}.${subproject.name}".replaceAll('[^\\w\\.\\$_]', "_")) - attributes('Implementation-Version': projectVersion) - attributes('Implementation-Title': title) - } + if (subproject.parent.name == "examples" || subproject.name == "examples") { + return } - bintray.publish = true - - tasks.withType(Test) { - jvmArgs '-Duser.country=US' - jvmArgs '-Duser.language=en' - testLogging { - exceptionFormat = 'full' - } - afterSuite { - System.out.print(".") - System.out.flush() - } - - reports.html.enabled = !System.getenv("GITHUB_ACTIONS") - reports.junitXml.enabled = !System.getenv("GITHUB_ACTIONS") + apply plugin: "io.micronaut.build.dependency-updates" + if (!subproject.name.startsWith("test-suite")) { + apply plugin: "io.micronaut.build.publishing" } - configurations { - documentation - all { - resolutionStrategy.eachDependency { DependencyResolveDetails details -> - String group = details.requested.group - if (group == 'org.codehaus.groovy') { - details.useVersion(groovyVersion) - } - } - } - } dependencies { - annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion") - testAnnotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion") - implementation platform("io.micronaut:micronaut-bom:$micronautVersion") - - documentation "org.codehaus.groovy:groovy-templates:$groovyVersion" - documentation "org.codehaus.groovy:groovy-dateutil:$groovyVersion" + annotationProcessor "io.micronaut:micronaut-inject-java" + annotationProcessor "io.micronaut.docs:micronaut-docs-asciidoc-config-props:$micronautDocsVersion" + annotationProcessor "io.micronaut:micronaut-graal" + api "io.micronaut:micronaut-inject" + + testAnnotationProcessor "io.micronaut:micronaut-inject-java" testImplementation("org.spockframework:spock-core:${spockVersion}") { - exclude module: 'groovy-all' + exclude module:'groovy-all' } - testImplementation "cglib:cglib-nodep:3.3.0" - testImplementation "org.objenesis:objenesis:3.1" - - testRuntime "ch.qos.logback:logback-classic:1.2.3" - testImplementation "org.codehaus.groovy:groovy-test:$groovyVersion" - } - - groovydoc { - classpath += project.configurations.documentation - } - - task allDeps(type: DependencyReportTask) {} - - apply plugin: 'checkstyle' - - checkstyle { - toolVersion = 8.16 - configFile = rootProject.file('config/checkstyle/checkstyle.xml') - - // Per submodule - maxErrors = 1 - maxWarnings = 10 - - showViolations = true - } - - checkstyleTest.enabled = false - - tasks.withType(GroovyCompile) { - groovyOptions.forkOptions.jvmArgs.add('-Dgroovy.parameters=true') - } - tasks.withType(JavaCompile) { - options.encoding = "UTF-8" - options.compilerArgs.add('-parameters') + testImplementation "io.micronaut.test:micronaut-test-spock:$micronautTestVersion" } } -apply from:"https://raw.githubusercontent.com/micronaut-projects/micronaut-docs/v${micronautDocsVersion}/gradle/docs.gradle" -allprojects { - apply plugin: 'idea' +apply plugin: "io.micronaut.build.docs" +apply plugin: "io.micronaut.build.dependency-updates" - idea { - module { - outputDir file('build/classes/java/main') - testOutputDir file('build/classes/groovy/test') +dependencyUpdates.resolutionStrategy { + componentSelection { rules -> + rules.all { ComponentSelection selection -> + boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'preview', 'b', 'ea'].any { qualifier -> + selection.candidate.version ==~ /(?i).*[.-]$qualifier[.\d-+]*/ + } + if (rejected) { + selection.reject('Release candidate') + } } } - if (it.name.contains('example') || it.name.startsWith('benchmark')) { - return - } - apply from: rootProject.file('gradle/license.gradle') } -project.afterEvaluate { - allprojects.repositories.each { handler -> - handler.each { - if (it.url.toString().startsWith("http://")) { - throw new GradleException("Build should not define insecure HTTP-based Maven repostories") - } - } - } -} \ No newline at end of file + + + diff --git a/config/HEADER b/config/HEADER index 10b6fdb8..b08b7205 100644 --- a/config/HEADER +++ b/config/HEADER @@ -4,7 +4,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 +https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 8cfd8d89..cf521c07 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -1,30 +1,31 @@ + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> @@ -42,29 +43,29 @@ - + - + - + - + - + - + - + - + - + + - + @@ -96,7 +98,7 @@ - + @@ -106,7 +108,7 @@ - + @@ -115,14 +117,14 @@ - + - + @@ -141,14 +143,14 @@ - + - + @@ -156,7 +158,7 @@ - + @@ -170,13 +172,13 @@ - + - + @@ -190,13 +192,13 @@ - + - + diff --git a/config/spotless.license.java b/config/spotless.license.java new file mode 100644 index 00000000..91ec22ab --- /dev/null +++ b/config/spotless.license.java @@ -0,0 +1,15 @@ +/* + * Copyright 2017-$YEAR original authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 02581c67..d4e46236 100755 --- a/gradle.properties +++ b/gradle.properties @@ -1,18 +1,25 @@ -projectVersion=1.2.1.BUILD-SNAPSHOT +projectVersion=2.0.0.BUILD-SNAPSHOT +micronautDocsVersion=1.0.23 +micronautVersion=1.3.5 +micronautTestVersion=1.1.5 +groovyVersion=2.5.11 +spockVersion=1.3-groovy-2.5 +# Or: +#groovyVersion=2.5.11 +#spockVersion=1.3-groovy-2.5 + +title=Micronaut JMX +projectDesc=Integrates JMX Monitoring +projectUrl=https://micronaut.io +githubSlug=micronaut-projects/micronaut-jmx developers=Graeme Rocher + +# This project's branch githubBranch=master -githubSlug=micronaut-projects/micronaut-jmx -grailsVersion=3.2.9 -groovyVersion=2.5.6 -micronautDocsVersion=1.0.22 -micronautBuildVersion=1.0.0 -micronautVersion=1.3.0 -projectDesc=Provides JMX support for Micronaut services -projectUrl=http://micronaut.io -spockVersion=1.2-groovy-2.5 -title=Micronaut JMX Configuration +# Micronaut core branch for BOM pull requests +githubCoreBranch=master + +bomProperty=micronautJmxVersion -# TODO - This is required for now because -# of https://github.com/micronaut-projects/micronaut-docs/blob/v1.0.0.M4/gradle/docs.gradle#L260 -kafkaVersion=NA +org.gradle.caching=true diff --git a/gradle/license.gradle b/gradle/license.gradle index a453b7e4..530d2ee5 100644 --- a/gradle/license.gradle +++ b/gradle/license.gradle @@ -9,8 +9,9 @@ license { java = 'SLASHSTAR_STYLE' groovy = 'SLASHSTAR_STYLE' } - ext.year = '2017-2019' + ext.year = '2017-2020' + exclude "**/transaction/**" exclude '**/*.txt' exclude '**/*.html' exclude '**/*.xml' diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f3d88b1c..62d4c053 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index eb0670c5..622ab64a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Tue Mar 10 13:03:01 CET 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 2fe81a7d..fbd7c515 100755 --- a/gradlew +++ b/gradlew @@ -82,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -129,6 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/gradlew.bat b/gradlew.bat index 9109989e..a9f778a7 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%* set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/JmxConfiguration.java b/jmx/src/main/java/io/micronaut/configuration/jmx/JmxConfiguration.java index f64c558e..04a89c82 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/JmxConfiguration.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/JmxConfiguration.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/MBeanServerFactoryBean.java b/jmx/src/main/java/io/micronaut/configuration/jmx/MBeanServerFactoryBean.java index 191af25a..4e8026c3 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/MBeanServerFactoryBean.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/MBeanServerFactoryBean.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/context/AbstractDynamicMBeanFactory.java b/jmx/src/main/java/io/micronaut/configuration/jmx/context/AbstractDynamicMBeanFactory.java index ccc58331..b7a12222 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/context/AbstractDynamicMBeanFactory.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/context/AbstractDynamicMBeanFactory.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/context/DefaultNameGenerator.java b/jmx/src/main/java/io/micronaut/configuration/jmx/context/DefaultNameGenerator.java index dc04befa..2ffadf82 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/context/DefaultNameGenerator.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/context/DefaultNameGenerator.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/context/DynamicMBeanFactory.java b/jmx/src/main/java/io/micronaut/configuration/jmx/context/DynamicMBeanFactory.java index 56c5671a..9274f8b6 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/context/DynamicMBeanFactory.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/context/DynamicMBeanFactory.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/context/NameGenerator.java b/jmx/src/main/java/io/micronaut/configuration/jmx/context/NameGenerator.java index 977e8bd3..f67e47bd 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/context/NameGenerator.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/context/NameGenerator.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/context/package-info.java b/jmx/src/main/java/io/micronaut/configuration/jmx/context/package-info.java index 6dfcf854..8f57021f 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/context/package-info.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/context/package-info.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointMBeanFactory.java b/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointMBeanFactory.java index 9c915c20..f6418c9d 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointMBeanFactory.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointMBeanFactory.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointMethodJmxProcessor.java b/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointMethodJmxProcessor.java index 4ab6523d..7501ae49 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointMethodJmxProcessor.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointMethodJmxProcessor.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointNameGenerator.java b/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointNameGenerator.java index 3d4fc22a..c85d82be 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointNameGenerator.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/EndpointNameGenerator.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/package-info.java b/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/package-info.java index 12e77b23..f905f7fa 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/package-info.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/endpoint/package-info.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jmx/src/main/java/io/micronaut/configuration/jmx/package-info.java b/jmx/src/main/java/io/micronaut/configuration/jmx/package-info.java index 9889d600..7e618c02 100644 --- a/jmx/src/main/java/io/micronaut/configuration/jmx/package-info.java +++ b/jmx/src/main/java/io/micronaut/configuration/jmx/package-info.java @@ -1,11 +1,11 @@ /* - * Copyright 2017-2019 original authors + * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/docs/guide/setup.adoc b/src/main/docs/guide/setup.adoc index a81194af..7f53568b 100644 --- a/src/main/docs/guide/setup.adoc +++ b/src/main/docs/guide/setup.adoc @@ -1 +1 @@ -dependency:io.micronaut.configuration:micronaut-jmx[version="{version}"] +dependency:io.micronaut.jmx:micronaut-jmx[version="{version}"] diff --git a/travis-build-pr.sh b/travis-build-pr.sh deleted file mode 100755 index 5294da0d..00000000 --- a/travis-build-pr.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e -EXIT_STATUS=0 - -./gradlew check --no-daemon || EXIT_STATUS=$? - -exit $EXIT_STATUS diff --git a/travis-build.sh b/travis-build.sh deleted file mode 100755 index d48c1b64..00000000 --- a/travis-build.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash -set -e -EXIT_STATUS=0 - -if [ "${TRAVIS_JDK_VERSION}" == "openjdk11" ] ; then - echo "Check for branch $TRAVIS_BRANCH JDK: $TRAVIS_JDK_VERSION" - ./gradlew testClasses --no-daemon || EXIT_STATUS=$? - - if [ $EXIT_STATUS -ne 0 ]; then - exit $EXIT_STATUS - fi - - ./gradlew --stop - ./gradlew check --no-daemon || EXIT_STATUS=$? - - if [ $EXIT_STATUS -ne 0 ]; then - exit $EXIT_STATUS - fi - - ./gradlew --stop - ./gradlew assemble --no-daemon || EXIT_STATUS=$? - - exit $EXIT_STATUS -fi - -git config --global user.name "$GIT_NAME" -git config --global user.email "$GIT_EMAIL" -git config --global credential.helper "store --file=~/.git-credentials" -echo "https://$GH_TOKEN:@github.com" > ~/.git-credentials - -if [[ $EXIT_STATUS -eq 0 ]]; then - if [[ -n $TRAVIS_TAG ]]; then - echo "Skipping Tests to Publish Release" - ./gradlew pTML assemble --no-daemon || EXIT_STATUS=$? - else - ./gradlew --stop - ./gradlew testClasses --no-daemon || EXIT_STATUS=$? - - ./gradlew --stop - ./gradlew check --no-daemon || EXIT_STATUS=$? - fi -fi - -if [[ $EXIT_STATUS -eq 0 ]]; then - echo "Publishing archives for branch $TRAVIS_BRANCH" - if [[ -n $TRAVIS_TAG ]] || [[ $TRAVIS_BRANCH =~ ^master$ && $TRAVIS_PULL_REQUEST == 'false' ]]; then - - echo "Publishing archives" - ./gradlew --stop - if [[ -n $TRAVIS_TAG ]]; then - ./gradlew bintrayUpload --no-daemon --stacktrace || EXIT_STATUS=$? - if [[ $EXIT_STATUS -eq 0 ]]; then - ./gradlew synchronizeWithMavenCentral --no-daemon - fi - else - ./gradlew publish --no-daemon --stacktrace || EXIT_STATUS=$? - fi - - if [[ $EXIT_STATUS -eq 0 ]]; then - ./gradlew --console=plain --no-daemon docs || EXIT_STATUS=$? - - git clone https://${GH_TOKEN}@github.com/micronaut-projects/micronaut-jmx.git -b gh-pages gh-pages --single-branch > /dev/null - - cd gh-pages - - # If this is the master branch then update the snapshot - if [[ $TRAVIS_BRANCH =~ ^master|[12]\..\.x$ ]]; then - mkdir -p snapshot - cp -r ../build/docs/. ./snapshot/ - - git add snapshot/* - fi - - - # If there is a tag present then this becomes the latest - if [[ -n $TRAVIS_TAG ]]; then - mkdir -p latest - cp -r ../build/docs/. ./latest/ - git add latest/* - - version="$TRAVIS_TAG" - version=${version:1} - majorVersion=${version:0:4} - majorVersion="${majorVersion}x" - - mkdir -p "$version" - cp -r ../build/docs/. "./$version/" - git add "$version/*" - - mkdir -p "$majorVersion" - cp -r ../build/docs/. "./$majorVersion/" - git add "$majorVersion/*" - - fi - - git commit -a -m "Updating docs for Travis build: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID" && { - git push origin HEAD || true - } - cd .. - - rm -rf gh-pages - fi - fi -fi - -exit $EXIT_STATUS