├── .github └── workflows │ └── nebula.yml ├── .gitignore ├── .java-version ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build.gradle ├── gradle.lockfile ├── gradle.properties ├── gradle ├── gradle-daemon-jvm.properties └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src ├── integTest └── groovy │ └── nebula │ └── plugin │ └── resolutionrules │ ├── AbstractRulesSpec.groovy │ ├── AlignApacheKafkaIntegrationSpec.groovy │ ├── AlignAwsSdkJavaV2Spec.groovy │ ├── AlignConfluentKafkaIntegrationSpec.groovy │ ├── AlignSpockframeworkSpec.groovy │ ├── AlignSpringFrameworkIntegrationSpec.groovy │ ├── AlignSpringKafkaIntegrationSpec.groovy │ ├── CodehausJacksonSpec.groovy │ ├── GroovyIntegrationSpec.groovy │ ├── ReplaceJavaxIntegrationSpec.groovy │ ├── ReplaceJpountzLz4Spec.groovy │ ├── RulesBaseSpecification.groovy │ ├── Slf4j1xOnlySpec.groovy │ ├── SubstituteLog4J2Spec.groovy │ └── SubstituteSnakeyamlSpec.groovy ├── main ├── incubating │ ├── README.md │ └── replace-bouncycastle-jdk15plus-jdk15on.json └── resources │ ├── align-apache-groovy.json │ ├── align-apache-kafka.json │ ├── align-archaius2.json │ ├── align-asm.json │ ├── align-aws-java-sdk.json │ ├── align-aws-sdk-java-v2.json │ ├── align-confluent-kafka.json │ ├── align-eureka-client.json │ ├── align-governator.json │ ├── align-groovy.json │ ├── align-grpc.json │ ├── align-guice.json │ ├── align-hibernate-core.json │ ├── align-hibernate-search.json │ ├── align-hibernate-validator.json │ ├── align-jackson.json │ ├── align-jersey.json │ ├── align-jetty.json │ ├── align-kotlin.json │ ├── align-log4j2.json │ ├── align-lucene.json │ ├── align-netty.json │ ├── align-okhttp3.json │ ├── align-protobuf.json │ ├── align-retrofit2.json │ ├── align-ribbon.json │ ├── align-servo.json │ ├── align-slf4j.json │ ├── align-spectator.json │ ├── align-spockframework.json │ ├── align-spring-integration.json │ ├── align-spring-kafka.json │ ├── align-spring.json │ ├── align-springfox.json │ ├── align-swagger.json │ ├── align-xbean.json │ ├── align-xstream.json │ ├── codehaus-jackson.json │ ├── deny-bouncycastle-unofficial.json │ ├── deny-genie-3.2.3.json │ ├── optional-slf4j-bridge.json │ ├── optional-slf4j1x-only.json │ ├── optional-spring-boot-log4j2.json │ ├── optional-substitute-graphql-java.json │ ├── reject-bad-karyon-versions.json │ ├── replace-asm.json │ ├── replace-bouncycastle-debug.json │ ├── replace-bouncycastle-jdk12-jdk14.json │ ├── replace-bouncycastle-jdk14-jdk15on.json │ ├── replace-bouncycastle-jdk15-jdk15on.json │ ├── replace-bouncycastle-jdk16-jdk15on.json │ ├── replace-c3p0.json │ ├── replace-google-collections.json │ ├── replace-groovy.json │ ├── replace-guava.json │ ├── replace-javassist.json │ ├── replace-javax.json │ ├── replace-jpountz-lz4.json │ ├── replace-log4j.json │ ├── replace-lz4.json │ ├── replace-rxjava.json │ ├── replace-servlet.json │ ├── replace-xerces.json │ ├── substitute-log4j2.json │ ├── substitute-mimepull-1.9.8.json │ └── substitute-snakeyaml.json └── test ├── groovy ├── ResourceSchemaValidatorSpec.groovy ├── ResourceValidatorSpec.groovy ├── VerifyRulesAgainstMavenCentralSpec.groovy └── VerifyRulesSpec.groovy └── resources ├── missing-artifacts-whitelist.txt ├── rules ├── invalid-duplicate-key.json ├── invalid-extra-align-key.json ├── invalid-extra-key.json ├── invalid-missing-align-key.json └── invalid-missing-key.json └── valid-schema.json /.github/workflows/nebula.yml: -------------------------------------------------------------------------------- 1 | name: Nebula Build 2 | on: 3 | push: 4 | branches: 5 | - '*' 6 | tags: 7 | - v*.*.* 8 | - v*.*.*-rc.* 9 | pull_request: 10 | 11 | jobs: 12 | validation: 13 | name: "Gradle Wrapper Validation" 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v2 17 | - uses: gradle/wrapper-validation-action@v1 18 | buildmultijdk: 19 | if: (!startsWith(github.ref, 'refs/tags/v')) 20 | needs: validation 21 | runs-on: ubuntu-latest 22 | strategy: 23 | matrix: 24 | # test against latest update of some major Java version(s), as well as specific LTS version(s) 25 | java: [8, 17, 21] 26 | name: Gradle Build without Publish 27 | steps: 28 | - uses: actions/checkout@v1 29 | - name: Setup git user 30 | run: | 31 | git config --global user.name "Nebula Plugin Maintainers" 32 | git config --global user.email "nebula-plugins-oss@netflix.com" 33 | - name: Set up JDKs 34 | uses: actions/setup-java@v4 35 | with: 36 | distribution: 'zulu' 37 | java-version: | 38 | 8 39 | ${{ matrix.java }} 40 | java-package: jdk 41 | - uses: actions/cache@v4 42 | id: gradle-cache 43 | with: 44 | path: ~/.gradle/caches 45 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }} 46 | restore-keys: | 47 | - ${{ runner.os }}-gradle- 48 | - uses: actions/cache@v4 49 | id: gradle-wrapper-cache 50 | with: 51 | path: ~/.gradle/wrapper 52 | key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} 53 | restore-keys: | 54 | - ${{ runner.os }}-gradlewrapper- 55 | - name: Gradle build 56 | run: ./gradlew --info --stacktrace build 57 | env: 58 | JDK_VERSION_FOR_TESTS: ${{ matrix.java }} 59 | validatepluginpublication: 60 | if: startsWith(github.ref, 'refs/tags/v') 61 | needs: validation 62 | runs-on: ubuntu-latest 63 | name: Gradle Plugin Publication Validation 64 | env: 65 | NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }} 66 | NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }} 67 | steps: 68 | - uses: actions/checkout@v1 69 | - name: Setup git user 70 | run: | 71 | git config --global user.name "Nebula Plugin Maintainers" 72 | git config --global user.email "nebula-plugins-oss@netflix.com" 73 | - name: Set up JDKs 74 | uses: actions/setup-java@v4 75 | with: 76 | distribution: 'zulu' 77 | java-version: | 78 | 8 79 | 21 80 | java-package: jdk 81 | - uses: actions/cache@v4 82 | id: gradle-cache 83 | with: 84 | path: ~/.gradle/caches 85 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }} 86 | restore-keys: | 87 | - ${{ runner.os }}-gradle- 88 | - uses: actions/cache@v4 89 | id: gradle-wrapper-cache 90 | with: 91 | path: ~/.gradle/wrapper 92 | key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} 93 | restore-keys: | 94 | - ${{ runner.os }}-gradlewrapper- 95 | - name: Verify plugin publication 96 | if: | 97 | startsWith(github.ref, 'refs/tags/v') && 98 | (!contains(github.ref, '-rc.')) 99 | run: ./gradlew --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final publishPlugin --validate-only -x check -x signPluginMavenPublication 100 | publish: 101 | if: startsWith(github.ref, 'refs/tags/v') 102 | needs: validatepluginpublication 103 | runs-on: ubuntu-latest 104 | name: Gradle Build and Publish 105 | env: 106 | NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }} 107 | NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }} 108 | NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }} 109 | NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }} 110 | NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }} 111 | NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }} 112 | steps: 113 | - uses: actions/checkout@v1 114 | - name: Setup git user 115 | run: | 116 | git config --global user.name "Nebula Plugin Maintainers" 117 | git config --global user.email "nebula-plugins-oss@netflix.com" 118 | - name: Set up JDKs 119 | uses: actions/setup-java@v4 120 | with: 121 | distribution: 'zulu' 122 | java-version: | 123 | 8 124 | 21 125 | java-package: jdk 126 | - uses: actions/cache@v4 127 | id: gradle-cache 128 | with: 129 | path: ~/.gradle/caches 130 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }} 131 | restore-keys: | 132 | - ${{ runner.os }}-gradle- 133 | - uses: actions/cache@v4 134 | id: gradle-wrapper-cache 135 | with: 136 | path: ~/.gradle/wrapper 137 | key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} 138 | restore-keys: | 139 | - ${{ runner.os }}-gradlewrapper- 140 | - name: Publish candidate 141 | if: | 142 | startsWith(github.ref, 'refs/tags/v') && 143 | contains(github.ref, '-rc.') 144 | run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate 145 | - name: Publish release 146 | if: | 147 | startsWith(github.ref, 'refs/tags/v') && 148 | (!contains(github.ref, '-rc.')) 149 | run: ./gradlew --info --stacktrace -Dgradle.publish.key=${{ secrets.gradlePublishKey }} -Dgradle.publish.secret=${{ secrets.gradlePublishSecret }} -Prelease.useLastTag=true final 150 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | generated/ 3 | .DS_Store 4 | out/ 5 | .gradle 6 | .idea 7 | *.ipr 8 | *.iml 9 | *.iws 10 | travis_wait_* 11 | -------------------------------------------------------------------------------- /.java-version: -------------------------------------------------------------------------------- 1 | 1.8 -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Nebula 2 | 3 | If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request. When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. 4 | 5 | ## License 6 | 7 | By contributing your code, you agree to license your contribution under the terms of the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0). Your contributions should also include the following header: 8 | 9 | ``` 10 | /** 11 | * Copyright 2015 the original author or authors. 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | ``` 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Gradle Resolution Rules 2 | ======= 3 | 4 | ![Support Status](https://img.shields.io/badge/nebula-active-green.svg) 5 | [![Maven Central](https://img.shields.io/maven-central/v/com.netflix.nebula/gradle-resolution-rules)](https://maven-badges.herokuapp.com/maven-central/com.netflix.nebula/gradle-resolution-rules) 6 | ![Build](https://github.com/nebula-plugins/gradle-resolution-rules/actions/workflows/nebula.yml/badge.svg) 7 | [![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-resolution-rules.svg)](http://www.apache.org/licenses/LICENSE-2.0) 8 | 9 | 10 | Rules for the [Gradle Resolution Rules plugin](https://github.com/nebula-plugins/gradle-resolution-rules-plugin). 11 | 12 | This project includes rules for libraries available in Maven Central. 13 | 14 | # Using the rules 15 | 16 | Add a dependency on this project to apply the rules to the project: 17 | 18 | dependencies { 19 | resolutionRules 'com.netflix.nebula:gradle-resolution-rules:latest.release' 20 | } 21 | 22 | The artifact is available on Maven Central. 23 | 24 | # Included rules 25 | 26 | Refer to the JSON files in `src/main/resources` for details of the included rules. Optional rules are documented below. 27 | 28 | # Optional rules 29 | 30 | Optional rules can be enabled by adding the name of the rule set to the list of `optional` rules: 31 | 32 | nebulaResolutionRules { 33 | optional = ['slf4j-bridge'] 34 | } 35 | 36 | | Rule Set Name | Description | 37 | | ------------- |:-------------:| 38 | | `slf4j-bridge` | Replaces concrete logging implementations with SLF4J bridges | 39 | | `spring-boot-log4j2` | Excludes concrete logging implementations that conflict with the Spring Boot Log4J starter | 40 | 41 | # Contributing Rules 42 | 43 | Contributions are more than welcome, however please keep these guidelines in mind when submitting a pull request: 44 | 45 | - Default rules are intended to offer _correctness_. For example, a rule that tells Gradle that Google Collections was replaced by Guava provides correctness, as it causes those libraries with overlapping classes to conflict resolve 46 | - Optional rules are intended for rules that might cause problems due to edge cases, or provide a useful opinion. For instance, replacing Log4J with the SLF4J bridge is an opinion, but useful and correct when using SLF4J 47 | - Opinions that prefer one library over another, when it's not a compatible replacement (see 'correctness' above) are not suitable rules for this project 48 | - Rules should be for libraries in commonly used, public repositories, that have broad use. For esoteric use cases, we recommend publishing your own rules using the [Producing rules](https://github.com/nebula-plugins/gradle-resolution-rules-plugin#producing-rules) instructions. 49 | 50 | LICENSE 51 | ======= 52 | 53 | Copyright 2016 Netflix, Inc. 54 | 55 | Licensed under the Apache License, Version 2.0 (the "License"); 56 | you may not use this file except in compliance with the License. 57 | You may obtain a copy of the License at 58 | 59 | 60 | 61 | Unless required by applicable law or agreed to in writing, software 62 | distributed under the License is distributed on an "AS IS" BASIS, 63 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 64 | See the License for the specific language governing permissions and 65 | limitations under the License. 66 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2019 Netflix, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | plugins { 18 | id 'com.netflix.nebula.plugin-plugin' version '21.2.2' 19 | id 'com.netflix.nebula.integtest' version "10.1.2" 20 | } 21 | 22 | description 'Rules for the Resolution Rules plugin' 23 | 24 | contacts { 25 | 'nebula-plugins-oss@netflix.com' { 26 | moniker 'Nebula Plugins Maintainers' 27 | github 'nebula-plugins' 28 | } 29 | } 30 | 31 | repositories { 32 | maven { url 'https://jitpack.io' } 33 | } 34 | 35 | dependencies { 36 | testImplementation 'com.netflix.nebula:gradle-resolution-rules-plugin:latest.release' 37 | testImplementation 'com.netflix.nebula:nebula-test:latest.release' 38 | 39 | testImplementation 'org.apache.maven.indexer:indexer-core:6.0.0' 40 | testImplementation 'org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.3' 41 | testImplementation 'org.sonatype.sisu:sisu-guice:3.2.6' 42 | testImplementation 'org.apache.maven.wagon:wagon-http:2.10' 43 | testImplementation 'org.apache.lucene:lucene-core:5.5.4' 44 | testImplementation 'org.apache.lucene:lucene-queryparser:5.5.4' 45 | testImplementation 'org.apache.lucene:lucene-analyzers-common:5.5.4' 46 | testImplementation 'org.apache.lucene:lucene-highlighter:5.5.4' 47 | testImplementation 'org.apache.lucene:lucene-backward-codecs:5.5.4' 48 | 49 | testImplementation 'com.github.everit-org.json-schema:org.everit.json.schema:1.8.0' 50 | } 51 | 52 | publishPlugins.enabled = false 53 | -------------------------------------------------------------------------------- /gradle.lockfile: -------------------------------------------------------------------------------- 1 | # This is a Gradle generated file for dependency locking. 2 | # Manual edits can break the build and are not advised. 3 | # This file is expected to be part of source control. 4 | aopalliance:aopalliance:1.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 5 | cglib:cglib-nodep:3.2.2=integTestRuntimeClasspath,testRuntimeClasspath 6 | com.damnhandy:handy-uri-templates:2.1.6=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 7 | com.fasterxml.jackson.core:jackson-annotations:2.9.10=integTestRuntimeClasspath,testRuntimeClasspath 8 | com.fasterxml.jackson.core:jackson-core:2.9.10=integTestRuntimeClasspath,testRuntimeClasspath 9 | com.fasterxml.jackson.core:jackson-databind:2.9.10=integTestRuntimeClasspath,testRuntimeClasspath 10 | com.fasterxml.jackson.module:jackson-module-kotlin:2.9.10=integTestRuntimeClasspath,testRuntimeClasspath 11 | com.github.everit-org.json-schema:org.everit.json.schema:1.8.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 12 | com.google.code.findbugs:jsr305:3.0.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 13 | com.google.errorprone:error_prone_annotations:2.0.18=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 14 | com.google.guava:guava:22.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 15 | com.google.inject:guice:4.1.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 16 | com.google.j2objc:j2objc-annotations:1.1=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 17 | com.google.re2j:re2j:1.1=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 18 | com.netflix.nebula:gradle-resolution-rules-plugin:11.4.1=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 19 | com.netflix.nebula:nebula-dependency-recommender:12.5.1=integTestRuntimeClasspath,testRuntimeClasspath 20 | com.netflix.nebula:nebula-gradle-interop:2.3.0=integTestRuntimeClasspath,testRuntimeClasspath 21 | com.netflix.nebula:nebula-test:10.6.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 22 | commons-beanutils:commons-beanutils:1.9.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 23 | commons-codec:commons-codec:1.6=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 24 | commons-collections:commons-collections:3.2.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 25 | commons-digester:commons-digester:1.8.1=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 26 | commons-io:commons-io:2.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 27 | commons-lang:commons-lang:2.6=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 28 | commons-logging:commons-logging:1.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 29 | commons-validator:commons-validator:1.6=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 30 | javax.annotation:javax.annotation-api:1.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 31 | javax.annotation:jsr250-api:1.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 32 | javax.enterprise:cdi-api:1.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 33 | javax.inject:javax.inject:1=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 34 | joda-time:joda-time:2.9.4=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 35 | junit:junit:4.13.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 36 | org.apache.commons:commons-lang3:3.5=integTestCompileClasspath,testCompileClasspath 37 | org.apache.commons:commons-lang3:3.8.1=integTestRuntimeClasspath,testRuntimeClasspath 38 | org.apache.httpcomponents:httpclient:4.3.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 39 | org.apache.httpcomponents:httpcore:4.3.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 40 | org.apache.lucene:lucene-analyzers-common:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 41 | org.apache.lucene:lucene-backward-codecs:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 42 | org.apache.lucene:lucene-core:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 43 | org.apache.lucene:lucene-highlighter:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 44 | org.apache.lucene:lucene-join:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 45 | org.apache.lucene:lucene-memory:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 46 | org.apache.lucene:lucene-queries:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 47 | org.apache.lucene:lucene-queryparser:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 48 | org.apache.lucene:lucene-sandbox:5.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 49 | org.apache.maven.indexer:indexer-core:6.0.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 50 | org.apache.maven.resolver:maven-resolver-api:1.1.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 51 | org.apache.maven.resolver:maven-resolver-util:1.1.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 52 | org.apache.maven.wagon:wagon-http-shared:2.10=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 53 | org.apache.maven.wagon:wagon-http:2.10=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 54 | org.apache.maven.wagon:wagon-provider-api:2.10=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 55 | org.apache.maven:maven-artifact:3.8.3=integTestRuntimeClasspath,testRuntimeClasspath 56 | org.apache.maven:maven-builder-support:3.8.3=integTestRuntimeClasspath,testRuntimeClasspath 57 | org.apache.maven:maven-model-builder:3.8.3=integTestRuntimeClasspath,testRuntimeClasspath 58 | org.apache.maven:maven-model:3.5.2=integTestCompileClasspath,testCompileClasspath 59 | org.apache.maven:maven-model:3.8.3=integTestRuntimeClasspath,testRuntimeClasspath 60 | org.apiguardian:apiguardian-api:1.1.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 61 | org.codehaus.groovy:groovy:3.0.12=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 62 | org.codehaus.mojo:animal-sniffer-annotations:1.14=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 63 | org.codehaus.plexus:plexus-classworlds:2.5.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 64 | org.codehaus.plexus:plexus-component-annotations:1.5.5=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 65 | org.codehaus.plexus:plexus-interpolation:1.26=integTestRuntimeClasspath,testRuntimeClasspath 66 | org.codehaus.plexus:plexus-utils:3.1.0=integTestCompileClasspath,testCompileClasspath 67 | org.codehaus.plexus:plexus-utils:3.3.0=integTestRuntimeClasspath,testRuntimeClasspath 68 | org.eclipse.sisu:org.eclipse.sisu.inject:0.3.3=integTestCompileClasspath,testCompileClasspath 69 | org.eclipse.sisu:org.eclipse.sisu.inject:0.3.5=integTestRuntimeClasspath,testRuntimeClasspath 70 | org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.3=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 71 | org.hamcrest:hamcrest-core:1.3=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 72 | org.hamcrest:hamcrest:2.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 73 | org.jetbrains.kotlin:kotlin-reflect:2.1.0=integTestRuntimeClasspath,testRuntimeClasspath 74 | org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.0=integTestRuntimeClasspath,testRuntimeClasspath 75 | org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.0=integTestRuntimeClasspath,testRuntimeClasspath 76 | org.jetbrains.kotlin:kotlin-stdlib:2.1.0=integTestRuntimeClasspath,testRuntimeClasspath 77 | org.jetbrains:annotations:13.0=integTestRuntimeClasspath,testRuntimeClasspath 78 | org.json:json:20180130=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 79 | org.jsoup:jsoup:1.7.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 80 | org.junit.platform:junit-platform-commons:1.9.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 81 | org.junit.platform:junit-platform-engine:1.9.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 82 | org.objenesis:objenesis:2.4=integTestRuntimeClasspath,testRuntimeClasspath 83 | org.opentest4j:opentest4j:1.2.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 84 | org.slf4j:slf4j-api:1.7.25=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 85 | org.sonatype.sisu:sisu-guice:3.2.6=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 86 | org.spockframework:spock-core:2.3-groovy-3.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 87 | org.spockframework:spock-junit4:2.3-groovy-3.0=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath 88 | empty=annotationProcessor,compileClasspath,integTestAnnotationProcessor,runtimeClasspath,testAnnotationProcessor 89 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | systemProp.nebula.features.coreLockingSupport=true 2 | -------------------------------------------------------------------------------- /gradle/gradle-daemon-jvm.properties: -------------------------------------------------------------------------------- 1 | toolchainVersion=21 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nebula-plugins/gradle-resolution-rules/7b04ec94c7c8d67dbf5a3344a70b166f6e5dc0d7/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionSha256Sum=7197a12f450794931532469d4ff21a59ea2c1cd59a3ec3f89c035c3c420a6999 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip 5 | networkTimeout=10000 6 | validateDistributionUrl=true 7 | zipStoreBase=GRADLE_USER_HOME 8 | zipStorePath=wrapper/dists 9 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | # 20 | 21 | ############################################################################## 22 | # 23 | # Gradle start up script for POSIX generated by Gradle. 24 | # 25 | # Important for running: 26 | # 27 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 28 | # noncompliant, but you have some other compliant shell such as ksh or 29 | # bash, then to run this script, type that shell name before the whole 30 | # command line, like: 31 | # 32 | # ksh Gradle 33 | # 34 | # Busybox and similar reduced shells will NOT work, because this script 35 | # requires all of these POSIX shell features: 36 | # * functions; 37 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 38 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 39 | # * compound commands having a testable exit status, especially «case»; 40 | # * various built-in commands including «command», «set», and «ulimit». 41 | # 42 | # Important for patching: 43 | # 44 | # (2) This script targets any POSIX shell, so it avoids extensions provided 45 | # by Bash, Ksh, etc; in particular arrays are avoided. 46 | # 47 | # The "traditional" practice of packing multiple parameters into a 48 | # space-separated string is a well documented source of bugs and security 49 | # problems, so this is (mostly) avoided, by progressively accumulating 50 | # options in "$@", and eventually passing that to Java. 51 | # 52 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 53 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 54 | # see the in-line comments for details. 55 | # 56 | # There are tweaks for specific operating systems such as AIX, CygWin, 57 | # Darwin, MinGW, and NonStop. 58 | # 59 | # (3) This script is generated from the Groovy template 60 | # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 61 | # within the Gradle project. 62 | # 63 | # You can find Gradle at https://github.com/gradle/gradle/. 64 | # 65 | ############################################################################## 66 | 67 | # Attempt to set APP_HOME 68 | 69 | # Resolve links: $0 may be a link 70 | app_path=$0 71 | 72 | # Need this for daisy-chained symlinks. 73 | while 74 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 75 | [ -h "$app_path" ] 76 | do 77 | ls=$( ls -ld "$app_path" ) 78 | link=${ls#*' -> '} 79 | case $link in #( 80 | /*) app_path=$link ;; #( 81 | *) app_path=$APP_HOME$link ;; 82 | esac 83 | done 84 | 85 | # This is normally unused 86 | # shellcheck disable=SC2034 87 | APP_BASE_NAME=${0##*/} 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH="\\\"\\\"" 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | if ! command -v java >/dev/null 2>&1 137 | then 138 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 139 | 140 | Please set the JAVA_HOME variable in your environment to match the 141 | location of your Java installation." 142 | fi 143 | fi 144 | 145 | # Increase the maximum file descriptors if we can. 146 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 147 | case $MAX_FD in #( 148 | max*) 149 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 150 | # shellcheck disable=SC2039,SC3045 151 | MAX_FD=$( ulimit -H -n ) || 152 | warn "Could not query maximum file descriptor limit" 153 | esac 154 | case $MAX_FD in #( 155 | '' | soft) :;; #( 156 | *) 157 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 158 | # shellcheck disable=SC2039,SC3045 159 | ulimit -n "$MAX_FD" || 160 | warn "Could not set maximum file descriptor limit to $MAX_FD" 161 | esac 162 | fi 163 | 164 | # Collect all arguments for the java command, stacking in reverse order: 165 | # * args from the command line 166 | # * the main class name 167 | # * -classpath 168 | # * -D...appname settings 169 | # * --module-path (only if needed) 170 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 171 | 172 | # For Cygwin or MSYS, switch paths to Windows format before running java 173 | if "$cygwin" || "$msys" ; then 174 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 175 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 176 | 177 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 178 | 179 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 180 | for arg do 181 | if 182 | case $arg in #( 183 | -*) false ;; # don't mess with options #( 184 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 185 | [ -e "$t" ] ;; #( 186 | *) false ;; 187 | esac 188 | then 189 | arg=$( cygpath --path --ignore --mixed "$arg" ) 190 | fi 191 | # Roll the args list around exactly as many times as the number of 192 | # args, so each arg winds up back in the position where it started, but 193 | # possibly modified. 194 | # 195 | # NB: a `for` loop captures its iteration list before it begins, so 196 | # changing the positional parameters here affects neither the number of 197 | # iterations, nor the values presented in `arg`. 198 | shift # remove old arg 199 | set -- "$@" "$arg" # push replacement arg 200 | done 201 | fi 202 | 203 | 204 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 205 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 206 | 207 | # Collect all arguments for the java command: 208 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 209 | # and any embedded shellness will be escaped. 210 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 211 | # treated as '${Hostname}' itself on the command line. 212 | 213 | set -- \ 214 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 215 | -classpath "$CLASSPATH" \ 216 | -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ 217 | "$@" 218 | 219 | # Stop when "xargs" is not available. 220 | if ! command -v xargs >/dev/null 2>&1 221 | then 222 | die "xargs is not available" 223 | fi 224 | 225 | # Use "xargs" to parse quoted args. 226 | # 227 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 228 | # 229 | # In Bash we could simply go: 230 | # 231 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 232 | # set -- "${ARGS[@]}" "$@" 233 | # 234 | # but POSIX shell has neither arrays nor command substitution, so instead we 235 | # post-process each arg (as a line of input to sed) to backslash-escape any 236 | # character that might be a shell metacharacter, then use eval to reverse 237 | # that process (while maintaining the separation between arguments), and wrap 238 | # the whole thing up as a single "set" statement. 239 | # 240 | # This will of course break if any of these variables contains a newline or 241 | # an unmatched quote. 242 | # 243 | 244 | eval "set -- $( 245 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 246 | xargs -n1 | 247 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 248 | tr '\n' ' ' 249 | )" '"$@"' 250 | 251 | exec "$JAVACMD" "$@" 252 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH= 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.gradle.develocity' version '3.19' 3 | } 4 | 5 | develocity { 6 | buildScan { 7 | termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use" 8 | termsOfUseAgree = 'yes' 9 | } 10 | } 11 | 12 | rootProject.name = 'gradle-resolution-rules' 13 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/AbstractRulesSpec.groovy: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Copyright 2019 Netflix, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package nebula.plugin.resolutionrules 20 | 21 | import nebula.test.IntegrationTestKitSpec 22 | 23 | class AbstractRulesSpec extends IntegrationTestKitSpec { 24 | def setup() { 25 | buildFile << """\ 26 | buildscript { 27 | repositories { 28 | maven { 29 | url "https://plugins.gradle.org/m2/" 30 | } 31 | } 32 | dependencies { 33 | classpath "com.netflix.nebula:gradle-resolution-rules-plugin:latest.release" 34 | } 35 | } 36 | apply plugin: 'nebula.resolution-rules' 37 | apply plugin: 'java' 38 | repositories { 39 | mavenCentral() 40 | } 41 | """.stripIndent() 42 | keepFiles = true 43 | debug = true 44 | definePluginOutsideOfPluginBlock = true 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/AlignApacheKafkaIntegrationSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class AlignApacheKafkaIntegrationSpec extends RulesBaseSpecification { 6 | def setup() { 7 | def resolutionRulesFile = getClass().getClassLoader().getResource('align-apache-kafka.json') 8 | buildFile << """ 9 | dependencies { 10 | resolutionRules files('$resolutionRulesFile') 11 | } 12 | """ 13 | } 14 | 15 | def 'can align apache kafka libraries'() { 16 | given: 17 | buildFile << """ 18 | dependencies { 19 | implementation 'org.apache.kafka:connect-runtime:2.0.0' 20 | implementation 'org.apache.kafka:kafka-clients:3.0.0' 21 | implementation 'org.apache.kafka:kafka-streams:1.0.0' 22 | } 23 | """.stripIndent() 24 | 25 | when: 26 | BuildResult result = runWithArgumentsSuccessfully('dI', '--dependency', 'kafka') 27 | 28 | then: 29 | result.output.contains('By constraint: belongs to platform aligned-platform:align-apache-kafka-0-for-org.apache.kafka:3.0.0') 30 | result.output.contains('org.apache.kafka:connect-runtime:2.0.0 -> 3.0.0') 31 | result.output.contains('org.apache.kafka:kafka-clients:3.0.0') 32 | result.output.contains('org.apache.kafka:kafka-streams:1.0.0 -> 3.0.0') 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/AlignAwsSdkJavaV2Spec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class AlignAwsSdkJavaV2Spec extends RulesBaseSpecification { 6 | 7 | def setup() { 8 | def resolutionRulesFile = getClass().getClassLoader().getResource('align-aws-sdk-java-v2.json') 9 | buildFile << """ 10 | dependencies { 11 | resolutionRules files('$resolutionRulesFile') 12 | } 13 | """.stripIndent() 14 | } 15 | 16 | def 'can align software.amazon.awssdk libraries'() { 17 | given: 18 | buildFile << """\ 19 | dependencies { 20 | implementation 'software.amazon.awssdk:aws-core:2.22.0' 21 | implementation 'software.amazon.awssdk:ec2:2.23.9' 22 | implementation 'software.amazon.awssdk:sqs:2.20.136' 23 | } 24 | """.stripIndent() 25 | 26 | when: 27 | BuildResult result = runWithArgumentsSuccessfully('dI', '--dependency', 'software.amazon.awssdk') 28 | 29 | then: 30 | result.output.contains('By constraint: belongs to platform aligned-platform:align-aws-sdk-java-v2-0-for-software.amazon.awssdk:2.23.9') 31 | def alignedVersion = "2.23.9" 32 | // aligned 33 | result.output.contains("software.amazon.awssdk:aws-core:$alignedVersion\n") 34 | result.output.contains("software.amazon.awssdk:ec2:$alignedVersion\n") 35 | result.output.contains("software.amazon.awssdk:sqs:$alignedVersion\n") 36 | !result.output.contains('FAILED') 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/AlignConfluentKafkaIntegrationSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class AlignConfluentKafkaIntegrationSpec extends RulesBaseSpecification { 6 | def setup() { 7 | def resolutionRulesFile = getClass().getClassLoader().getResource('align-confluent-kafka.json') 8 | buildFile << """ 9 | dependencies { 10 | resolutionRules files('$resolutionRulesFile') 11 | } 12 | """ 13 | } 14 | 15 | def 'can align confluent kafka libraries'() { 16 | given: 17 | buildFile << """ 18 | dependencies { 19 | implementation 'io.confluent:kafka-connect-avro-converter:6.0.0' 20 | implementation 'io.confluent:kafka-streams-avro-serde:7.0.0' 21 | } 22 | 23 | repositories { 24 | maven { 25 | url 'https://packages.confluent.io/maven/' 26 | } 27 | } 28 | """.stripIndent() 29 | 30 | when: 31 | BuildResult result = runWithArgumentsSuccessfully('dI', '--dependency', 'kafka') 32 | 33 | then: 34 | result.output.contains('By constraint: belongs to platform aligned-platform:align-confluent-kafka-0-for-io.confluent:7.0.0') 35 | result.output.contains('io.confluent:kafka-connect-avro-converter:6.0.0 -> 7.0.0') 36 | result.output.contains('io.confluent:kafka-streams-avro-serde:7.0.0') 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/AlignSpockframeworkSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class AlignSpockframeworkSpec extends RulesBaseSpecification { 6 | 7 | def setup() { 8 | def resolutionRulesFile = getClass().getClassLoader().getResource('align-spockframework.json') 9 | buildFile << """ 10 | dependencies { 11 | resolutionRules files('$resolutionRulesFile') 12 | } 13 | """.stripIndent() 14 | } 15 | 16 | def 'can align org.spockframework libraries'() { 17 | given: 18 | buildFile << """\ 19 | dependencies { 20 | implementation 'org.spockframework:spock-core:2.0-groovy-3.0' 21 | implementation 'org.spockframework:spock-guice:1.3-groovy-2.5' 22 | implementation 'org.spockframework:spock-junit4:2.0-groovy-2.5' 23 | implementation 'org.spockframework:spock-spring:1.3-groovy-2.5' 24 | implementation 'org.spockframework:spock-tapestry:1.3-groovy-2.5' 25 | implementation 'org.spockframework:spock-unitils:1.3-groovy-2.5' 26 | 27 | implementation 'org.spockframework:spock-groovy2-compat:2.0-groovy-2.5' 28 | implementation 'org.spockframework:spock-grails-support:0.7-groovy-2.0' 29 | implementation 'org.spockframework:spock-maven:0.7-groovy-2.0' 30 | } 31 | """.stripIndent() 32 | 33 | when: 34 | BuildResult result = runWithArgumentsSuccessfully('dI', '--dependency', 'org.spockframework') 35 | 36 | then: 37 | result.output.contains('By constraint: belongs to platform aligned-platform:align-spockframework-0-for-org.spockframework:2.0-groovy-3.0') 38 | def alignedVersion = "2.0-groovy-3.0" 39 | // aligned 40 | result.output.contains("org.spockframework:spock-core:$alignedVersion\n") 41 | result.output.contains("org.spockframework:spock-guice:$alignedVersion\n") 42 | result.output.contains("org.spockframework:spock-spring:$alignedVersion\n") 43 | result.output.contains("org.spockframework:spock-junit4:$alignedVersion\n") 44 | result.output.contains("org.spockframework:spock-tapestry:$alignedVersion\n") 45 | result.output.contains("org.spockframework:spock-unitils:$alignedVersion\n") 46 | !result.output.contains('FAILED') 47 | 48 | // not aligned 49 | result.output.contains('org.spockframework:spock-groovy2-compat:2.0-groovy-2.5\n') 50 | result.output.contains('org.spockframework:spock-grails-support:0.7-groovy-2.0\n') 51 | result.output.contains('org.spockframework:spock-maven:0.7-groovy-2.0\n') 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/AlignSpringFrameworkIntegrationSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class AlignSpringFrameworkIntegrationSpec extends RulesBaseSpecification { 6 | 7 | def setup() { 8 | def resolutionRulesFile = getClass().getClassLoader().getResource('align-spring.json') 9 | buildFile << """ 10 | dependencies { 11 | resolutionRules files('$resolutionRulesFile') 12 | } 13 | """.stripIndent() 14 | } 15 | 16 | def 'can align spring libraries'() { 17 | given: 18 | buildFile << """\ 19 | dependencies { 20 | implementation ('org.springframework:spring-context:5.3.21') { transitive = false } 21 | implementation ('org.springframework:spring-orm:5.2.11.RELEASE') { transitive = false } 22 | } 23 | """.stripIndent() 24 | 25 | when: 26 | BuildResult result = runWithArgumentsSuccessfully('dI', '--dependency', 'spring') 27 | 28 | then: 29 | result.output.contains('By constraint: belongs to platform aligned-platform:align-spring-0-for-org.springframework:5.3.21') 30 | result.output.contains('org.springframework:spring-orm:5.2.11.RELEASE -> 5.3.21') 31 | result.output.contains('org.springframework:spring-context:5.3.21') 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/AlignSpringKafkaIntegrationSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class AlignSpringKafkaIntegrationSpec extends RulesBaseSpecification { 6 | 7 | def setup() { 8 | def resolutionRulesFile = getClass().getClassLoader().getResource('align-spring-kafka.json') 9 | buildFile << """ 10 | dependencies { 11 | resolutionRules files('$resolutionRulesFile') 12 | } 13 | """.stripIndent() 14 | } 15 | 16 | def 'can align spring kafka libraries'() { 17 | given: 18 | buildFile << """\ 19 | dependencies { 20 | implementation 'org.springframework.kafka:spring-kafka:2.6.3' 21 | implementation 'org.springframework.kafka:spring-kafka-test:2.6.1' 22 | } 23 | """.stripIndent() 24 | 25 | when: 26 | BuildResult result = runWithArgumentsSuccessfully('dI', '--dependency', 'spring-kafka') 27 | 28 | then: 29 | result.output.contains('By constraint: belongs to platform aligned-platform:align-spring-kafka-0-for-org.springframework.kafka:2.6.3') 30 | result.output.contains('org.springframework.kafka:spring-kafka-test:2.6.1 -> 2.6.3') 31 | result.output.contains('org.springframework.kafka:spring-kafka:2.6.3') 32 | } 33 | 34 | def 'can align spring kafka libraries with RELEASE in version'() { 35 | given: 36 | buildFile << """\ 37 | dependencies { 38 | implementation 'org.springframework.kafka:spring-kafka:2.5.9.RELEASE' 39 | implementation 'org.springframework.kafka:spring-kafka-test:2.5.7.RELEASE' 40 | } 41 | """.stripIndent() 42 | 43 | when: 44 | BuildResult result = runWithArgumentsSuccessfully('dI', '--dependency', 'spring-kafka') 45 | 46 | then: 47 | result.output.contains('By constraint: belongs to platform aligned-platform:align-spring-kafka-0-for-org.springframework.kafka:2.5.9.RELEASE') 48 | result.output.contains('org.springframework.kafka:spring-kafka-test:2.5.7.RELEASE -> 2.5.9.RELEASE') 49 | result.output.contains('org.springframework.kafka:spring-kafka:2.5.9.RELEASE') 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/CodehausJacksonSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class CodehausJacksonSpec extends RulesBaseSpecification { 6 | def setup() { 7 | def ruleFile = new File(getClass().getResource('/codehaus-jackson.json').toURI()) 8 | buildFile << """\ 9 | dependencies { 10 | resolutionRules files('${ruleFile.absolutePath}') 11 | } 12 | """.stripIndent() 13 | } 14 | 15 | def 'duplicates are replaced and aligned'() { 16 | given: 17 | buildFile << """\ 18 | dependencies { 19 | implementation "org.codehaus.jackson:jackson-core-lgpl:1.9.13" 20 | implementation "org.codehaus.jackson:jackson-core-asl:1.9.13" 21 | implementation "org.codehaus.jackson:jackson-mapper-asl:1.9.12" 22 | } 23 | """.stripIndent() 24 | 25 | when: 26 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 27 | 28 | then: 29 | result.output.contains "org.codehaus.jackson:jackson-core-lgpl:1.9.13 -> org.codehaus.jackson:jackson-core-asl:1.9.13" 30 | result.output.contains "org.codehaus.jackson:jackson-mapper-asl:1.9.12 -> 1.9.13" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/GroovyIntegrationSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class GroovyIntegrationSpec extends RulesBaseSpecification { 6 | def setup() { 7 | buildFile << """\ 8 | dependencies { 9 | resolutionRules files('${new File('src/main/resources/align-groovy.json').absolutePath}', '${new File('src/main/resources/align-apache-groovy.json').absolutePath}', '${new File('src/main/resources/replace-groovy.json').absolutePath}') 10 | } 11 | """.stripIndent() 12 | } 13 | 14 | def 'check replacement works'() { 15 | buildFile << '''\ 16 | dependencies { 17 | implementation 'org.codehaus.groovy:groovy:3.0.22' 18 | implementation 'org.codehaus.groovy:groovy-all:3.0.22' 19 | implementation 'org.codehaus.groovy:groovy-ant:3.0.22' 20 | implementation 'org.codehaus.groovy:groovy-astbuilder:3.0.22' 21 | implementation 'org.codehaus.groovy:groovy-backports-compat23:3.0.22' 22 | implementation 'org.codehaus.groovy:groovy-binary:3.0.22' 23 | implementation 'org.codehaus.groovy:groovy-bom:3.0.22' 24 | implementation 'org.codehaus.groovy:groovy-bsf:3.0.22' 25 | implementation 'org.codehaus.groovy:groovy-cli-commons:3.0.22' 26 | implementation 'org.codehaus.groovy:groovy-cli-picocli:3.0.22' 27 | implementation 'org.codehaus.groovy:groovy-console:3.0.22' 28 | implementation 'org.codehaus.groovy:groovy-contracts:3.0.22' 29 | implementation 'org.codehaus.groovy:groovy-datetime:3.0.22' 30 | implementation 'org.codehaus.groovy:groovy-dateutil:3.0.22' 31 | implementation 'org.codehaus.groovy:groovy-docgenerator:3.0.22' 32 | implementation 'org.codehaus.groovy:groovy-ginq:3.0.22' 33 | implementation 'org.codehaus.groovy:groovy-groovydoc:3.0.22' 34 | implementation 'org.codehaus.groovy:groovy-groovysh:3.0.22' 35 | implementation 'org.codehaus.groovy:groovy-jaxb:3.0.22' 36 | implementation 'org.codehaus.groovy:groovy-jmx:3.0.22' 37 | implementation 'org.codehaus.groovy:groovy-json:3.0.22' 38 | implementation 'org.codehaus.groovy:groovy-jsr223:3.0.22' 39 | implementation 'org.codehaus.groovy:groovy-macro:3.0.22' 40 | implementation 'org.codehaus.groovy:groovy-macro-library:3.0.22' 41 | implementation 'org.codehaus.groovy:groovy-nio:3.0.22' 42 | implementation 'org.codehaus.groovy:groovy-servlet:3.0.22' 43 | implementation 'org.codehaus.groovy:groovy-sql:3.0.22' 44 | implementation 'org.codehaus.groovy:groovy-swing:3.0.22' 45 | implementation 'org.codehaus.groovy:groovy-templates:3.0.22' 46 | implementation 'org.codehaus.groovy:groovy-test:3.0.22' 47 | implementation 'org.codehaus.groovy:groovy-test-junit5:3.0.22' 48 | implementation 'org.codehaus.groovy:groovy-testng:3.0.22' 49 | implementation 'org.codehaus.groovy:groovy-toml:3.0.22' 50 | implementation 'org.codehaus.groovy:groovy-typecheckers:3.0.22' 51 | implementation 'org.codehaus.groovy:groovy-xml:3.0.22' 52 | implementation 'org.codehaus.groovy:groovy-yaml:3.0.22' 53 | 54 | implementation 'org.apache.groovy:groovy:4.0.0-alpha-1' 55 | implementation 'org.apache.groovy:groovy-all:4.0.0-alpha-1' 56 | implementation 'org.apache.groovy:groovy-ant:4.0.0-alpha-1' 57 | implementation 'org.apache.groovy:groovy-astbuilder:4.0.0-alpha-1' 58 | implementation 'org.apache.groovy:groovy-backports-compat23:4.0.0-alpha-1' 59 | implementation 'org.apache.groovy:groovy-binary:4.0.0-alpha-1' 60 | implementation 'org.apache.groovy:groovy-bom:4.0.0-alpha-1' 61 | implementation 'org.apache.groovy:groovy-bsf:4.0.0-alpha-1' 62 | implementation 'org.apache.groovy:groovy-cli-commons:4.0.0-alpha-1' 63 | implementation 'org.apache.groovy:groovy-cli-picocli:4.0.0-alpha-1' 64 | implementation 'org.apache.groovy:groovy-console:4.0.0-alpha-1' 65 | implementation 'org.apache.groovy:groovy-contracts:4.0.0-alpha-1' 66 | implementation 'org.apache.groovy:groovy-datetime:4.0.0-alpha-1' 67 | implementation 'org.apache.groovy:groovy-dateutil:4.0.0-alpha-1' 68 | implementation 'org.apache.groovy:groovy-docgenerator:4.0.0-alpha-1' 69 | implementation 'org.apache.groovy:groovy-ginq:4.0.0-alpha-1' 70 | implementation 'org.apache.groovy:groovy-groovydoc:4.0.0-alpha-1' 71 | implementation 'org.apache.groovy:groovy-groovysh:4.0.0-alpha-1' 72 | implementation 'org.apache.groovy:groovy-jaxb:4.0.0-alpha-1' 73 | implementation 'org.apache.groovy:groovy-jmx:4.0.0-alpha-1' 74 | implementation 'org.apache.groovy:groovy-json:4.0.0-alpha-1' 75 | implementation 'org.apache.groovy:groovy-jsr223:4.0.0-alpha-1' 76 | implementation 'org.apache.groovy:groovy-macro:4.0.0-alpha-1' 77 | implementation 'org.apache.groovy:groovy-macro-library:4.0.0-alpha-1' 78 | implementation 'org.apache.groovy:groovy-nio:4.0.0-alpha-1' 79 | implementation 'org.apache.groovy:groovy-servlet:4.0.0-alpha-1' 80 | implementation 'org.apache.groovy:groovy-sql:4.0.0-alpha-1' 81 | implementation 'org.apache.groovy:groovy-swing:4.0.0-alpha-1' 82 | implementation 'org.apache.groovy:groovy-templates:4.0.0-alpha-1' 83 | implementation 'org.apache.groovy:groovy-test:4.0.0-alpha-1' 84 | implementation 'org.apache.groovy:groovy-test-junit5:4.0.0-alpha-1' 85 | implementation 'org.apache.groovy:groovy-testng:4.0.0-alpha-1' 86 | implementation 'org.apache.groovy:groovy-toml:4.0.0-alpha-1' 87 | implementation 'org.apache.groovy:groovy-typecheckers:4.0.0-alpha-1' 88 | implementation 'org.apache.groovy:groovy-xml:4.0.0-alpha-1' 89 | implementation 'org.apache.groovy:groovy-yaml:4.0.0-alpha-1' 90 | } 91 | '''.stripIndent() 92 | 93 | when: 94 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 95 | 96 | then: 97 | result.output.contains('org.codehaus.groovy:groovy:3.0.22 -> org.apache.groovy:groovy:4.0.0-alpha-1') 98 | result.output.contains('org.codehaus.groovy:groovy-all:3.0.22 -> org.apache.groovy:groovy-all:4.0.0-alpha-1') 99 | result.output.contains('org.codehaus.groovy:groovy-ant:3.0.22 -> org.apache.groovy:groovy-ant:4.0.0-alpha-1') 100 | result.output.contains('org.codehaus.groovy:groovy-astbuilder:3.0.22 -> org.apache.groovy:groovy-astbuilder:4.0.0-alpha-1') 101 | result.output.contains('org.codehaus.groovy:groovy-backports-compat23:3.0.22 -> org.apache.groovy:groovy-backports-compat23:4.0.0-alpha-1') 102 | result.output.contains('org.codehaus.groovy:groovy-binary:3.0.22 -> org.apache.groovy:groovy-binary:4.0.0-alpha-1') 103 | result.output.contains('org.codehaus.groovy:groovy-bom:3.0.22 -> org.apache.groovy:groovy-bom:4.0.0-alpha-1') 104 | result.output.contains('org.codehaus.groovy:groovy-bsf:3.0.22 -> org.apache.groovy:groovy-bsf:4.0.0-alpha-1') 105 | result.output.contains('org.codehaus.groovy:groovy-cli-commons:3.0.22 -> org.apache.groovy:groovy-cli-commons:4.0.0-alpha-1') 106 | result.output.contains('org.codehaus.groovy:groovy-cli-picocli:3.0.22 -> org.apache.groovy:groovy-cli-picocli:4.0.0-alpha-1') 107 | result.output.contains('org.codehaus.groovy:groovy-console:3.0.22 -> org.apache.groovy:groovy-console:4.0.0-alpha-1') 108 | result.output.contains('org.codehaus.groovy:groovy-contracts:3.0.22 -> org.apache.groovy:groovy-contracts:4.0.0-alpha-1') 109 | result.output.contains('org.codehaus.groovy:groovy-datetime:3.0.22 -> org.apache.groovy:groovy-datetime:4.0.0-alpha-1') 110 | result.output.contains('org.codehaus.groovy:groovy-dateutil:3.0.22 -> org.apache.groovy:groovy-dateutil:4.0.0-alpha-1') 111 | result.output.contains('org.codehaus.groovy:groovy-docgenerator:3.0.22 -> org.apache.groovy:groovy-docgenerator:4.0.0-alpha-1') 112 | result.output.contains('org.codehaus.groovy:groovy-ginq:3.0.22 -> org.apache.groovy:groovy-ginq:4.0.0-alpha-1') 113 | result.output.contains('org.codehaus.groovy:groovy-groovydoc:3.0.22 -> org.apache.groovy:groovy-groovydoc:4.0.0-alpha-1') 114 | result.output.contains('org.codehaus.groovy:groovy-groovysh:3.0.22 -> org.apache.groovy:groovy-groovysh:4.0.0-alpha-1') 115 | result.output.contains('org.codehaus.groovy:groovy-jaxb:3.0.22 -> org.apache.groovy:groovy-jaxb:4.0.0-alpha-1') 116 | result.output.contains('org.codehaus.groovy:groovy-jmx:3.0.22 -> org.apache.groovy:groovy-jmx:4.0.0-alpha-1') 117 | result.output.contains('org.codehaus.groovy:groovy-json:3.0.22 -> org.apache.groovy:groovy-json:4.0.0-alpha-1') 118 | result.output.contains('org.codehaus.groovy:groovy-jsr223:3.0.22 -> org.apache.groovy:groovy-jsr223:4.0.0-alpha-1') 119 | result.output.contains('org.codehaus.groovy:groovy-macro:3.0.22 -> org.apache.groovy:groovy-macro:4.0.0-alpha-1') 120 | result.output.contains('org.codehaus.groovy:groovy-macro-library:3.0.22 -> org.apache.groovy:groovy-macro-library:4.0.0-alpha-1') 121 | result.output.contains('org.codehaus.groovy:groovy-nio:3.0.22 -> org.apache.groovy:groovy-nio:4.0.0-alpha-1') 122 | result.output.contains('org.codehaus.groovy:groovy-servlet:3.0.22 -> org.apache.groovy:groovy-servlet:4.0.0-alpha-1') 123 | result.output.contains('org.codehaus.groovy:groovy-sql:3.0.22 -> org.apache.groovy:groovy-sql:4.0.0-alpha-1') 124 | result.output.contains('org.codehaus.groovy:groovy-swing:3.0.22 -> org.apache.groovy:groovy-swing:4.0.0-alpha-1') 125 | result.output.contains('org.codehaus.groovy:groovy-templates:3.0.22 -> org.apache.groovy:groovy-templates:4.0.0-alpha-1') 126 | result.output.contains('org.codehaus.groovy:groovy-test:3.0.22 -> org.apache.groovy:groovy-test:4.0.0-alpha-1') 127 | result.output.contains('org.codehaus.groovy:groovy-test-junit5:3.0.22 -> org.apache.groovy:groovy-test-junit5:4.0.0-alpha-1') 128 | result.output.contains('org.codehaus.groovy:groovy-testng:3.0.22 -> org.apache.groovy:groovy-testng:4.0.0-alpha-1') 129 | result.output.contains('org.codehaus.groovy:groovy-toml:3.0.22 -> org.apache.groovy:groovy-toml:4.0.0-alpha-1') 130 | result.output.contains('org.codehaus.groovy:groovy-typecheckers:3.0.22 -> org.apache.groovy:groovy-typecheckers:4.0.0-alpha-1') 131 | result.output.contains('org.codehaus.groovy:groovy-xml:3.0.22 -> org.apache.groovy:groovy-xml:4.0.0-alpha-1') 132 | result.output.contains('org.codehaus.groovy:groovy-yaml:3.0.22 -> org.apache.groovy:groovy-yaml:4.0.0-alpha-1') 133 | } 134 | 135 | def 'check alignment works'() { 136 | buildFile << '''\ 137 | dependencies { 138 | implementation 'org.codehaus.groovy:groovy-toml:3.0.22' 139 | implementation 'org.apache.groovy:groovy:4.0.22' 140 | implementation 'org.apache.groovy:groovy-toml:4.0.0-alpha-1' 141 | } 142 | '''.stripIndent() 143 | 144 | when: 145 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 146 | 147 | then: 148 | result.output.contains('org.apache.groovy:groovy:4.0.22') 149 | result.output.contains('org.codehaus.groovy:groovy-toml:3.0.22 -> org.apache.groovy:groovy-toml:4.0.22') 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/ReplaceJavaxIntegrationSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class ReplaceJavaxIntegrationSpec extends RulesBaseSpecification { 6 | def setup() { 7 | buildFile << """\ 8 | dependencies { 9 | resolutionRules files('${new File('src/main/resources/replace-javax.json').absolutePath}') 10 | } 11 | """.stripIndent() 12 | } 13 | 14 | def 'check replacement works for jakarta.persistence-api'() { 15 | buildFile << '''\ 16 | dependencies { 17 | implementation 'javax.persistence:persistence-api:1.0' 18 | implementation 'javax.persistence:javax.persistence-api:2.2' 19 | implementation 'jakarta.persistence:jakarta.persistence-api:2.2.3' 20 | } 21 | '''.stripIndent() 22 | when: 23 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 24 | 25 | then: 26 | result.output.contains('javax.persistence:persistence-api:1.0 -> jakarta.persistence:jakarta.persistence-api:2.2.3') 27 | result.output.contains('javax.persistence:javax.persistence-api:2.2 -> jakarta.persistence:jakarta.persistence-api:2.2.3') 28 | result.output.contains('jakarta.persistence:jakarta.persistence-api:2.2.3') 29 | 30 | when: 31 | writeJavaSourceFile("""\ 32 | package test.nebula.netflix.hello; 33 | 34 | import javax.persistence.*; 35 | import java.util.List; 36 | 37 | @Entity 38 | @Table(name = "my_table") 39 | public class MyClass { 40 | 41 | @Id 42 | @GeneratedValue( 43 | generator = "id_seq", 44 | strategy = GenerationType.SEQUENCE) 45 | private long id; 46 | 47 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "output", orphanRemoval = true, fetch = FetchType.EAGER) 48 | private List others; 49 | 50 | } 51 | 52 | """.stripIndent(), 'src/main/java', projectDir) 53 | 54 | writeJavaSourceFile("""\ 55 | package test.nebula.netflix.hello; 56 | 57 | public class MyOtherClass { 58 | String something; 59 | } 60 | 61 | """.stripIndent(), 'src/main/java', projectDir) 62 | 63 | then: 64 | runWithArgumentsSuccessfully('compileJava') 65 | } 66 | 67 | def 'uses `javax.persistence:javax.persistence-api` if `jakarta.persistence:jakarta.persistence-api` is not present'() { 68 | buildFile << '''\ 69 | dependencies { 70 | implementation 'javax.persistence:javax.persistence-api:2.2' 71 | } 72 | '''.stripIndent() 73 | 74 | when: 75 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 76 | 77 | then: 78 | result.output.contains('javax.persistence:javax.persistence-api:2.2') 79 | !result.output.contains('jakarta.persistence:jakarta.persistence-api') 80 | } 81 | 82 | def 'uses `javax.persistence:persistence-api` if `jakarta.persistence:jakarta.persistence-api` is not present'() { 83 | buildFile << '''\ 84 | dependencies { 85 | implementation 'javax.persistence:persistence-api:1.0' 86 | } 87 | '''.stripIndent() 88 | 89 | when: 90 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 91 | 92 | then: 93 | result.output.contains('javax.persistence:persistence-api:1.0') 94 | !result.output.contains('jakarta.persistence:jakarta.persistence-api') 95 | } 96 | 97 | def 'check replacement works for javax.persistence-api'() { 98 | buildFile << '''\ 99 | dependencies { 100 | implementation 'javax.persistence:persistence-api:1.0' 101 | implementation 'jakarta.persistence:jakarta.persistence-api:2.2.3' 102 | } 103 | '''.stripIndent() 104 | when: 105 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 106 | 107 | then: 108 | result.output.contains('javax.persistence:persistence-api:1.0 -> jakarta.persistence:jakarta.persistence-api:2.2.3') 109 | result.output.contains('jakarta.persistence:jakarta.persistence-api:2.2.3') 110 | 111 | when: 112 | writeJavaSourceFile("""\ 113 | package test.nebula.netflix.hello; 114 | 115 | import javax.persistence.*; 116 | import java.util.List; 117 | 118 | @Entity 119 | @Table(name = "my_table") 120 | public class MyClass { 121 | 122 | @Id 123 | @GeneratedValue( 124 | generator = "id_seq", 125 | strategy = GenerationType.SEQUENCE) 126 | private long id; 127 | 128 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "output", orphanRemoval = true, fetch = FetchType.EAGER) 129 | private List others; 130 | 131 | } 132 | 133 | """.stripIndent(), 'src/main/java', projectDir) 134 | 135 | writeJavaSourceFile("""\ 136 | package test.nebula.netflix.hello; 137 | 138 | public class MyOtherClass { 139 | String something; 140 | } 141 | 142 | """.stripIndent(), 'src/main/java', projectDir) 143 | 144 | then: 145 | runWithArgumentsSuccessfully('compileJava') 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/ReplaceJpountzLz4Spec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | class ReplaceJpountzLz4Spec extends RulesBaseSpecification { 4 | def setup() { 5 | def ruleFile = new File(getClass().getResource('/replace-jpountz-lz4.json').toURI()) 6 | buildFile << """\ 7 | dependencies { 8 | resolutionRules files('${ruleFile.absolutePath}') 9 | } 10 | """.stripIndent() 11 | } 12 | 13 | def 'check replacement works'() { 14 | buildFile << '''\ 15 | dependencies { 16 | implementation 'net.jpountz.lz4:lz4:latest.release' 17 | implementation 'org.lz4:lz4-java:latest.release' 18 | } 19 | '''.stripIndent() 20 | 21 | when: 22 | def result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 23 | 24 | then: 25 | result.output.contains 'net.jpountz.lz4:lz4:latest.release -> org.lz4:lz4-java:' 26 | } 27 | 28 | def 'leaves net.jpountz.lz4 if org.lz4:lz4-java is not present'() { 29 | buildFile << '''\ 30 | dependencies { 31 | implementation 'net.jpountz.lz4:lz4:latest.release' 32 | } 33 | '''.stripIndent() 34 | 35 | when: 36 | def result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 37 | 38 | then: 39 | !result.output.contains('net.jpountz.lz4:lz4:latest.release -> org.lz4:lz4-java:') 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/RulesBaseSpecification.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import groovy.transform.CompileStatic 4 | import groovy.transform.TypeCheckingMode 5 | import org.gradle.testkit.runner.BuildResult 6 | import org.gradle.testkit.runner.GradleRunner 7 | import org.junit.rules.TestName 8 | import spock.lang.Specification 9 | 10 | 11 | abstract class RulesBaseSpecification extends Specification { 12 | @org.junit.Rule 13 | final TestName testName = new TestName() 14 | 15 | File projectDir 16 | File buildFile 17 | File settingsFile 18 | 19 | def setup() { 20 | projectDir = new File("build/nebulatest/${this.class.canonicalName}/${testName.methodName.replaceAll(/\W+/, '-')}").absoluteFile 21 | if (projectDir.exists()) { 22 | projectDir.deleteDir() 23 | } 24 | projectDir.mkdirs() 25 | 26 | buildFile = new File(projectDir, 'build.gradle') 27 | settingsFile = new File(projectDir, 'settings.gradle') 28 | settingsFile << '''\ 29 | '''.stripIndent() 30 | 31 | buildFile << '''\ 32 | buildscript { 33 | repositories { 34 | maven { 35 | url "https://plugins.gradle.org/m2/" 36 | } 37 | } 38 | dependencies { 39 | classpath "com.netflix.nebula:gradle-resolution-rules-plugin:latest.release" 40 | } 41 | } 42 | apply plugin: 'com.netflix.nebula.resolution-rules' 43 | apply plugin: 'java' 44 | 45 | repositories { 46 | mavenCentral() 47 | } 48 | '''.stripIndent() 49 | } 50 | 51 | BuildResult runWithArgumentsSuccessfully(String... args) { 52 | List finalArgs = args 53 | if(System.getenv("CI") && !finalArgs.contains('-g') && !finalArgs.contains('--gradle-user-home')) { 54 | String testWorkerNumber = System.getProperty('org.gradle.test.worker') 55 | String gradleHomeDir = System.getenv('WORKSPACE') ? "${System.getenv('WORKSPACE')}/.gradle-test-worker-$testWorkerNumber-home" : "${System.getProperty("user.home")}/.gradle-test-worker-$testWorkerNumber-home" 56 | finalArgs.add('-g') 57 | finalArgs.add(gradleHomeDir.toString()) 58 | } 59 | GradleRunner.create() 60 | .withProjectDir(projectDir) 61 | .withArguments(finalArgs) 62 | .build() 63 | } 64 | 65 | 66 | void writeJavaSourceFile(String source, File projectDir = getProjectDir()) { 67 | writeJavaSourceFile(source, 'src/main/java', projectDir) 68 | } 69 | 70 | void writeJavaSourceFile(String source, String sourceFolderPath, File projectDir = getProjectDir()) { 71 | File javaFile = createFile(sourceFolderPath + '/' + fullyQualifiedName(source).replaceAll(/\./, '/') + '.java', projectDir) 72 | javaFile.text = source 73 | } 74 | 75 | @CompileStatic(TypeCheckingMode.SKIP) 76 | File createFile(String path, File baseDir = getProjectDir()) { 77 | File file = file(path, baseDir) 78 | if (!file.exists()) { 79 | assert file.parentFile.mkdirs() || file.parentFile.exists() 80 | file.createNewFile() 81 | } 82 | file 83 | } 84 | 85 | File file(String path, File baseDir = getProjectDir()) { 86 | def splitted = path.split('/') 87 | def directory = splitted.size() > 1 ? directory(splitted[0..-2].join('/'), baseDir) : baseDir 88 | def file = new File(directory, splitted[-1]) 89 | file.createNewFile() 90 | file 91 | } 92 | 93 | 94 | File directory(String path, File baseDir = getProjectDir()) { 95 | new File(baseDir, path).with { 96 | mkdirs() 97 | it 98 | } 99 | } 100 | 101 | private String fullyQualifiedName(String sourceStr) { 102 | def pkgMatcher = sourceStr =~ /\s*package\s+([\w\.]+)/ 103 | def pkg = pkgMatcher.find() ? (pkgMatcher[0] as List)[1] + '.' : '' 104 | 105 | def classMatcher = sourceStr =~ /\s*(class|interface)\s+(\w+)/ 106 | return classMatcher.find() ? pkg + (classMatcher[0] as List)[2] : null 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/Slf4j1xOnlySpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | import spock.lang.Unroll 5 | 6 | class Slf4j1xOnlySpec extends RulesBaseSpecification { 7 | def setup() { 8 | def ruleFile = new File(getClass().getResource('/optional-slf4j1x-only.json').toURI()) 9 | buildFile << """\ 10 | dependencies { 11 | resolutionRules files('${ruleFile.absolutePath}') 12 | } 13 | 14 | nebulaResolutionRules { 15 | optional = ['slf4j1x-only'] 16 | } 17 | """.stripIndent() 18 | } 19 | 20 | @Unroll 21 | def 'downgrade slf4j: #version'() { 22 | given: 23 | buildFile << """\ 24 | dependencies { 25 | implementation "org.slf4j:slf4j-api:${version}" 26 | } 27 | """.stripIndent() 28 | 29 | when: 30 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 31 | 32 | then: 33 | result.output.contains "org.slf4j:slf4j-api:$version -> 1.7.36" 34 | 35 | where: 36 | version << ['2.0.0', '2.0.1'] 37 | } 38 | 39 | @Unroll 40 | def 'remove slf4j 2.x log4j implementation'() { 41 | given: 42 | buildFile << """\ 43 | dependencies { 44 | implementation "org.apache.logging.log4j:log4j-slf4j2-impl:2.19.0" 45 | implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.19.0" 46 | } 47 | """.stripIndent() 48 | 49 | when: 50 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 51 | 52 | then: 53 | result.output.contains "org.apache.logging.log4j:log4j-slf4j2-impl:2.19.0 -> org.apache.logging.log4j:log4j-slf4j-impl:2.19.0" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/SubstituteLog4J2Spec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | 5 | class SubstituteLog4J2Spec extends RulesBaseSpecification { 6 | def setup() { 7 | def ruleFile = new File(getClass().getResource('/substitute-log4j2.json').toURI()) 8 | buildFile << """\ 9 | dependencies { 10 | resolutionRules files('${ruleFile.absolutePath}') 11 | } 12 | """.stripIndent() 13 | } 14 | 15 | def 'substitute log4j version from #log4jVersion to 2.17.2'() { 16 | given: 17 | buildFile << """\ 18 | dependencies { 19 | implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}" 20 | } 21 | """.stripIndent() 22 | 23 | when: 24 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 25 | 26 | then: 27 | result.output.contains "org.apache.logging.log4j:log4j-core:${log4jVersion} -> 2.17.2" 28 | 29 | where: 30 | log4jVersion << [ 31 | '2.9.1', 32 | '2.10.0', 33 | '2.11.2', 34 | '2.12.1', 35 | '2.13.3', 36 | '2.14.1', 37 | '2.15.0', 38 | '2.16.0', 39 | '2.17.0', 40 | '2.17.1' 41 | ] 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/integTest/groovy/nebula/plugin/resolutionrules/SubstituteSnakeyamlSpec.groovy: -------------------------------------------------------------------------------- 1 | package nebula.plugin.resolutionrules 2 | 3 | import org.gradle.testkit.runner.BuildResult 4 | import spock.lang.Unroll 5 | 6 | class SubstituteSnakeyamlSpec extends RulesBaseSpecification { 7 | def setup() { 8 | def ruleFile = new File(getClass().getResource('/substitute-snakeyaml.json').toURI()) 9 | buildFile << """\ 10 | dependencies { 11 | resolutionRules files('${ruleFile.absolutePath}') 12 | } 13 | """.stripIndent() 14 | } 15 | 16 | @Unroll 17 | def 'substitute version from #snakeyamlVersion to 1.29'() { 18 | given: 19 | buildFile << """\ 20 | dependencies { 21 | implementation "org.yaml:snakeyaml:${snakeyamlVersion}" 22 | } 23 | """.stripIndent() 24 | 25 | when: 26 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 27 | 28 | then: 29 | result.output.contains "org.yaml:snakeyaml:1.30 -> 1.29" 30 | 31 | where: 32 | snakeyamlVersion << ['1.30'] 33 | } 34 | 35 | @Unroll 36 | def 'do not substitute other versions'() { 37 | given: 38 | buildFile << """\ 39 | dependencies { 40 | implementation "org.yaml:snakeyaml:${snakeyamlVersion}" 41 | } 42 | """.stripIndent() 43 | 44 | when: 45 | BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') 46 | 47 | then: 48 | result.output.contains "org.yaml:snakeyaml:1.29" 49 | 50 | where: 51 | snakeyamlVersion << ['1.29'] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/incubating/README.md: -------------------------------------------------------------------------------- 1 | # Incubating Rules 2 | 3 | This directory includes rules that we want checked in, but are not yet ready to be activated. 4 | 5 | - `replace-bouncycastle-jdk15plus-jdk15on` - The pluses in the module names triggers a Gradle bug, https://github.com/gradle/gradle/issues/1472 -------------------------------------------------------------------------------- /src/main/incubating/replace-bouncycastle-jdk15plus-jdk15on.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": [ 3 | { 4 | "module": "org.bouncycastle:bcmail-jdk15+", 5 | "with": "org.bouncycastle:bcmail-jdk15on", 6 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 7 | "author": "Danny Thomas", 8 | "date": "2017-02-27" 9 | }, 10 | { 11 | "module": "org.bouncycastle:bcpg-jdk15+", 12 | "with": "org.bouncycastle:bcpg-jdk15on", 13 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 14 | "author": "Danny Thomas", 15 | "date": "2017-02-27" 16 | }, 17 | { 18 | "module": "org.bouncycastle:bcprov-jdk15+", 19 | "with": "org.bouncycastle:bcprov-jdk15on", 20 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 21 | "author": "Danny Thomas", 22 | "date": "2017-02-27" 23 | }, 24 | { 25 | "module": "org.bouncycastle:bctsp-jdk15+", 26 | "with": "org.bouncycastle:bctsp-jdk15on", 27 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 28 | "author": "Danny Thomas", 29 | "date": "2017-02-27" 30 | } 31 | ], 32 | "substitute": [], 33 | "align": [], 34 | "deny": [], 35 | "reject": [] 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/align-apache-groovy.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.apache\\.groovy", 5 | "includes": [], 6 | "excludes": [], 7 | "reason": "Align Apache Groovy libraries", 8 | "author": "Danny Thomas ", 9 | "date": "2024-07-17" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "exclude": [], 16 | "reject": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-apache-kafka.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-apache-kafka", 5 | "group": "org\\.apache\\.kafka", 6 | "includes": [], 7 | "excludes": [], 8 | "reason": "Align Apache Kafka libraries", 9 | "author": "Richard Fussenegger ", 10 | "date": "2021-01-07" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-archaius2.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-archaius2", 5 | "group": "com.netflix.archaius", 6 | "includes": ["archaius2-.*"], 7 | "excludes": [], 8 | "reason": "Align Netflix Archaius2 libraries", 9 | "author": "Noel Yap ", 10 | "date": "2016-05-13" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-asm.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.ow2\\.asm", 5 | "includes": [], 6 | "excludes": [ 7 | "asm-all", 8 | "asm-debug-all", 9 | "asm-parent" 10 | ], 11 | "reason": "Align asm libraries.", 12 | "author": "Steve Hill ", 13 | "date": "2018-07-28" 14 | } 15 | ], 16 | "replace": [], 17 | "substitute": [], 18 | "deny": [], 19 | "reject": [], 20 | "exclude": [] 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/align-aws-java-sdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-aws-java-sdk", 5 | "group": "com.amazonaws", 6 | "includes": ["aws-java-sdk", "aws-java-sdk-.*"], 7 | "excludes": ["aws-java-sdk-(handwritten-samples|sample-extractor|samples-pom|generated-samples|samples|archetype|swf-libraries)"], 8 | "reason": "Align AWS Java SDK libraries", 9 | "author": "Danny Thomas ", 10 | "date": "2016-04-28T22:31:14.321Z" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-aws-sdk-java-v2.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-aws-sdk-java-v2", 5 | "group": "software.amazon.awssdk", 6 | "includes": [], 7 | "excludes": [], 8 | "reason": "Align AWS SDK for Java V2 libraries", 9 | "author": "Brian Harrington ", 10 | "date": "2024-01-30T19:53:46.000Z" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-confluent-kafka.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-confluent-kafka", 5 | "group": "io\\.confluent", 6 | "includes": ["kafka-.*"], 7 | "excludes": [], 8 | "reason": "Align Confluent Kafka libraries", 9 | "author": "Richard Fussenegger ", 10 | "date": "2022-01-10" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-eureka-client.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-eureka-client", 5 | "group": "com.netflix.eureka", 6 | "includes": ["eureka-(client|client-archaius2|client-jersey2|test-utils)"], 7 | "excludes": [], 8 | "reason": "Align Eureka Client libraries.", 9 | "author": "David Liu ", 10 | "date": "2016-10-11" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-governator.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-governator", 5 | "group": "com.netflix.governator", 6 | "includes": ["governator(-.*)?"], 7 | "excludes": [], 8 | "reason": "Align Netflix Governator libraries", 9 | "author": "Noel Yap ", 10 | "date": "2016-05-12" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-groovy.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.codehaus\\.groovy", 5 | "includes": [], 6 | "excludes": ["groovy-(eclipse-compiler|eclipse-batch|all-tests|xmlrpc|all-jdk14|jdk14|all-minimal)", "http-builder"], 7 | "reason": "Align Groovy libraries.", 8 | "author": "Danny Thomas ", 9 | "date": "2016-06-01" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "exclude": [], 16 | "reject": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-grpc.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-grpc", 5 | "group": "io.grpc", 6 | "reason": "Align gRPC libraries", 7 | "author": "Noel Yap ", 8 | "includes": [], 9 | "excludes": [], 10 | "date": "2016-05-13" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-guice.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "guice-align", 5 | "group": "(com\\.google\\.inject|com\\.google\\.inject\\.extensions)", 6 | "excludes": ["guice-(struts2-plugin|throwing-providers|assisted-inject|dagger-adapter)"], 7 | "includes": [], 8 | "reason": "Misaligned Guice jars cause strange runtime errors.", 9 | "author": "taylor.wicksell+github.com@gmail.com", 10 | "date": "2016-05-06" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-hibernate-core.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.hibernate", 5 | "includes": [ 6 | "hibernate-agroal", 7 | "hibernate-c3p0", 8 | "hibernate-core", 9 | "hibernate-ehcache", 10 | "hibernate-entitymanager", 11 | "hibernate-envers", 12 | "hibernate-gradle-plugin", 13 | "hibernate-hikaricp", 14 | "hibernate-infinispan", 15 | "hibernate-java8", 16 | "hibernate-jcache", 17 | "hibernate-jipijapa", 18 | "hibernate-jpamodelgen", 19 | "hibernate-orm-jbossmodules", 20 | "hibernate-osgi", 21 | "hibernate-proxool", 22 | "hibernate-spatial", 23 | "hibernate-testing", 24 | "hibernate-tools", 25 | "hibernate-tools-maven-plugin", 26 | "hibernate-tools-parent", 27 | "hibernate-vibur" 28 | ], 29 | "excludes": [], 30 | "reason": "Align hibernate-core libraries.", 31 | "author": "Steve Hill ", 32 | "date": "2018-07-28" 33 | } 34 | ], 35 | "replace": [], 36 | "substitute": [], 37 | "deny": [], 38 | "reject": [], 39 | "exclude": [] 40 | } 41 | -------------------------------------------------------------------------------- /src/main/resources/align-hibernate-search.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.hibernate", 5 | "includes": ["hibernate-search", "hibernate-search-.*"], 6 | "excludes": [], 7 | "reason": "Align hibernate-search libraries.", 8 | "author": "Steve Hill ", 9 | "date": "2018-07-28" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-hibernate-validator.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.hibernate", 5 | "includes": ["hibernate-validator", "hibernate-validator-.*"], 6 | "excludes": [], 7 | "reason": "Align hibernate-validator libraries.", 8 | "author": "Steve Hill ", 9 | "date": "2018-07-28" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-jackson.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "com\\.fasterxml\\.jackson\\.(core|dataformat|datatype|jaxrs|jr|module)", 5 | "excludes": [ 6 | "jackson-datatype-jdk7", 7 | "jackson-module-scala_2.12.0-RC1", 8 | "jackson-module-scala_2.12.0-M5", 9 | "jackson-module-scala_2.12.0-M4", 10 | "jackson-module-scala_2.9.3", 11 | "jackson-module-scala_2.9.2", 12 | "jackson-module-scala_2.9.1", 13 | "jackson-module-swagger", 14 | "jackson-module-scala", 15 | "jackson-datatype-hibernate", 16 | "jackson-dataformat-ion" 17 | ], 18 | "includes": [], 19 | "reason": "Align all Jackson libraries", 20 | "match": "^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)?(\\.pr\\d+)?", 21 | "author": "Danny Thomas ", 22 | "date": "2016-05-19" 23 | } 24 | ], 25 | "replace": [], 26 | "substitute": [], 27 | "deny": [], 28 | "exclude": [], 29 | "reject": [] 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/align-jersey.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "jersey-align", 5 | "group": "(com\\.sun\\.jersey|com\\.sun\\.jersey\\.contribs|com\\.sun\\.jersey\\.jersey-test-framework)", 6 | "excludes": ["jersey", "jersey-(jrebel|tests|spring|contribs)", "maven-wadl-plugin"], 7 | "includes": [], 8 | "reason": "Misaligned Jersey jars cause strange runtime errors.", 9 | "author": "noel.yap+github.com@gmail.com", 10 | "date": "2016-05-03" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-jetty.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-jetty", 5 | "group": "org.eclipse.jetty", 6 | "excludes": ["jetty-hazelcast", "jetty-nested", "jetty-policy", "jetty-ajp", "jetty-websocket", "test-jetty-servlet", "jetty-reactive-httpclient"], 7 | "includes": [], 8 | "reason": "Align jetty libraries", 9 | "author": "Rob Spieldenner ", 10 | "date": "2017-08-11" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } -------------------------------------------------------------------------------- /src/main/resources/align-kotlin.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org.jetbrains.kotlin", 5 | "reason": "Align Kotlin libraries", 6 | "includes": [], 7 | "excludes": ["kotlin-(gradle-plugin-core|jdk-annotations|android-sdk-annotations|swing|jdbc|stdlib-validator|android-compiler-plugin|gradle-plugin-test|maven-plugin-test|build-common-test|stdlib-gen|js-tests-junit|js-tests|js-library|build-common)", "kdoc", "kdoc-maven-plugin", "kunit"], 8 | "author": "Danny Thomas ", 9 | "date": "2016-06-14" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "exclude": [], 16 | "reject": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-log4j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-log4j2", 5 | "group": "org.apache.logging.log4j", 6 | "includes": [], 7 | "excludes": ["slf4j-impl", "log4j12-api"], 8 | "reason": "Align Log4J 2 libraries", 9 | "author": "Danny Thomas ", 10 | "date": "2016-09-29" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-lucene.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-lucene", 5 | "group": "org.apache.lucene", 6 | "includes": [], 7 | "excludes": ["lucene-(analyzers|ant|bdb-je|bdb|collation|contrib|demos|icu|icu4j|instantiated|kuromoji|lucli|phonetic|pruning|regex|remote|similarity|smartcn|spellchecker|stempel|swing|wordnet|xercesImpl)"], 8 | "reason": "Align all Lucene libraries", 9 | "author": "Rob Spieldenner ", 10 | "date": "2017-08-11" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } -------------------------------------------------------------------------------- /src/main/resources/align-netty.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-netty", 5 | "group": "io.netty", 6 | "includes": [], 7 | "excludes": ["netty", "netty-(metrics-yammer|tcnative-boringssl-static|tcnative|tcnative-classes|tcnative-parent|microbench|codec-redis|codec-smtp|build|bom|testsuite-autobahn|tarball|dev-tools)"], 8 | "reason": "Align all Netty libraries", 9 | "author": "Danny Thomas ", 10 | "date": "2016-04-28" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-okhttp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "com\\.squareup\\.okhttp3.*", 5 | "includes": [], 6 | "excludes": ["okhttp-ws"], 7 | "reason": "Align okhttp3", 8 | "author": "Danny Thomas ", 9 | "date": "2016-10-26" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "exclude": [], 16 | "reject": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-protobuf.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-protobuf", 5 | "group": "com.google.protobuf", 6 | "includes": ["protobuf-java", "protobuf-java-util", "protobuf-parent", "protoc"], 7 | "excludes": [], 8 | "reason": "Align protobuf libraries", 9 | "author": "Taylor Wicksell ", 10 | "date": "2017-02-07" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-retrofit2.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "com\\.squareup\\.retrofit2", 5 | "includes": [], 6 | "excludes": [], 7 | "reason": "Align retrofit2", 8 | "author": "Steve Hill ", 9 | "date": "2018-05-19" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "exclude": [], 15 | "deny": [], 16 | "reject": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-ribbon.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "com\\.netflix\\.ribbon", 5 | "includes": [], 6 | "excludes": ["ribbon-httpasyncclient"], 7 | "reason": "Align Ribbon libraries.", 8 | "author": "Danny Thomas ", 9 | "date": "2016-05-31" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-servo.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "com\\.netflix\\.servo", 5 | "includes": [], 6 | "excludes": ["servo-internal", "servo-cloudwatch", "servo"], 7 | "reason": "Align Servo libraries.", 8 | "author": "Steve Hill ", 9 | "date": "2018-07-28" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-slf4j.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-slf4j", 5 | "group": "org.slf4j", 6 | "includes": [], 7 | "excludes": ["slf4j-(jcl|android|converter|archetype|skin|log4j13)", "jcl104-over-slf4j", "nlog4j"], 8 | "reason": "Align all SLF4J libraries", 9 | "author": "Danny Thomas ", 10 | "date": "2016-04-28T22:31:14.321Z" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-spectator.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "com\\.netflix\\.spectator", 5 | "includes": [], 6 | "excludes": ["spectator-reg-metrics2", "spectator-reg-tdigest"], 7 | "reason": "Align Spectator libraries.", 8 | "author": "Brian Harrington ", 9 | "date": "2016-07-09" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-spockframework.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.spockframework", 5 | "includes": [], 6 | "excludes": ["spock-groovy2-compat", "spock-grails-support", "spock-maven"], 7 | "reason": "Align spockframework libraries.", 8 | "author": "Aubrey Chipman", 9 | "date": "2022-03-10" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-spring-integration.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.springframework\\.integration", 5 | "includes": [], 6 | "excludes": ["spring-integration-(smb|java-dsl|kafka|tuple|cassandra|flow|smpp|splunk|httpinvoker|parent|adapter|samples|aws)"], 7 | "reason": "Align Spring Integration", 8 | "author": "Danny Thomas ", 9 | "date": "2016-05-16" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-spring-kafka.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.springframework\\.kafka", 5 | "includes": [], 6 | "excludes": [], 7 | "reason": "Align Spring Kafka", 8 | "author": "Roberto Perez Alcolea ", 9 | "date": "2020-12-03" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-spring.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.springframework", 5 | "includes": ["spring-(tx|aop|instrument|context-support|beans|jms|test|core|oxm|web|context|expression|aspects|websocket|framework-bom|webmvc|webmvc-portlet|jdbc|orm|instrument-tomcat|messaging)"], 6 | "excludes": [], 7 | "match": "[2-9]\\.[0-9]+\\.[0-9]+.RELEASE", 8 | "reason": "Align Spring", 9 | "author": "Danny Thomas ", 10 | "date": "2016-05-16" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "reject": [], 17 | "exclude": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/align-springfox.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "io.springfox", 5 | "includes": ["springfox-(bean-validators|core|schema|spi|spring-web|swagger-common|swagger-ui|swagger2|)"], 6 | "excludes": [], 7 | "reason": "Align Springfox libraries.", 8 | "author": "Remy Tiitre ", 9 | "date": "2016-09-22" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-swagger.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "io\\.swagger", 5 | "includes": ["swagger-(servlet|hibernate-validations|jersey2-jaxrs|mule|jersey-jaxrs|jaxrs|core|models|annotations|project)"], 6 | "excludes": [], 7 | "reason": "Align Swagger libraries.", 8 | "author": "Danny Thomas ", 9 | "date": "2016-05-31" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-xbean.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.apache\\.xbean", 5 | "includes": ["xbean-finder-shaded", "xbean-telnet", "xbean-blueprint", "xbean-reflect", "xbean-asm5-shaded", "xbean-naming", "xbean-finder", "xbean-asm-util", "xbean-bundleutils", "xbean-classpath", "xbean-classloader", "maven-xbean-plugin", "xbean-spring", "xbean"], 6 | "excludes": [], 7 | "reason": "Align xbean libraries.", 8 | "author": "Danny Thomas ", 9 | "date": "2016-05-16" 10 | } 11 | ], 12 | "replace": [], 13 | "substitute": [], 14 | "deny": [], 15 | "reject": [], 16 | "exclude": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/align-xstream.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "com.thoughtworks.xstream", 5 | "match": "EXCLUDE_SUFFIXES", 6 | "reason": "Align all xstream libraries", 7 | "author": "Danny Thomas ", 8 | "includes": [], 9 | "excludes": [], 10 | "date": "2016-05-15" 11 | } 12 | ], 13 | "replace": [], 14 | "substitute": [], 15 | "deny": [], 16 | "exclude": [], 17 | "reject": [] 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/codehaus-jackson.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "group": "org\\.codehaus\\.jackson", 5 | "excludes": [ 6 | "jackson-asl", 7 | "jackson-lgpl" 8 | ], 9 | "includes": [], 10 | "reason": "Align Jackson 1.x", 11 | "author": "Danny Thomas ", 12 | "date": "2022-05-26" 13 | } 14 | ], 15 | "replace": [ 16 | { 17 | "module": "org.codehaus.jackson:jackson-core-lgpl", 18 | "with": "org.codehaus.jackson:jackson-core-asl", 19 | "reason": "Avoid Jackson 1.x classpath duplication", 20 | "author": "Danny Thomas ", 21 | "date": "2022-05-26" 22 | }, 23 | { 24 | "module": "org.codehaus.jackson:jackson-mapper-lgpl", 25 | "with": "org.codehaus.jackson:jackson-mapper-asl", 26 | "reason": "Avoid Jackson 1.x classpath duplication", 27 | "author": "Danny Thomas ", 28 | "date": "2022-05-26" 29 | } 30 | ], 31 | "substitute": [], 32 | "deny": [], 33 | "exclude": [], 34 | "reject": [] 35 | } 36 | -------------------------------------------------------------------------------- /src/main/resources/deny-bouncycastle-unofficial.json: -------------------------------------------------------------------------------- 1 | { 2 | "deny": [ 3 | { 4 | "module": "bouncycastle:bcmail-jdk14", 5 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 6 | "author": "Danny Thomas", 7 | "date": "2017-02-27" 8 | }, 9 | { 10 | "module": "bouncycastle:bcmail-jdk15", 11 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 12 | "author": "Danny Thomas", 13 | "date": "2017-02-27" 14 | }, 15 | { 16 | "module": "bouncycastle:bcmail-jdk16", 17 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 18 | "author": "Danny Thomas", 19 | "date": "2017-02-27" 20 | }, 21 | { 22 | "module": "bouncycastle:bcpg-jdk13", 23 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 24 | "author": "Danny Thomas", 25 | "date": "2017-02-27" 26 | }, 27 | { 28 | "module": "bouncycastle:bcpg-jdk15", 29 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 30 | "author": "Danny Thomas", 31 | "date": "2017-02-27" 32 | }, 33 | { 34 | "module": "bouncycastle:bcprov-jdk12", 35 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 36 | "author": "Danny Thomas", 37 | "date": "2017-02-27" 38 | }, 39 | { 40 | "module": "bouncycastle:bcprov-jdk13", 41 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 42 | "author": "Danny Thomas", 43 | "date": "2017-02-27" 44 | }, 45 | { 46 | "module": "bouncycastle:bcprov-jdk14", 47 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 48 | "author": "Danny Thomas", 49 | "date": "2017-02-27" 50 | }, 51 | { 52 | "module": "bouncycastle:bcprov-jdk15", 53 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 54 | "author": "Danny Thomas", 55 | "date": "2017-02-27" 56 | }, 57 | { 58 | "module": "bouncycastle:bcprov-jdk16", 59 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 60 | "author": "Danny Thomas", 61 | "date": "2017-02-27" 62 | }, 63 | { 64 | "module": "bouncycastle:bctsp-jdk14", 65 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 66 | "author": "Danny Thomas", 67 | "date": "2017-02-27" 68 | }, 69 | { 70 | "module": "bouncycastle:bouncycastle-jce-jdk13", 71 | "reason": "The bouncycastle group is not official. Configure an org.bouncycastle dependency - http://bouncy-castle.1462172.n4.nabble.com/inconsistent-pom-file-relocation-td4657368.html", 72 | "author": "Danny Thomas", 73 | "date": "2017-02-27" 74 | } 75 | ], 76 | "align": [], 77 | "replace": [], 78 | "reject": [], 79 | "exclude": [], 80 | "substitute": [] 81 | } 82 | -------------------------------------------------------------------------------- /src/main/resources/deny-genie-3.2.3.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [], 3 | "substitute": [], 4 | "deny": [ 5 | { 6 | "module": "com.netflix.genie:genie-core:3.2.3", 7 | "reason" : "Genie 3.2.3 is a retired build and should not be used", 8 | "author" : "Marco Primi ", 9 | "date" : "2017-11-03T00:00:00.000Z" 10 | } 11 | ], 12 | "reject": [], 13 | "exclude": [], 14 | "align": [] 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/optional-slf4j-bridge.json: -------------------------------------------------------------------------------- 1 | { 2 | "substitute": [ 3 | { 4 | "module": "commons-logging:commons-logging", 5 | "with": "org.slf4j:jcl-over-slf4j:1.7.+", 6 | "reason": "Subsitute Commons Logging with SLF4J bridge", 7 | "author": "Danny Thomas ", 8 | "date": "2016-04-28T22:31:14.321Z" 9 | }, 10 | { 11 | "module": "log4j:log4j", 12 | "with": "org.slf4j:log4j-over-slf4j:1.7.+", 13 | "reason": "Subsitute log4j with SLF4J bridge", 14 | "author": "Danny Thomas ", 15 | "date": "2016-04-28T22:31:14.321Z" 16 | } 17 | ], 18 | "replace": [], 19 | "align": [], 20 | "deny": [], 21 | "exclude": [], 22 | "reject": [] 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/optional-slf4j1x-only.json: -------------------------------------------------------------------------------- 1 | { 2 | "substitute": [ 3 | { 4 | "module": "org.slf4j:slf4j-api:[2.0.0,)", 5 | "with": "org.slf4j:slf4j-api:1.7.36", 6 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 7 | "author": "Martin Chalupa", 8 | "date" : "2022-09-20" 9 | }, 10 | { 11 | "module": "org.slf4j:slf4j-nop:[2.0.0,)", 12 | "with": "org.slf4j:slf4j-nop:1.7.36", 13 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 14 | "author": "Martin Chalupa", 15 | "date" : "2022-09-20" 16 | }, 17 | { 18 | "module": "org.slf4j:slf4j-simple:[2.0.0,)", 19 | "with": "org.slf4j:slf4j-simple:1.7.36", 20 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 21 | "author": "Martin Chalupa", 22 | "date" : "2022-09-20" 23 | }, 24 | { 25 | "module": "org.slf4j:slf4j-log4j12:[2.0.0,)", 26 | "with": "org.slf4j:slf4j-log4j12:1.7.36", 27 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 28 | "author": "Martin Chalupa", 29 | "date" : "2022-09-20" 30 | }, 31 | { 32 | "module": "org.slf4j:slf4j-jdk14:[2.0.0,)", 33 | "with": "org.slf4j:slf4j-jdk14:1.7.36", 34 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 35 | "author": "Martin Chalupa", 36 | "date" : "2022-09-20" 37 | }, 38 | { 39 | "module": "org.slf4j:jcl-over-slf4j:[2.0.0,)", 40 | "with": "org.slf4j:jcl-over-slf4j:1.7.36", 41 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 42 | "author": "Martin Chalupa", 43 | "date" : "2022-09-20" 44 | }, 45 | { 46 | "module": "org.slf4j:jul-to-slf4j:[2.0.0,)", 47 | "with": "org.slf4j:jul-to-slf4j:1.7.36", 48 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 49 | "author": "Martin Chalupa", 50 | "date" : "2022-09-20" 51 | }, 52 | { 53 | "module": "org.slf4j:log4j-over-slf4j:[2.0.0,)", 54 | "with": "org.slf4j:log4j-over-slf4j:1.7.36", 55 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 56 | "author": "Martin Chalupa", 57 | "date" : "2022-09-20" 58 | }, 59 | { 60 | "module": "org.slf4j:osgi-over-slf4j:[2.0.0,)", 61 | "with": "org.slf4j:osgi-over-slf4j:1.7.36", 62 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 63 | "author": "Martin Chalupa", 64 | "date" : "2022-09-20" 65 | }, 66 | { 67 | "module": "org.slf4j:slf4j-ext:[2.0.0,)", 68 | "with": "org.slf4j:slf4j-ext:1.7.36", 69 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 70 | "author": "Martin Chalupa", 71 | "date" : "2022-09-20" 72 | }, 73 | { 74 | "module": "org.slf4j:slf4j-jdk-platform-logging:[2.0.0,)", 75 | "with": "org.slf4j:slf4j-jdk-platform-logging:1.7.36", 76 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 77 | "author": "Martin Chalupa", 78 | "date" : "2022-09-20" 79 | }, 80 | { 81 | "module": "org.slf4j:slf4j-reload4j:[2.0.0,)", 82 | "with": "org.slf4j:slf4j-reload4j:1.7.36", 83 | "reason": "Downgrade slf4j to avoid incompatible mix of 1.x and 2.x", 84 | "author": "Martin Chalupa", 85 | "date" : "2022-09-20" 86 | } 87 | ], 88 | "replace": [ 89 | { 90 | "module" : "org.apache.logging.log4j:log4j-slf4j2-impl", 91 | "with" : "org.apache.logging.log4j:log4j-slf4j-impl", 92 | "reason" : "Pick only slf4j 1.x implementation for log4j", 93 | "author" : "Martin Chalupa", 94 | "date" : "2022-09-20" 95 | } 96 | ], 97 | "align": [], 98 | "deny": [], 99 | "exclude": [], 100 | "reject": [] 101 | } 102 | -------------------------------------------------------------------------------- /src/main/resources/optional-spring-boot-log4j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "substitute": [], 3 | "replace": [ 4 | { 5 | "module" : "commons-logging:commons-logging", 6 | "with" : "org.springframework:spring-jcl", 7 | "reason" : "Spring Boot Log4J 2 configuration", 8 | "author" : "Danny Thomas", 9 | "date" : "2018-10-30" 10 | }, 11 | { 12 | "module" : "ch.qos.reload4j:reload4j", 13 | "with" : "org.apache.logging.log4j:log4j-1.2-api", 14 | "reason" : "Spring Boot Log4J 2 configuration", 15 | "author" : "Danny Thomas", 16 | "date" : "2018-10-30" 17 | } 18 | ], 19 | "align": [], 20 | "deny": [], 21 | "exclude": [ 22 | { 23 | "module" : "org.apache.logging.log4j:log4j-to-slf4j", 24 | "reason" : "Spring Boot Log4J 2 configuration", 25 | "author" : "Danny Thomas", 26 | "date" : "2018-10-30" 27 | }, 28 | { 29 | "module" : "org.slf4j:slf4j-nop", 30 | "reason" : "Spring Boot Log4J 2 configuration", 31 | "author" : "Danny Thomas", 32 | "date" : "2018-10-30" 33 | }, 34 | { 35 | "module" : "org.slf4j:slf4j-simple", 36 | "reason" : "Spring Boot Log4J 2 configuration", 37 | "author" : "Danny Thomas", 38 | "date" : "2018-10-30" 39 | }, 40 | { 41 | "module" : "org.slf4j:slf4j-log4j12", 42 | "reason" : "Spring Boot Log4J 2 configuration", 43 | "author" : "Danny Thomas", 44 | "date" : "2018-10-30" 45 | }, 46 | { 47 | "module" : "org.slf4j:slf4j-jdk14", 48 | "reason" : "Spring Boot Log4J 2 configuration", 49 | "author" : "Danny Thomas", 50 | "date" : "2018-10-30" 51 | }, 52 | { 53 | "module" : "ch.qos.logback:logback-classic", 54 | "reason" : "Spring Boot Log4J 2 configuration", 55 | "author" : "Danny Thomas", 56 | "date" : "2018-10-30" 57 | }, 58 | { 59 | "module" : "ch.qos.logback:logback-core", 60 | "reason" : "Spring Boot Log4J 2 configuration", 61 | "author" : "Danny Thomas", 62 | "date" : "2018-10-30" 63 | } 64 | ], 65 | "reject": [] 66 | } 67 | -------------------------------------------------------------------------------- /src/main/resources/optional-substitute-graphql-java.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [], 3 | "deny": [], 4 | "exclude": [], 5 | "reject": [], 6 | "replace": [], 7 | "substitute": [ 8 | { 9 | "module": "com.graphql-java:graphql-java-extended-validation:17.0", 10 | "with": "com.graphql-java:graphql-java-extended-validation:17.0-hibernate-validator-6.2.0.Final", 11 | "reason": "This version is compatible with JEE 8 and Hibernate Validator 6.2 which are compatible with Spring Boot 2.x", 12 | "author": "Aubrey Chipman", 13 | "date": "2022-04-26" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/reject-bad-karyon-versions.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [], 3 | "replace": [], 4 | "exclude": [], 5 | "deny": [], 6 | "substitute": [], 7 | "reject": [ 8 | { 9 | "module": "com.netflix.karyon:karyon-admin:2.0.02", 10 | "reason": "Typed incorrect version and accidentally released", 11 | "author": "Rob Spieldenner ", 12 | "date": "2016-08-09T21:57:28.394Z" 13 | }, 14 | { 15 | "module": "com.netflix.karyon:karyon-admin-web:2.0.02", 16 | "reason": "Typed incorrect version and accidentally released", 17 | "author": "Rob Spieldenner ", 18 | "date": "2016-08-09T21:57:28.394Z" 19 | }, 20 | { 21 | "module": "com.netflix.karyon:karyon-core:2.0.02", 22 | "reason": "Typed incorrect version and accidentally released", 23 | "author": "Rob Spieldenner ", 24 | "date": "2016-08-09T21:57:28.394Z" 25 | }, 26 | { 27 | "module": "com.netflix.karyon:karyon-eureka:2.0.02", 28 | "reason": "Typed incorrect version and accidentally released", 29 | "author": "Rob Spieldenner ", 30 | "date": "2016-08-09T21:57:28.394Z" 31 | }, 32 | { 33 | "module": "com.netflix.karyon:karyon-extensions:2.0.02", 34 | "reason": "Typed incorrect version and accidentally released", 35 | "author": "Rob Spieldenner ", 36 | "date": "2016-08-09T21:57:28.394Z" 37 | }, 38 | { 39 | "module": "com.netflix.karyon:karyon-extensions-testsuite:2.0.02", 40 | "reason": "Typed incorrect version and accidentally released", 41 | "author": "Rob Spieldenner ", 42 | "date": "2016-08-09T21:57:28.394Z" 43 | }, 44 | { 45 | "module": "com.netflix.karyon:karyon-netty-http:2.0.02", 46 | "reason": "Typed incorrect version and accidentally released", 47 | "author": "Rob Spieldenner ", 48 | "date": "2016-08-09T21:57:28.394Z" 49 | }, 50 | { 51 | "module": "com.netflix.karyon:karyon-netty-jersey-blocking:2.0.02", 52 | "reason": "Typed incorrect version and accidentally released", 53 | "author": "Rob Spieldenner ", 54 | "date": "2016-08-09T21:57:28.394Z" 55 | }, 56 | { 57 | "module": "com.netflix.karyon:karyon-servlet:2.0.02", 58 | "reason": "Typed incorrect version and accidentally released", 59 | "author": "Rob Spieldenner ", 60 | "date": "2016-08-09T21:57:28.394Z" 61 | }, 62 | { 63 | "module": "com.netflix.karyon:karyon-spi:2.0.02", 64 | "reason": "Typed incorrect version and accidentally released", 65 | "author": "Rob Spieldenner ", 66 | "date": "2016-08-09T21:57:28.394Z" 67 | } 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /src/main/resources/replace-asm.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "asm:asm", 5 | "with" : "org.ow2.asm:asm", 6 | "reason" : "The asm group id changed for 4.0 and later", 7 | "author" : "Danny Thomas", 8 | "date" : "2016-04-26T00:00:00.000Z" 9 | }, 10 | { 11 | "module" : "asm:asm-all", 12 | "with" : "org.ow2.asm:asm-all", 13 | "reason" : "The asm group id changed for 4.0 and later", 14 | "author" : "Steve Hill", 15 | "date" : "2016-10-12T00:00:00.000Z" 16 | }, 17 | { 18 | "module" : "asm:asm-analysis", 19 | "with" : "org.ow2.asm:asm-analysis", 20 | "reason" : "The asm group id changed for 4.0 and later", 21 | "author" : "Danny Thomas", 22 | "date" : "2017-03-13" 23 | }, 24 | { 25 | "module" : "asm:asm-commons", 26 | "with" : "org.ow2.asm:asm-commons", 27 | "reason" : "The asm group id changed for 4.0 and later", 28 | "author" : "Danny Thomas", 29 | "date" : "2017-03-13" 30 | }, 31 | { 32 | "module" : "asm:asm-debug-all", 33 | "with" : "org.ow2.asm:asm-debug-all", 34 | "reason" : "The asm group id changed for 4.0 and later", 35 | "author" : "Danny Thomas", 36 | "date" : "2017-03-13" 37 | }, 38 | { 39 | "module" : "asm:asm-parent", 40 | "with" : "org.ow2.asm:asm-parent", 41 | "reason" : "The asm group id changed for 4.0 and later", 42 | "author" : "Danny Thomas", 43 | "date" : "2017-03-13" 44 | }, 45 | { 46 | "module" : "asm:asm-tree", 47 | "with" : "org.ow2.asm:asm-tree", 48 | "reason" : "The asm group id changed for 4.0 and later", 49 | "author" : "Danny Thomas", 50 | "date" : "2017-03-13" 51 | }, 52 | { 53 | "module" : "asm:asm-util", 54 | "with" : "org.ow2.asm:asm-util", 55 | "reason" : "The asm group id changed for 4.0 and later", 56 | "author" : "Danny Thomas", 57 | "date" : "2017-03-13" 58 | }, 59 | { 60 | "module" : "asm:asm-xml", 61 | "with" : "org.ow2.asm:asm-xml", 62 | "reason" : "The asm group id changed for 4.0 and later", 63 | "author" : "Danny Thomas", 64 | "date" : "2017-03-13" 65 | } 66 | ], 67 | "align": [], 68 | "substitute": [], 69 | "deny": [], 70 | "exclude": [], 71 | "reject": [] 72 | } 73 | -------------------------------------------------------------------------------- /src/main/resources/replace-bouncycastle-debug.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": [ 3 | { 4 | "module": "org.bouncycastle:bcprov-jdk14", 5 | "with": "org.bouncycastle:bcprov-jdk14-debug", 6 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 7 | "author": "Danny Thomas", 8 | "date": "2017-02-27" 9 | }, 10 | { 11 | "module": "org.bouncycastle:bcprov-jdk15on", 12 | "with": "org.bouncycastle:bcprov-jdk15on-debug", 13 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 14 | "author": "Danny Thomas", 15 | "date": "2017-02-27" 16 | }, 17 | { 18 | "module": "org.bouncycastle:bcprov-ext-jdk15on", 19 | "with": "org.bouncycastle:bcprov-ext-debug-jdk15on", 20 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 21 | "author": "Danny Thomas", 22 | "date": "2017-02-27" 23 | } 24 | ], 25 | "substitute": [], 26 | "align": [], 27 | "deny": [], 28 | "exclude": [], 29 | "reject": [] 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/replace-bouncycastle-jdk12-jdk14.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": [ 3 | { 4 | "module": "org.bouncycastle:bcpg-jdk12", 5 | "with": "org.bouncycastle:bcpg-jdk14", 6 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 7 | "author": "Danny Thomas", 8 | "date": "2017-02-27" 9 | }, 10 | { 11 | "module": "org.bouncycastle:bcprov-jdk12", 12 | "with": "org.bouncycastle:bcprov-jdk14", 13 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 14 | "author": "Danny Thomas", 15 | "date": "2017-02-27" 16 | } 17 | ], 18 | "substitute": [], 19 | "align": [], 20 | "deny": [], 21 | "exclude": [], 22 | "reject": [] 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/replace-bouncycastle-jdk14-jdk15on.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": [ 3 | { 4 | "module": "org.bouncycastle:bcmail-jdk14", 5 | "with": "org.bouncycastle:bcmail-jdk15on", 6 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 7 | "author": "Danny Thomas", 8 | "date": "2017-02-27" 9 | }, 10 | { 11 | "module": "org.bouncycastle:bcpg-jdk14", 12 | "with": "org.bouncycastle:bcpg-jdk15on", 13 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 14 | "author": "Danny Thomas", 15 | "date": "2017-02-27" 16 | }, 17 | { 18 | "module": "org.bouncycastle:bcpkix-jdk14", 19 | "with": "org.bouncycastle:bcpkix-jdk15on", 20 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 21 | "author": "Danny Thomas", 22 | "date": "2017-02-27" 23 | }, 24 | { 25 | "module": "org.bouncycastle:bcprov-jdk14", 26 | "with": "org.bouncycastle:bcprov-jdk15on", 27 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 28 | "author": "Danny Thomas", 29 | "date": "2017-02-27" 30 | }, 31 | { 32 | "module": "org.bouncycastle:bcprov-ext-debug-jdk14", 33 | "with": "org.bouncycastle:bcprov-ext-debug-jdk15on", 34 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 35 | "author": "Danny Thomas", 36 | "date": "2017-02-27" 37 | }, 38 | { 39 | "module": "org.bouncycastle:bbcprov-debug-jdk14", 40 | "with": "org.bouncycastle:bcprov-debug-jdk15on", 41 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 42 | "author": "Danny Thomas", 43 | "date": "2017-02-27" 44 | }, 45 | { 46 | "module": "org.bouncycastle:bcprov-ext-jdk14", 47 | "with": "org.bouncycastle:bcprov-ext-jdk15on", 48 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 49 | "author": "Danny Thomas", 50 | "date": "2017-02-27" 51 | }, 52 | { 53 | "module": "org.bouncycastle:bctsp-jdk14", 54 | "with": "org.bouncycastle:bctsp-jdk15on", 55 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 56 | "author": "Danny Thomas", 57 | "date": "2017-02-27" 58 | } 59 | ], 60 | "substitute": [], 61 | "align": [], 62 | "deny": [], 63 | "exclude": [], 64 | "reject": [] 65 | } 66 | -------------------------------------------------------------------------------- /src/main/resources/replace-bouncycastle-jdk15-jdk15on.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": [ 3 | { 4 | "module": "org.bouncycastle:bcmail-jdk15", 5 | "with": "org.bouncycastle:bcmail-jdk15on", 6 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 7 | "author": "Danny Thomas", 8 | "date": "2017-02-27" 9 | }, 10 | { 11 | "module": "org.bouncycastle:bcpg-jdk15", 12 | "with": "org.bouncycastle:bcpg-jdk15on", 13 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 14 | "author": "Danny Thomas", 15 | "date": "2017-02-27" 16 | }, 17 | { 18 | "module": "org.bouncycastle:bcprov-jdk15", 19 | "with": "org.bouncycastle:bcprov-jdk15on", 20 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 21 | "author": "Danny Thomas", 22 | "date": "2017-02-27" 23 | }, 24 | { 25 | "module": "org.bouncycastle:bcprov-ext-jdk15", 26 | "with": "org.bouncycastle:bcprov-ext-jdk15on", 27 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 28 | "author": "Danny Thomas", 29 | "date": "2017-02-27" 30 | }, 31 | { 32 | "module": "org.bouncycastle:bctsp-jdk15", 33 | "with": "org.bouncycastle:bctsp-jdk15on", 34 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 35 | "author": "Danny Thomas", 36 | "date": "2017-02-27" 37 | } 38 | ], 39 | "substitute": [], 40 | "align": [], 41 | "deny": [], 42 | "exclude": [], 43 | "reject": [] 44 | } 45 | -------------------------------------------------------------------------------- /src/main/resources/replace-bouncycastle-jdk16-jdk15on.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": [ 3 | { 4 | "module": "org.bouncycastle:bcmail-jdk16", 5 | "with": "org.bouncycastle:bcmail-jdk15on", 6 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 7 | "author": "Danny Thomas", 8 | "date": "2017-02-27" 9 | }, 10 | { 11 | "module": "org.bouncycastle:bcpg-jdk16", 12 | "with": "org.bouncycastle:bcpg-jdk15on", 13 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 14 | "author": "Danny Thomas", 15 | "date": "2017-02-27" 16 | }, 17 | { 18 | "module": "org.bouncycastle:bcprov-jdk16", 19 | "with": "org.bouncycastle:bcprov-jdk15on", 20 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 21 | "author": "Danny Thomas", 22 | "date": "2017-02-27" 23 | }, 24 | { 25 | "module": "org.bouncycastle:bcprov-ext-jdk16", 26 | "with": "org.bouncycastle:bcprov-ext-jdk15on", 27 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 28 | "author": "Danny Thomas", 29 | "date": "2017-02-27" 30 | }, 31 | { 32 | "module": "org.bouncycastle:bctsp-jdk16", 33 | "with": "org.bouncycastle:bctsp-jdk15on", 34 | "reason": "Ensure that bouncycastle artifacts conflict resolve", 35 | "author": "Danny Thomas", 36 | "date": "2017-02-27" 37 | } 38 | ], 39 | "substitute": [], 40 | "align": [], 41 | "deny": [], 42 | "exclude": [], 43 | "reject": [] 44 | } 45 | -------------------------------------------------------------------------------- /src/main/resources/replace-c3p0.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "c3p0:c3p0", 5 | "with" : "com.mchange:c3p0", 6 | "reason" : "The c3p0 group id changed for 0.9.2 and later", 7 | "author" : "Vyacheslav Shvets", 8 | "date" : "2016-08-31T00:00:00.000Z" 9 | } 10 | ], 11 | "align": [], 12 | "substitute": [], 13 | "deny": [], 14 | "exclude": [], 15 | "reject": [] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/replace-google-collections.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "com.google.collections:google-collections", 5 | "with" : "com.google.guava:guava", 6 | "reason" : "Google Collections was superceded by Guava", 7 | "author" : "Danny Thomas", 8 | "date" : "2016-04-26T00:00:00.000Z" 9 | } 10 | ], 11 | "align": [], 12 | "substitute": [], 13 | "deny": [], 14 | "exclude": [], 15 | "reject": [] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/replace-groovy.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "org.codehaus.groovy:groovy", 5 | "with" : "org.apache.groovy:groovy", 6 | "reason" : "The groovy group id changed for 4.0 and later", 7 | "author" : "Danny Thomas", 8 | "date" : "2024-07-17" 9 | }, 10 | { 11 | "module" : "org.codehaus.groovy:groovy", 12 | "with" : "org.apache.groovy:groovy", 13 | "reason" : "The groovy group id changed for 4.0 and later", 14 | "author" : "Danny Thomas", 15 | "date" : "2024-07-17" 16 | }, 17 | { 18 | "module" : "org.codehaus.groovy:groovy", 19 | "with" : "org.apache.groovy:groovy", 20 | "reason" : "The groovy group id changed for 4.0 and later", 21 | "author" : "Danny Thomas", 22 | "date" : "2024-07-17" 23 | }, 24 | { 25 | "module" : "org.codehaus.groovy:groovy", 26 | "with" : "org.apache.groovy:groovy", 27 | "reason" : "The groovy group id changed for 4.0 and later", 28 | "author" : "Danny Thomas", 29 | "date" : "2024-07-17" 30 | }, 31 | { 32 | "module" : "org.codehaus.groovy:groovy", 33 | "with" : "org.apache.groovy:groovy", 34 | "reason" : "The groovy group id changed for 4.0 and later", 35 | "author" : "Danny Thomas", 36 | "date" : "2024-07-17" 37 | }, 38 | { 39 | "module" : "org.codehaus.groovy:groovy", 40 | "with" : "org.apache.groovy:groovy", 41 | "reason" : "The groovy group id changed for 4.0 and later", 42 | "author" : "Danny Thomas", 43 | "date" : "2024-07-17" 44 | }, 45 | { 46 | "module" : "org.codehaus.groovy:groovy", 47 | "with" : "org.apache.groovy:groovy", 48 | "reason" : "The groovy group id changed for 4.0 and later", 49 | "author" : "Danny Thomas", 50 | "date" : "2024-07-17" 51 | }, 52 | { 53 | "module" : "org.codehaus.groovy:groovy", 54 | "with" : "org.apache.groovy:groovy", 55 | "reason" : "The groovy group id changed for 4.0 and later", 56 | "author" : "Danny Thomas", 57 | "date" : "2024-07-17" 58 | }, 59 | { 60 | "module" : "org.codehaus.groovy:groovy", 61 | "with" : "org.apache.groovy:groovy", 62 | "reason" : "The groovy group id changed for 4.0 and later", 63 | "author" : "Danny Thomas", 64 | "date" : "2024-07-17" 65 | }, 66 | { 67 | "module" : "org.codehaus.groovy:groovy", 68 | "with" : "org.apache.groovy:groovy", 69 | "reason" : "The groovy group id changed for 4.0 and later", 70 | "author" : "Danny Thomas", 71 | "date" : "2024-07-17" 72 | }, 73 | { 74 | "module" : "org.codehaus.groovy:groovy", 75 | "with" : "org.apache.groovy:groovy", 76 | "reason" : "The groovy group id changed for 4.0 and later", 77 | "author" : "Danny Thomas", 78 | "date" : "2024-07-17" 79 | }, 80 | { 81 | "module" : "org.codehaus.groovy:groovy", 82 | "with" : "org.apache.groovy:groovy", 83 | "reason" : "The groovy group id changed for 4.0 and later", 84 | "author" : "Danny Thomas", 85 | "date" : "2024-07-17" 86 | }, 87 | { 88 | "module" : "org.codehaus.groovy:groovy", 89 | "with" : "org.apache.groovy:groovy", 90 | "reason" : "The groovy group id changed for 4.0 and later", 91 | "author" : "Danny Thomas", 92 | "date" : "2024-07-17" 93 | }, 94 | { 95 | "module" : "org.codehaus.groovy:groovy", 96 | "with" : "org.apache.groovy:groovy", 97 | "reason" : "The groovy group id changed for 4.0 and later", 98 | "author" : "Danny Thomas", 99 | "date" : "2024-07-17" 100 | }, 101 | { 102 | "module" : "org.codehaus.groovy:groovy", 103 | "with" : "org.apache.groovy:groovy", 104 | "reason" : "The groovy group id changed for 4.0 and later", 105 | "author" : "Danny Thomas", 106 | "date" : "2024-07-17" 107 | }, 108 | { 109 | "module" : "org.codehaus.groovy:groovy", 110 | "with" : "org.apache.groovy:groovy", 111 | "reason" : "The groovy group id changed for 4.0 and later", 112 | "author" : "Danny Thomas", 113 | "date" : "2024-07-17" 114 | }, 115 | { 116 | "module" : "org.codehaus.groovy:groovy", 117 | "with" : "org.apache.groovy:groovy", 118 | "reason" : "The groovy group id changed for 4.0 and later", 119 | "author" : "Danny Thomas", 120 | "date" : "2024-07-17" 121 | }, 122 | { 123 | "module" : "org.codehaus.groovy:groovy", 124 | "with" : "org.apache.groovy:groovy", 125 | "reason" : "The groovy group id changed for 4.0 and later", 126 | "author" : "Danny Thomas", 127 | "date" : "2024-07-17" 128 | }, 129 | { 130 | "module" : "org.codehaus.groovy:groovy", 131 | "with" : "org.apache.groovy:groovy", 132 | "reason" : "The groovy group id changed for 4.0 and later", 133 | "author" : "Danny Thomas", 134 | "date" : "2024-07-17" 135 | }, 136 | { 137 | "module" : "org.codehaus.groovy:groovy", 138 | "with" : "org.apache.groovy:groovy", 139 | "reason" : "The groovy group id changed for 4.0 and later", 140 | "author" : "Danny Thomas", 141 | "date" : "2024-07-17" 142 | }, 143 | { 144 | "module" : "org.codehaus.groovy:groovy", 145 | "with" : "org.apache.groovy:groovy", 146 | "reason" : "The groovy group id changed for 4.0 and later", 147 | "author" : "Danny Thomas", 148 | "date" : "2024-07-17" 149 | }, 150 | { 151 | "module" : "org.codehaus.groovy:groovy", 152 | "with" : "org.apache.groovy:groovy", 153 | "reason" : "The groovy group id changed for 4.0 and later", 154 | "author" : "Danny Thomas", 155 | "date" : "2024-07-17" 156 | }, 157 | { 158 | "module" : "org.codehaus.groovy:groovy", 159 | "with" : "org.apache.groovy:groovy", 160 | "reason" : "The groovy group id changed for 4.0 and later", 161 | "author" : "Danny Thomas", 162 | "date" : "2024-07-17" 163 | }, 164 | { 165 | "module" : "org.codehaus.groovy:groovy", 166 | "with" : "org.apache.groovy:groovy", 167 | "reason" : "The groovy group id changed for 4.0 and later", 168 | "author" : "Danny Thomas", 169 | "date" : "2024-07-17" 170 | }, 171 | { 172 | "module" : "org.codehaus.groovy:groovy", 173 | "with" : "org.apache.groovy:groovy", 174 | "reason" : "The groovy group id changed for 4.0 and later", 175 | "author" : "Danny Thomas", 176 | "date" : "2024-07-17" 177 | }, 178 | { 179 | "module" : "org.codehaus.groovy:groovy", 180 | "with" : "org.apache.groovy:groovy", 181 | "reason" : "The groovy group id changed for 4.0 and later", 182 | "author" : "Danny Thomas", 183 | "date" : "2024-07-17" 184 | }, 185 | { 186 | "module" : "org.codehaus.groovy:groovy", 187 | "with" : "org.apache.groovy:groovy", 188 | "reason" : "The groovy group id changed for 4.0 and later", 189 | "author" : "Danny Thomas", 190 | "date" : "2024-07-17" 191 | }, 192 | { 193 | "module" : "org.codehaus.groovy:groovy", 194 | "with" : "org.apache.groovy:groovy", 195 | "reason" : "The groovy group id changed for 4.0 and later", 196 | "author" : "Danny Thomas", 197 | "date" : "2024-07-17" 198 | }, 199 | { 200 | "module" : "org.codehaus.groovy:groovy", 201 | "with" : "org.apache.groovy:groovy", 202 | "reason" : "The groovy group id changed for 4.0 and later", 203 | "author" : "Danny Thomas", 204 | "date" : "2024-07-17" 205 | }, 206 | { 207 | "module" : "org.codehaus.groovy:groovy", 208 | "with" : "org.apache.groovy:groovy", 209 | "reason" : "The groovy group id changed for 4.0 and later", 210 | "author" : "Danny Thomas", 211 | "date" : "2024-07-17" 212 | }, 213 | { 214 | "module" : "org.codehaus.groovy:groovy", 215 | "with" : "org.apache.groovy:groovy", 216 | "reason" : "The groovy group id changed for 4.0 and later", 217 | "author" : "Danny Thomas", 218 | "date" : "2024-07-17" 219 | }, 220 | { 221 | "module" : "org.codehaus.groovy:groovy", 222 | "with" : "org.apache.groovy:groovy", 223 | "reason" : "The groovy group id changed for 4.0 and later", 224 | "author" : "Danny Thomas", 225 | "date" : "2024-07-17" 226 | }, 227 | { 228 | "module" : "org.codehaus.groovy:groovy", 229 | "with" : "org.apache.groovy:groovy", 230 | "reason" : "The groovy group id changed for 4.0 and later", 231 | "author" : "Danny Thomas", 232 | "date" : "2024-07-17" 233 | }, 234 | { 235 | "module" : "org.codehaus.groovy:groovy", 236 | "with" : "org.apache.groovy:groovy", 237 | "reason" : "The groovy group id changed for 4.0 and later", 238 | "author" : "Danny Thomas", 239 | "date" : "2024-07-17" 240 | }, 241 | { 242 | "module" : "org.codehaus.groovy:groovy", 243 | "with" : "org.apache.groovy:groovy", 244 | "reason" : "The groovy group id changed for 4.0 and later", 245 | "author" : "Danny Thomas", 246 | "date" : "2024-07-17" 247 | }, 248 | { 249 | "module" : "org.codehaus.groovy:groovy", 250 | "with" : "org.apache.groovy:groovy", 251 | "reason" : "The groovy group id changed for 4.0 and later", 252 | "author" : "Danny Thomas", 253 | "date" : "2024-07-17" 254 | }, 255 | { 256 | "module" : "org.codehaus.groovy:$package", 257 | "with" : "org.apache.groovy:$package", 258 | "reason" : "The groovy group id changed for 4.0 and later", 259 | "author" : "Danny Thomas", 260 | "date" : "2024-07-17" 261 | }, 262 | { 263 | "module" : "org.codehaus.groovy:groovy", 264 | "with" : "org.apache.groovy:groovy", 265 | "reason" : "The groovy group id changed for 4.0 and later", 266 | "author" : "Danny Thomas", 267 | "date" : "2024-07-17" 268 | }, 269 | { 270 | "module" : "org.codehaus.groovy:groovy-all", 271 | "with" : "org.apache.groovy:groovy-all", 272 | "reason" : "The groovy group id changed for 4.0 and later", 273 | "author" : "Danny Thomas", 274 | "date" : "2024-07-17" 275 | }, 276 | { 277 | "module" : "org.codehaus.groovy:groovy-ant", 278 | "with" : "org.apache.groovy:groovy-ant", 279 | "reason" : "The groovy group id changed for 4.0 and later", 280 | "author" : "Danny Thomas", 281 | "date" : "2024-07-17" 282 | }, 283 | { 284 | "module" : "org.codehaus.groovy:groovy-astbuilder", 285 | "with" : "org.apache.groovy:groovy-astbuilder", 286 | "reason" : "The groovy group id changed for 4.0 and later", 287 | "author" : "Danny Thomas", 288 | "date" : "2024-07-17" 289 | }, 290 | { 291 | "module" : "org.codehaus.groovy:groovy-backports-compat23", 292 | "with" : "org.apache.groovy:groovy-backports-compat23", 293 | "reason" : "The groovy group id changed for 4.0 and later", 294 | "author" : "Danny Thomas", 295 | "date" : "2024-07-17" 296 | }, 297 | { 298 | "module" : "org.codehaus.groovy:groovy-binary", 299 | "with" : "org.apache.groovy:groovy-binary", 300 | "reason" : "The groovy group id changed for 4.0 and later", 301 | "author" : "Danny Thomas", 302 | "date" : "2024-07-17" 303 | }, 304 | { 305 | "module" : "org.codehaus.groovy:groovy-bom", 306 | "with" : "org.apache.groovy:groovy-bom", 307 | "reason" : "The groovy group id changed for 4.0 and later", 308 | "author" : "Danny Thomas", 309 | "date" : "2024-07-17" 310 | }, 311 | { 312 | "module" : "org.codehaus.groovy:groovy-bsf", 313 | "with" : "org.apache.groovy:groovy-bsf", 314 | "reason" : "The groovy group id changed for 4.0 and later", 315 | "author" : "Danny Thomas", 316 | "date" : "2024-07-17" 317 | }, 318 | { 319 | "module" : "org.codehaus.groovy:groovy-cli-commons", 320 | "with" : "org.apache.groovy:groovy-cli-commons", 321 | "reason" : "The groovy group id changed for 4.0 and later", 322 | "author" : "Danny Thomas", 323 | "date" : "2024-07-17" 324 | }, 325 | { 326 | "module" : "org.codehaus.groovy:groovy-cli-picocli", 327 | "with" : "org.apache.groovy:groovy-cli-picocli", 328 | "reason" : "The groovy group id changed for 4.0 and later", 329 | "author" : "Danny Thomas", 330 | "date" : "2024-07-17" 331 | }, 332 | { 333 | "module" : "org.codehaus.groovy:groovy-console", 334 | "with" : "org.apache.groovy:groovy-console", 335 | "reason" : "The groovy group id changed for 4.0 and later", 336 | "author" : "Danny Thomas", 337 | "date" : "2024-07-17" 338 | }, 339 | { 340 | "module" : "org.codehaus.groovy:groovy-contracts", 341 | "with" : "org.apache.groovy:groovy-contracts", 342 | "reason" : "The groovy group id changed for 4.0 and later", 343 | "author" : "Danny Thomas", 344 | "date" : "2024-07-17" 345 | }, 346 | { 347 | "module" : "org.codehaus.groovy:groovy-datetime", 348 | "with" : "org.apache.groovy:groovy-datetime", 349 | "reason" : "The groovy group id changed for 4.0 and later", 350 | "author" : "Danny Thomas", 351 | "date" : "2024-07-17" 352 | }, 353 | { 354 | "module" : "org.codehaus.groovy:groovy-dateutil", 355 | "with" : "org.apache.groovy:groovy-dateutil", 356 | "reason" : "The groovy group id changed for 4.0 and later", 357 | "author" : "Danny Thomas", 358 | "date" : "2024-07-17" 359 | }, 360 | { 361 | "module" : "org.codehaus.groovy:groovy-docgenerator", 362 | "with" : "org.apache.groovy:groovy-docgenerator", 363 | "reason" : "The groovy group id changed for 4.0 and later", 364 | "author" : "Danny Thomas", 365 | "date" : "2024-07-17" 366 | }, 367 | { 368 | "module" : "org.codehaus.groovy:groovy-ginq", 369 | "with" : "org.apache.groovy:groovy-ginq", 370 | "reason" : "The groovy group id changed for 4.0 and later", 371 | "author" : "Danny Thomas", 372 | "date" : "2024-07-17" 373 | }, 374 | { 375 | "module" : "org.codehaus.groovy:groovy-groovydoc", 376 | "with" : "org.apache.groovy:groovy-groovydoc", 377 | "reason" : "The groovy group id changed for 4.0 and later", 378 | "author" : "Danny Thomas", 379 | "date" : "2024-07-17" 380 | }, 381 | { 382 | "module" : "org.codehaus.groovy:groovy-groovysh", 383 | "with" : "org.apache.groovy:groovy-groovysh", 384 | "reason" : "The groovy group id changed for 4.0 and later", 385 | "author" : "Danny Thomas", 386 | "date" : "2024-07-17" 387 | }, 388 | { 389 | "module" : "org.codehaus.groovy:groovy-jaxb", 390 | "with" : "org.apache.groovy:groovy-jaxb", 391 | "reason" : "The groovy group id changed for 4.0 and later", 392 | "author" : "Danny Thomas", 393 | "date" : "2024-07-17" 394 | }, 395 | { 396 | "module" : "org.codehaus.groovy:groovy-jmx", 397 | "with" : "org.apache.groovy:groovy-jmx", 398 | "reason" : "The groovy group id changed for 4.0 and later", 399 | "author" : "Danny Thomas", 400 | "date" : "2024-07-17" 401 | }, 402 | { 403 | "module" : "org.codehaus.groovy:groovy-json", 404 | "with" : "org.apache.groovy:groovy-json", 405 | "reason" : "The groovy group id changed for 4.0 and later", 406 | "author" : "Danny Thomas", 407 | "date" : "2024-07-17" 408 | }, 409 | { 410 | "module" : "org.codehaus.groovy:groovy-jsr223", 411 | "with" : "org.apache.groovy:groovy-jsr223", 412 | "reason" : "The groovy group id changed for 4.0 and later", 413 | "author" : "Danny Thomas", 414 | "date" : "2024-07-17" 415 | }, 416 | { 417 | "module" : "org.codehaus.groovy:groovy-macro", 418 | "with" : "org.apache.groovy:groovy-macro", 419 | "reason" : "The groovy group id changed for 4.0 and later", 420 | "author" : "Danny Thomas", 421 | "date" : "2024-07-17" 422 | }, 423 | { 424 | "module" : "org.codehaus.groovy:groovy-macro-library", 425 | "with" : "org.apache.groovy:groovy-macro-library", 426 | "reason" : "The groovy group id changed for 4.0 and later", 427 | "author" : "Danny Thomas", 428 | "date" : "2024-07-17" 429 | }, 430 | { 431 | "module" : "org.codehaus.groovy:groovy-nio", 432 | "with" : "org.apache.groovy:groovy-nio", 433 | "reason" : "The groovy group id changed for 4.0 and later", 434 | "author" : "Danny Thomas", 435 | "date" : "2024-07-17" 436 | }, 437 | { 438 | "module" : "org.codehaus.groovy:groovy-servlet", 439 | "with" : "org.apache.groovy:groovy-servlet", 440 | "reason" : "The groovy group id changed for 4.0 and later", 441 | "author" : "Danny Thomas", 442 | "date" : "2024-07-17" 443 | }, 444 | { 445 | "module" : "org.codehaus.groovy:groovy-sql", 446 | "with" : "org.apache.groovy:groovy-sql", 447 | "reason" : "The groovy group id changed for 4.0 and later", 448 | "author" : "Danny Thomas", 449 | "date" : "2024-07-17" 450 | }, 451 | { 452 | "module" : "org.codehaus.groovy:groovy-swing", 453 | "with" : "org.apache.groovy:groovy-swing", 454 | "reason" : "The groovy group id changed for 4.0 and later", 455 | "author" : "Danny Thomas", 456 | "date" : "2024-07-17" 457 | }, 458 | { 459 | "module" : "org.codehaus.groovy:groovy-templates", 460 | "with" : "org.apache.groovy:groovy-templates", 461 | "reason" : "The groovy group id changed for 4.0 and later", 462 | "author" : "Danny Thomas", 463 | "date" : "2024-07-17" 464 | }, 465 | { 466 | "module" : "org.codehaus.groovy:groovy-test", 467 | "with" : "org.apache.groovy:groovy-test", 468 | "reason" : "The groovy group id changed for 4.0 and later", 469 | "author" : "Danny Thomas", 470 | "date" : "2024-07-17" 471 | }, 472 | { 473 | "module" : "org.codehaus.groovy:groovy-test-junit5", 474 | "with" : "org.apache.groovy:groovy-test-junit5", 475 | "reason" : "The groovy group id changed for 4.0 and later", 476 | "author" : "Danny Thomas", 477 | "date" : "2024-07-17" 478 | }, 479 | { 480 | "module" : "org.codehaus.groovy:groovy-testng", 481 | "with" : "org.apache.groovy:groovy-testng", 482 | "reason" : "The groovy group id changed for 4.0 and later", 483 | "author" : "Danny Thomas", 484 | "date" : "2024-07-17" 485 | }, 486 | { 487 | "module" : "org.codehaus.groovy:groovy-toml", 488 | "with" : "org.apache.groovy:groovy-toml", 489 | "reason" : "The groovy group id changed for 4.0 and later", 490 | "author" : "Danny Thomas", 491 | "date" : "2024-07-17" 492 | }, 493 | { 494 | "module" : "org.codehaus.groovy:groovy-typecheckers", 495 | "with" : "org.apache.groovy:groovy-typecheckers", 496 | "reason" : "The groovy group id changed for 4.0 and later", 497 | "author" : "Danny Thomas", 498 | "date" : "2024-07-17" 499 | }, 500 | { 501 | "module" : "org.codehaus.groovy:groovy-xml", 502 | "with" : "org.apache.groovy:groovy-xml", 503 | "reason" : "The groovy group id changed for 4.0 and later", 504 | "author" : "Danny Thomas", 505 | "date" : "2024-07-17" 506 | }, 507 | { 508 | "module" : "org.codehaus.groovy:groovy-yaml", 509 | "with" : "org.apache.groovy:groovy-yaml", 510 | "reason" : "The groovy group id changed for 4.0 and later", 511 | "author" : "Danny Thomas", 512 | "date" : "2024-07-17" 513 | } 514 | ], 515 | "align": [], 516 | "substitute": [], 517 | "deny": [], 518 | "exclude": [], 519 | "reject": [] 520 | } 521 | -------------------------------------------------------------------------------- /src/main/resources/replace-guava.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "com.google.guava:guava-jdk5", 5 | "with" : "com.google.guava:guava", 6 | "reason" : "Guava JDK5 can be safely replaced by Guava", 7 | "author" : "Steve Hill", 8 | "date" : "2016-12-05T00:00:00.000Z" 9 | } 10 | ], 11 | "align": [], 12 | "substitute": [], 13 | "deny": [], 14 | "exclude": [], 15 | "reject": [] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/replace-javassist.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "javassist:javassist", 5 | "with" : "org.javassist:javassist", 6 | "reason" : "The javassist group id changed for 3.13.0-GA and later", 7 | "author" : "Danny Thomas", 8 | "date" : "2016-04-26T00:00:00.000Z" 9 | } 10 | ], 11 | "align": [], 12 | "substitute": [], 13 | "deny": [], 14 | "exclude": [], 15 | "reject": [] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/replace-javax.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "javax.validation:validation-api", 5 | "with" : "jakarta.validation:jakarta.validation-api", 6 | "reason" : "Jakarta is replacing javax. This avoids having both on the classpath which helps to align the versions", 7 | "author" : "Asi Bross", 8 | "date" : "2020-01-24T00:00:00.000Z" 9 | }, 10 | { 11 | "module" : "javax.persistence:javax.persistence-api", 12 | "with" : "jakarta.persistence:jakarta.persistence-api", 13 | "reason" : "Java Persistence API (JPA), in 2019 renamed to Jakarta Persistence", 14 | "author" : "Roberto Perez Alcolea", 15 | "date" : "2020-12-10T17:38:00.000Z" 16 | }, 17 | { 18 | "module" : "javax.persistence:persistence-api", 19 | "with" : "jakarta.persistence:jakarta.persistence-api", 20 | "reason" : "Java Persistence API (JPA), in 2019 renamed to Jakarta Persistence", 21 | "author" : "Roberto Perez Alcolea", 22 | "date" : "2020-12-10T17:38:00.000Z" 23 | } 24 | ], 25 | "align": [], 26 | "substitute": [], 27 | "deny": [], 28 | "exclude": [], 29 | "reject": [] 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/replace-jpountz-lz4.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [], 3 | "deny": [], 4 | "exclude": [], 5 | "replace" : [ 6 | { 7 | "module" : "net.jpountz.lz4:lz4", 8 | "with" : "org.lz4:lz4-java", 9 | "reason" : "having both net.jpountz.lz4:lz4 and org.lz4:lz4-java should prefer org.lz4:lz4-java", 10 | "author" : "Dave Ray", 11 | "date" : "2022-03-16" 12 | } 13 | ], 14 | "reject": [], 15 | "substitute": [] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/replace-log4j.json: -------------------------------------------------------------------------------- 1 | { 2 | "substitute": [], 3 | "replace": [ 4 | { 5 | "module": "log4j:log4j", 6 | "with": "ch.qos.reload4j:reload4j", 7 | "reason": "Replace log4j 1 with reload4j binding", 8 | "author": "Danny Thomas ", 9 | "date": "2021-01-26" 10 | } 11 | ], 12 | "align": [], 13 | "deny": [], 14 | "exclude": [], 15 | "reject": [] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/replace-lz4.json: -------------------------------------------------------------------------------- 1 | { 2 | "substitute": [], 3 | "replace": [ 4 | { 5 | "module": "net.jpountz.lz4:lz4", 6 | "with": "org.lz4:lz4-java", 7 | "reason": "Replace Yann Collet's original lz4 Java bindings with actively maintained fork", 8 | "author": "Danny Thomas ", 9 | "date": "2023-03-30" 10 | } 11 | ], 12 | "align": [], 13 | "deny": [], 14 | "exclude": [], 15 | "reject": [] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/replace-rxjava.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": [ 3 | { 4 | "module": "com.netflix.rxjava:language-adaptors", 5 | "with": "io.reactivex:language-adaptors", 6 | "reason": "The rxjava group id changed", 7 | "author": "Netflix Runtime Platform", 8 | "date": "2016-04-27" 9 | }, 10 | { 11 | "module": "com.netflix.rxjava:rxjava-android", 12 | "with": "io.reactivex:rxjava-android", 13 | "reason": "The rxjava group id changed", 14 | "author": "Netflix Runtime Platform", 15 | "date": "2016-04-27" 16 | }, 17 | { 18 | "module": "com.netflix.rxjava:rxjava-android-samples-build-wrapper", 19 | "with": "io.reactivex:rxjava-android-samples-build-wrapper", 20 | "reason": "The rxjava group id changed", 21 | "author": "Netflix Runtime Platform", 22 | "date": "2016-04-27" 23 | }, 24 | { 25 | "module": "com.netflix.rxjava:rxjava-apache-http", 26 | "with": "io.reactivex:rxjava-apache-http", 27 | "reason": "The rxjava group id changed", 28 | "author": "Netflix Runtime Platform", 29 | "date": "2016-04-27" 30 | }, 31 | { 32 | "module": "com.netflix.rxjava:rxjava-async-util", 33 | "with": "io.reactivex:rxjava-async-util", 34 | "reason": "The rxjava group id changed", 35 | "author": "Netflix Runtime Platform", 36 | "date": "2016-04-27" 37 | }, 38 | { 39 | "module": "com.netflix.rxjava:rxjava-clojure", 40 | "with": "io.reactivex:rxjava-clojure", 41 | "reason": "The rxjava group id changed", 42 | "author": "Netflix Runtime Platform", 43 | "date": "2016-04-27" 44 | }, 45 | { 46 | "module": "com.netflix.rxjava:rxjava-computation-expressions", 47 | "with": "io.reactivex:rxjava-computation-expressions", 48 | "reason": "The rxjava group id changed", 49 | "author": "Netflix Runtime Platform", 50 | "date": "2016-04-27" 51 | }, 52 | { 53 | "module": "com.netflix.rxjava:rxjava-contrib", 54 | "with": "io.reactivex:rxjava-contrib", 55 | "reason": "The rxjava group id changed", 56 | "author": "Netflix Runtime Platform", 57 | "date": "2016-04-27" 58 | }, 59 | { 60 | "module": "com.netflix.rxjava:rxjava-core", 61 | "with": "io.reactivex:rxjava", 62 | "reason": "The rxjava group id changed", 63 | "author": "Netflix Runtime Platform", 64 | "date": "2016-04-27" 65 | }, 66 | { 67 | "module": "com.netflix.rxjava:rxjava-debug", 68 | "with": "io.reactivex:rxjava-debug", 69 | "reason": "The rxjava group id changed", 70 | "author": "Netflix Runtime Platform", 71 | "date": "2016-04-27" 72 | }, 73 | { 74 | "module": "com.netflix.rxjava:rxjava-examples", 75 | "with": "io.reactivex:rxjava-examples", 76 | "reason": "The rxjava group id changed", 77 | "author": "Netflix Runtime Platform", 78 | "date": "2016-04-27" 79 | }, 80 | { 81 | "module": "com.netflix.rxjava:rxjava-groovy", 82 | "with": "io.reactivex:rxjava-groovy", 83 | "reason": "The rxjava group id changed", 84 | "author": "Netflix Runtime Platform", 85 | "date": "2016-04-27" 86 | }, 87 | { 88 | "module": "com.netflix.rxjava:rxjava-ios", 89 | "with": "io.reactivex:rxjava-ios", 90 | "reason": "The rxjava group id changed", 91 | "author": "Netflix Runtime Platform", 92 | "date": "2016-04-27" 93 | }, 94 | { 95 | "module": "com.netflix.rxjava:rxjava-joins", 96 | "with": "io.reactivex:rxjava-joins", 97 | "reason": "The rxjava group id changed", 98 | "author": "Netflix Runtime Platform", 99 | "date": "2016-04-27" 100 | }, 101 | { 102 | "module": "com.netflix.rxjava:rxjava-jruby", 103 | "with": "io.reactivex:rxjava-jruby", 104 | "reason": "The rxjava group id changed", 105 | "author": "Netflix Runtime Platform", 106 | "date": "2016-04-27" 107 | }, 108 | { 109 | "module": "com.netflix.rxjava:rxjava-kotlin", 110 | "with": "io.reactivex:rxjava-kotlin", 111 | "reason": "The rxjava group id changed", 112 | "author": "Netflix Runtime Platform", 113 | "date": "2016-04-27" 114 | }, 115 | { 116 | "module": "com.netflix.rxjava:rxjava-math", 117 | "with": "io.reactivex:rxjava-math", 118 | "reason": "The rxjava group id changed", 119 | "author": "Netflix Runtime Platform", 120 | "date": "2016-04-27" 121 | }, 122 | { 123 | "module": "com.netflix.rxjava:rxjava-quasar", 124 | "with": "io.reactivex:rxjava-quasar", 125 | "reason": "The rxjava group id changed", 126 | "author": "Netflix Runtime Platform", 127 | "date": "2016-04-27" 128 | }, 129 | { 130 | "module": "com.netflix.rxjava:rxjava-scala", 131 | "with": "io.reactivex:rxjava-scala", 132 | "reason": "The rxjava group id changed", 133 | "author": "Netflix Runtime Platform", 134 | "date": "2016-04-27" 135 | }, 136 | { 137 | "module": "com.netflix.rxjava:rxjava-scalaz", 138 | "with": "io.reactivex:rxjava-scalaz", 139 | "reason": "The rxjava group id changed", 140 | "author": "Netflix Runtime Platform", 141 | "date": "2016-04-27" 142 | }, 143 | { 144 | "module": "com.netflix.rxjava:rxjava-string", 145 | "with": "io.reactivex:rxjava-string", 146 | "reason": "The rxjava group id changed", 147 | "author": "Netflix Runtime Platform", 148 | "date": "2016-04-27" 149 | }, 150 | { 151 | "module": "com.netflix.rxjava:rxjava-swing", 152 | "with": "io.reactivex:rxjava-swing", 153 | "reason": "The rxjava group id changed", 154 | "author": "Netflix Runtime Platform", 155 | "date": "2016-04-27" 156 | } 157 | ], 158 | "align": [], 159 | "substitute": [], 160 | "deny": [], 161 | "exclude": [], 162 | "reject": [] 163 | } 164 | -------------------------------------------------------------------------------- /src/main/resources/replace-servlet.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "javax.servlet:servlet-api", 5 | "with" : "javax.servlet:javax.servlet-api", 6 | "reason" : "servlet-api has been replaced with javax.servlet-api", 7 | "author" : "Rob Spieldenner", 8 | "date" : "2016-06-09T17:12:34.000Z" 9 | }, 10 | { 11 | "module" : "javax.servlet:jsp-api", 12 | "with" : "javax.servlet.jsp:javax.servlet.jsp-api", 13 | "reason" : "jsp-api has been replaced with javax.servlet.jsp-api", 14 | "author" : "Rob Spieldenner", 15 | "date" : "2016-06-09T17:12:34.000Z" 16 | }, 17 | { 18 | "module" : "javax.servlet.jsp:jsp-api", 19 | "with" : "javax.servlet.jsp:javax.servlet.jsp-api", 20 | "reason" : "jsp-api has been replaced with javax.servlet.jsp-api", 21 | "author" : "Rob Spieldenner", 22 | "date" : "2016-06-09T17:12:34.000Z" 23 | }, 24 | { 25 | "module" : "javax.el:el-api", 26 | "with" : "javax.el:javax.el-api", 27 | "reason" : "el-api has been replaced with javax.el-api", 28 | "author" : "Rob Spieldenner", 29 | "date" : "2016-06-09T17:12:34.000Z" 30 | } 31 | ], 32 | "align": [], 33 | "substitute": [], 34 | "deny": [], 35 | "exclude": [], 36 | "reject": [] 37 | } 38 | -------------------------------------------------------------------------------- /src/main/resources/replace-xerces.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace" : [ 3 | { 4 | "module" : "xerces:xerces", 5 | "with" : "xerces:xercesImpl", 6 | "reason" : "The xerces artifact id changed for 2.0.0 and later", 7 | "author" : "Danny Thomas", 8 | "date" : "2016-04-26T00:00:00.000Z" 9 | } 10 | ], 11 | "align": [], 12 | "substitute": [], 13 | "deny": [], 14 | "exclude": [], 15 | "reject": [] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/substitute-log4j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [], 3 | "deny": [], 4 | "exclude": [], 5 | "reject": [], 6 | "replace": [], 7 | "substitute": [ 8 | { 9 | "module": "org.apache.logging.log4j:log4j-core:(,2.17.1]", 10 | "with": "org.apache.logging.log4j:log4j-core:2.17.2", 11 | "reason": "Log4J 2 versions prior to 2.16.0 are vulnerable to lookup injection attacks that allow RCE and DOS attacks. 2.17.2 is recommended", 12 | "author": "dannyt@netflix.com", 13 | "date": "2021-12-10" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/substitute-mimepull-1.9.8.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": [], 3 | "substitute": [ 4 | { 5 | "module": "org.jvnet.mimepull:mimepull:1.9.8", 6 | "with": "org.jvnet.mimepull:mimepull:1.9.9", 7 | "reason" : "Mimepull 1.9.8 does not exist in Maven Central but is a dependency of com.sun.xml.messaging.saaj:saaj-impl:1.5.0", 8 | "author" : "Rahul Somasunderam ", 9 | "date": "2018-10-04T17:02:57.000Z" 10 | } 11 | ], 12 | "deny": [], 13 | "reject": [], 14 | "exclude": [], 15 | "align": [] 16 | } -------------------------------------------------------------------------------- /src/main/resources/substitute-snakeyaml.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [], 3 | "deny": [], 4 | "exclude": [], 5 | "reject": [], 6 | "replace": [], 7 | "substitute": [ 8 | { 9 | "module": "org.yaml:snakeyaml:1.30", 10 | "with": "org.yaml:snakeyaml:1.29", 11 | "reason": "release 1.30 is missing 'android' (classifier) variant jar", 12 | "author": "Aubrey Chipman", 13 | "date": "2022-04-13" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/test/groovy/ResourceSchemaValidatorSpec.groovy: -------------------------------------------------------------------------------- 1 | import org.everit.json.schema.Schema 2 | import org.everit.json.schema.ValidationException 3 | import org.everit.json.schema.loader.SchemaLoader 4 | import org.json.JSONObject 5 | import org.json.JSONTokener 6 | import spock.lang.Shared 7 | import spock.lang.Specification 8 | import spock.lang.Unroll 9 | 10 | class ResourceSchemaValidatorSpec extends Specification { 11 | static final String RESOURCES_PATH = 'src' + File.separator + 'main' + File.separator + 'resources' + File.separator 12 | static 13 | final String TEST_RESOURCES_PATH = 'src' + File.separator + 'test' + File.separator + 'resources' + File.separator 14 | @Shared 15 | resourceNames 16 | @Shared 17 | testResourceNames 18 | 19 | void setupSpec() { 20 | def resourcesFolder = new File(RESOURCES_PATH) 21 | resourceNames = resourcesFolder.listFiles().collect { file -> 22 | file.name 23 | } 24 | 25 | def testResourcesFolder = new File(TEST_RESOURCES_PATH + 'rules' + File.separator) 26 | testResourceNames = testResourcesFolder.listFiles().collect { file -> 27 | file.name 28 | } 29 | } 30 | 31 | @Unroll 32 | def 'verifies resource \'#resourceName\' matches schema'() { 33 | when: 34 | def schemaName = 'valid-schema.json' 35 | 36 | then: 37 | Schema schema 38 | try { 39 | def schemaInputStream = getClass().getClassLoader().getResourceAsStream(schemaName) 40 | JSONObject rawSchema = new JSONObject(new JSONTokener(schemaInputStream)) 41 | schema = SchemaLoader.load(rawSchema) 42 | } catch (Exception e) { 43 | throw new RuntimeException("schema at '${TEST_RESOURCES_PATH + schemaName}' has a problem", e) 44 | } 45 | 46 | JSONObject rawResource 47 | try { 48 | def file = new File(RESOURCES_PATH + resourceName) 49 | def resourceInputStream = new FileInputStream(file) 50 | rawResource = new JSONObject(new JSONTokener(resourceInputStream)) 51 | } catch (Exception e) { 52 | throw new RuntimeException("resource '${resourceName}' should be valid json", e) 53 | } 54 | 55 | try { 56 | schema.validate(rawResource) 57 | } catch (ValidationException e) { 58 | def output = [e.getMessage()] 59 | e.getCausingExceptions().stream() 60 | .collect { exception -> exception.getMessage() } 61 | .forEach { message -> output.add(message) } 62 | 63 | throw new RuntimeException("\nResource ${resourceName} failed validation.\n\n" + 64 | String.join('\n', output)) 65 | } 66 | 67 | where: 68 | resourceName << resourceNames 69 | } 70 | 71 | @Unroll 72 | def 'verifies invalid resource \'#resourceName\' does not match schema'() { 73 | when: 74 | def schemaName = 'valid-schema.json' 75 | 76 | then: 77 | Schema schema 78 | try { 79 | def schemaInputStream = getClass().getClassLoader().getResourceAsStream(schemaName) 80 | JSONObject rawSchema = new JSONObject(new JSONTokener(schemaInputStream)) 81 | schema = SchemaLoader.load(rawSchema) 82 | } catch (Exception e) { 83 | throw new RuntimeException("schema at '${TEST_RESOURCES_PATH + schemaName}' has a problem", e) 84 | } 85 | 86 | when: 87 | JSONObject rawResource 88 | try { 89 | def file = new File(TEST_RESOURCES_PATH + 'rules' + File.separator + resourceName) 90 | def resourceInputStream = new FileInputStream(file) 91 | rawResource = new JSONObject(new JSONTokener(resourceInputStream)) 92 | } catch (Exception e) { 93 | throw new RuntimeException("resource '${resourceName}' should be valid json", e) 94 | } 95 | 96 | schema.validate(rawResource) 97 | 98 | then: 99 | thrown RuntimeException 100 | 101 | where: 102 | resourceName << testResourceNames 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /src/test/groovy/ResourceValidatorSpec.groovy: -------------------------------------------------------------------------------- 1 | 2 | import groovy.json.JsonSlurper 3 | import spock.lang.Shared 4 | import spock.lang.Specification 5 | import spock.lang.Unroll 6 | 7 | class ResourceValidatorSpec extends Specification { 8 | static final String RESOURCES_PATH = 'src' + File.separator + 'main' + File.separator + 'resources' + File.separator 9 | @Shared 10 | resourceNames 11 | 12 | void setupSpec() { 13 | def resourcesFolder = new File(RESOURCES_PATH) 14 | resourceNames = resourcesFolder.listFiles().collect { file -> 15 | file.name 16 | } 17 | } 18 | 19 | @Unroll 20 | def 'verifies resource \'#resourceName\' is valid json'() { 21 | when: 22 | try { 23 | def file = new File(RESOURCES_PATH + resourceName) 24 | new JsonSlurper().parse(file) 25 | } catch (Exception e) { 26 | throw new RuntimeException("resource '${resourceName}' should be valid json", e) 27 | } 28 | 29 | then: 30 | noExceptionThrown() 31 | 32 | where: 33 | resourceName << resourceNames 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/groovy/VerifyRulesAgainstMavenCentralSpec.groovy: -------------------------------------------------------------------------------- 1 | import com.google.common.base.Splitter 2 | import com.google.common.collect.ArrayListMultimap 3 | import com.google.common.collect.Multimap 4 | import nebula.plugin.resolutionrules.* 5 | import org.apache.lucene.index.MultiFields 6 | import org.apache.maven.index.ArtifactInfo 7 | import org.apache.maven.index.Indexer 8 | import org.apache.maven.index.context.IndexCreator 9 | import org.apache.maven.index.context.IndexingContext 10 | import org.apache.maven.index.updater.IndexUpdateRequest 11 | import org.apache.maven.index.updater.IndexUpdater 12 | import org.apache.maven.index.updater.WagonHelper 13 | import org.apache.maven.wagon.Wagon 14 | import org.apache.maven.wagon.events.TransferEvent 15 | import org.apache.maven.wagon.observers.AbstractTransferListener 16 | import org.codehaus.plexus.DefaultContainerConfiguration 17 | import org.codehaus.plexus.DefaultPlexusContainer 18 | import org.codehaus.plexus.PlexusConstants 19 | import org.eclipse.aether.artifact.DefaultArtifact 20 | import org.eclipse.aether.util.version.GenericVersionScheme 21 | import org.eclipse.aether.version.Version 22 | import org.gradle.testfixtures.ProjectBuilder 23 | import spock.lang.Ignore 24 | import spock.lang.Shared 25 | import spock.lang.Specification 26 | import java.util.concurrent.Executors 27 | import java.util.concurrent.TimeUnit 28 | 29 | @Ignore("Since plugin 3.0.0 we use a version range to perform alignment, which means that alignment no longer has these requirements. Keeping these tests around for future reference") 30 | class VerifyRulesAgainstMavenCentralSpec extends Specification { 31 | @Shared 32 | IndexingContext context 33 | @Shared 34 | Multimap artifactsByRule 35 | @Shared 36 | RuleSet ruleSet 37 | 38 | def setupSpec() { 39 | context = prepareIndexer() 40 | def plugin = new ResolutionRulesPlugin() 41 | plugin.apply(ProjectBuilder.builder().build()) 42 | def ruleSets = new File("src/main/resources").listFiles().collect { plugin.parseJsonFile(it) } 43 | ruleSet = RulesKt.flatten(ruleSets) 44 | artifactsByRule = artifactsByRule(context, ruleSet) 45 | } 46 | 47 | static IndexingContext prepareIndexer() { 48 | def config = new DefaultContainerConfiguration() 49 | config.setClassPathScanning(PlexusConstants.SCANNING_INDEX) 50 | def container = new DefaultPlexusContainer(config) 51 | 52 | def baseDir = new File("build/maven-central") 53 | def localCache = new File(baseDir, "cache") 54 | def indexDir = new File(baseDir, "index") 55 | def indexers = Arrays.asList(container.lookup(IndexCreator, "min")) 56 | def indexer = container.lookup(Indexer) 57 | def context = indexer.createIndexingContext("central-context", "central", localCache, indexDir, 58 | "http://repo1.maven.org/maven2", null, true, true, indexers) 59 | 60 | def indexUpdater = container.lookup(IndexUpdater) 61 | def wagon = container.lookup(Wagon, "http") 62 | def listener = new AbstractTransferListener() { 63 | @Override 64 | void transferStarted(TransferEvent transferEvent) { 65 | println transferEvent 66 | } 67 | 68 | @Override 69 | void transferCompleted(TransferEvent transferEvent) { 70 | println transferEvent 71 | } 72 | } 73 | 74 | def resourceFetcher = new WagonHelper.WagonFetcher(wagon, listener, null, null) 75 | def updateRequest = new IndexUpdateRequest(context, resourceFetcher) 76 | def updateResult = indexUpdater.fetchAndUpdateIndex(updateRequest) 77 | println "Updated index. fullUpdate: ${updateResult.fullUpdate}" 78 | return context 79 | } 80 | 81 | static Set SUPPORTED_EXTENSIONS = ["pom", "jar", "war"] 82 | 83 | static Multimap artifactsByRule(IndexingContext context, RuleSet ruleSet) { 84 | def artifactsByRule = ArrayListMultimap.create() 85 | def searcher = context.acquireIndexSearcher() 86 | def reader = searcher.getIndexReader() 87 | def liveDocs = MultiFields.getLiveDocs(reader) 88 | def maxDocs = reader.maxDoc() 89 | def fieldSplitter = Splitter.on('|') 90 | def executorService = Executors.newFixedThreadPool(Runtime.runtime.availableProcessors()) 91 | for (i in 0..maxDocs - 1) { 92 | if (liveDocs == null || liveDocs.get(i)) { 93 | def doc = reader.document(i) 94 | executorService.execute { 95 | if (doc.get(ArtifactInfo.UINFO) != null) { 96 | def uinfo = fieldSplitter.split(doc.get(ArtifactInfo.UINFO)) 97 | def groupId = uinfo[0] 98 | def artifactId = uinfo[1] 99 | def version = uinfo[2] 100 | def classifier = uinfo[3] 101 | def extension = uinfo[4] 102 | 103 | if (SUPPORTED_EXTENSIONS.contains(extension) && classifier == "NA") { 104 | def info = new ArtifactInfo("central", groupId, artifactId, version, classifier, extension) 105 | synchronized (artifactsByRule) { 106 | artifactsByRule.putAll(matchedRules(info, ruleSet)) 107 | } 108 | } 109 | } 110 | } 111 | } 112 | } 113 | executorService.shutdown() 114 | executorService.awaitTermination(2, TimeUnit.MINUTES) 115 | 116 | def classLoader = VerifyRulesAgainstMavenCentralSpec.classLoader 117 | def missingArtifacts = classLoader.getResourceAsStream("missing-artifacts-whitelist.txt").readLines().collect { 118 | new DefaultArtifact(it) 119 | } 120 | missingArtifacts.each { missingArtifact -> 121 | def info = new ArtifactInfo("missing", missingArtifact.groupId, missingArtifact.artifactId, missingArtifact.version, null, null) 122 | artifactsByRule.putAll(matchedRules(info, ruleSet)) 123 | } 124 | 125 | return artifactsByRule 126 | } 127 | 128 | static Multimap matchedRules(ArtifactInfo info, RuleSet ruleSet) { 129 | def artifactsByRule = ArrayListMultimap.create() 130 | def groupId = info.groupId 131 | def artifactId = info.artifactId 132 | String module = "$info.groupId:$info.artifactId" 133 | String moduleWithVersion = "$info.groupId:$info.artifactId:$info.version" 134 | 135 | def alignRules = ruleSet.align 136 | def moduleRules = [ruleSet.deny, ruleSet.exclude, ruleSet.reject].flatten() 137 | def moduleWithRules = [ruleSet.substitute, ruleSet.replace].flatten() 138 | 139 | alignRules.each { rule -> 140 | if (rule.ruleMatches(groupId, artifactId)) { 141 | artifactsByRule.put(rule, info) 142 | } 143 | } 144 | moduleRules.each { rule -> 145 | if (rule.module.contains(module)) { 146 | artifactsByRule.put(rule, info) 147 | } 148 | } 149 | moduleWithRules.each { rule -> 150 | if (rule.module == module || rule.with == module || rule.module == moduleWithVersion || rule.with == moduleWithVersion) { 151 | artifactsByRule.put(rule, info) 152 | } 153 | } 154 | return artifactsByRule 155 | } 156 | 157 | def 'align rules are able to align to the latest release across all artifacts'() { 158 | expect: 159 | def versionScheme = new GenericVersionScheme() 160 | def rules = artifactsByRule.keySet().findAll { it instanceof AlignRule } 161 | rules.each { AlignRule rule -> 162 | def versionsByArtifact = artifactsByRule.get(rule) 163 | .groupBy { "${it.groupId}:${it.artifactId}" } 164 | .collectEntries { key, value -> 165 | [(key): value.collect { 166 | def matchedVersion = rule.matchedVersion(it.artifactVersion.toString()) 167 | versionScheme.parseVersion(matchedVersion) 168 | }.unique()] 169 | } 170 | .each { it.value.sort() } as Map>; 171 | 172 | List lowestVersions = versionsByArtifact.collect { it.value.first() }.sort() 173 | List highestVersions = versionsByArtifact.collect { it.value.last() }.sort() 174 | 175 | // Current align rule implementation is biased towards supporting the latest version use case 176 | // We can't assume that versions have been contiguous for all time, so we verify starting with the common lowest version 177 | Version lowestCommonVersion = lowestVersions.last() 178 | Version lowestVersion = lowestVersions.first() 179 | if (lowestCommonVersion != lowestVersion) { 180 | println("Warning: Align rule $rule isn't valid for the entire history of the artifacts it covers." + 181 | " Lowest common version is $lowestCommonVersion, lowest ever version $lowestVersion") 182 | } 183 | Version highestVersion = highestVersions.last() 184 | 185 | def matchedVersions = versionsByArtifact.collectEntries { key, value -> 186 | [(key): value.findAll { it >= lowestCommonVersion }] 187 | } as Map>; 188 | 189 | def expectedVersions = matchedVersions.entrySet().first().value 190 | def errorStrings = [] 191 | matchedVersions.entrySet().each { 192 | def artifact = it.key 193 | def versions = it.value 194 | if (versions.isEmpty()) { 195 | errorStrings.add("Align rule $rule is invalid: $artifact has no versions between $lowestCommonVersion and $highestVersion") 196 | } else if (versions.last() != highestVersion) { 197 | errorStrings.add("Align rule $rule is invalid: $artifact does not have a version $highestVersion") 198 | } else if (versions != expectedVersions) { 199 | errorStrings.add("Align rule $rule is invalid: $artifact has versions $versions but expected $expectedVersions") 200 | } 201 | } 202 | 203 | assert errorStrings.size() == 0: errorStrings.join('\n') 204 | } 205 | } 206 | 207 | def 'artifacts exist for all module rules'() { 208 | expect: 209 | ruleSet.with { 210 | [deny, exclude, reject, replace, substitute].flatten().each { rule -> 211 | assert artifactsByRule.keySet().contains(rule): "No artifacts found for rule $rule" 212 | } 213 | } 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /src/test/groovy/VerifyRulesSpec.groovy: -------------------------------------------------------------------------------- 1 | import nebula.test.IntegrationSpec 2 | import spock.lang.Ignore 3 | 4 | class VerifyRulesSpec extends IntegrationSpec { 5 | def 'rules apply'() { 6 | def rulesDir = new File('src/main/resources').absoluteFile 7 | def rulesFiles = rulesDir.list() 8 | 9 | buildFile << """ 10 | apply plugin: 'java' 11 | apply plugin: 'com.netflix.nebula.resolution-rules' 12 | 13 | repositories { 14 | mavenCentral() 15 | } 16 | 17 | dependencies { 18 | implementation 'com.google.guava:guava:19.0' 19 | 20 | resolutionRules fileTree('$rulesDir').include('*.json') 21 | } 22 | """ 23 | 24 | when: 25 | def result = runTasksSuccessfully('dependencies', '--configuration', 'compileClasspath', '--debug') 26 | 27 | then: 28 | assert rulesFiles.size() > 0 29 | result.standardOutput.contains('a dependency rules source') 30 | } 31 | 32 | def 'jackson pr1'() { 33 | def rulesDir = new File('src/main/resources').absoluteFile 34 | def rulesFiles = rulesDir.list() 35 | 36 | buildFile << """ 37 | apply plugin: 'java' 38 | apply plugin: 'com.netflix.nebula.resolution-rules' 39 | 40 | repositories { 41 | mavenCentral() 42 | } 43 | 44 | dependencies { 45 | implementation 'com.fasterxml.jackson.core:jackson-core:2.9.0.pr1' 46 | implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.6' 47 | 48 | resolutionRules fileTree('$rulesDir').include('align-jackson.json') 49 | } 50 | """ 51 | 52 | when: 53 | def result = runTasksSuccessfully('dependencies', '--configuration', 'compileClasspath', '-d') 54 | 55 | then: 56 | assert rulesFiles.size() > 0 57 | result.standardOutput.contains('com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.6 -> 2.9.0.pr1\n') 58 | } 59 | 60 | def 'jackson databind 2.8.8.1 first'() { 61 | def rulesDir = new File('src/main/resources').absoluteFile 62 | def rulesFiles = rulesDir.list() 63 | 64 | buildFile << """ 65 | apply plugin: 'java' 66 | apply plugin: 'com.netflix.nebula.resolution-rules' 67 | 68 | repositories { 69 | mavenCentral() 70 | } 71 | 72 | dependencies { 73 | implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.8.1' 74 | implementation 'com.fasterxml.jackson.core:jackson-core:2.8.2' 75 | 76 | resolutionRules fileTree('$rulesDir').include('align-jackson.json') 77 | } 78 | """ 79 | 80 | when: 81 | def result = runTasksSuccessfully('dependencies', '--configuration', 'compileClasspath') 82 | 83 | then: 84 | assert rulesFiles.size() > 0 85 | result.standardOutput.contains('com.fasterxml.jackson.core:jackson-databind:2.8.8.1\n') 86 | result.standardOutput.contains('com.fasterxml.jackson.core:jackson-core:2.8.2 -> 2.8.8\n') 87 | } 88 | 89 | def 'jackson databind 2.8.8.1 last'() { 90 | def rulesDir = new File('src/main/resources').absoluteFile 91 | def rulesFiles = rulesDir.list() 92 | 93 | buildFile << """ 94 | apply plugin: 'java' 95 | apply plugin: 'com.netflix.nebula.resolution-rules' 96 | 97 | repositories { 98 | mavenCentral() 99 | } 100 | 101 | dependencies { 102 | implementation 'com.fasterxml.jackson.core:jackson-core:2.8.2' 103 | implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.8.1' 104 | 105 | resolutionRules fileTree('$rulesDir').include('align-jackson.json') 106 | } 107 | """ 108 | 109 | when: 110 | def result = runTasksSuccessfully('dependencies', '--configuration', 'compileClasspath') 111 | 112 | then: 113 | assert rulesFiles.size() > 0 114 | result.standardOutput.contains('com.fasterxml.jackson.core:jackson-databind:2.8.8.1\n') 115 | result.standardOutput.contains('com.fasterxml.jackson.core:jackson-core:2.8.2 -> 2.8.8\n') 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /src/test/resources/missing-artifacts-whitelist.txt: -------------------------------------------------------------------------------- 1 | org.codehaus.groovy:groovy-backports-compat23:2.4.0-beta-1 2 | io.netty:netty-transport-native-epoll:5.0.0.Alpha1 3 | io.netty:netty-testsuite-osgi:5.0.0.Alpha1 4 | io.netty:netty-testsuite:5.0.0.Alpha1 5 | io.netty:netty-handler-proxy:5.0.0.Alpha1 6 | io.netty:netty-resolver-dns:5.0.0.Alpha1 7 | io.netty:netty-codec-xml:5.0.0.Alpha1 8 | io.netty:netty-codec-stomp:5.0.0.Alpha1 9 | io.netty:netty-codec-mqtt:5.0.0.Alpha1 10 | io.netty:netty-codec-http2:5.0.0.Alpha1 11 | io.netty:netty-codec-haproxy:5.0.0.Alpha1 12 | io.netty:netty-codec-dns:5.0.0.Alpha1 13 | io.netty:netty-resolver:5.0.0.Alpha1 14 | org.slf4j:slf4j-android:1.7.2 15 | org.slf4j:slf4j-android:1.7.3 16 | org.slf4j:slf4j-android:1.7.4 17 | org.slf4j:slf4j-android:1.7.5 18 | org.bouncycastle:bctsp-jdk14:1.46 19 | org.bouncycastle:bctsp-jdk15:1.46 20 | org.bouncycastle:bctsp-jdk16:1.46 21 | com.google.protobuf:protobuf-java:3.1.0-build2 22 | com.google.protobuf:protobuf-java-util:3.1.0-build2 23 | com.google.protobuf:protobuf-parent:3.1.0-build2 24 | org.jvnet.mimepull:mimepull:1.9.8 25 | org.jvnet.mimepull:mimepull:1.9.9 -------------------------------------------------------------------------------- /src/test/resources/rules/invalid-duplicate-key.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [], 3 | "align": [], 4 | "deny": [], 5 | "exclude": [], 6 | "reject": [], 7 | "replace": [], 8 | "substitute": [] 9 | } -------------------------------------------------------------------------------- /src/test/resources/rules/invalid-extra-align-key.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-foo", 5 | "group": "io.foo", 6 | "includes": [], 7 | "excludes": [], 8 | "reason": "Best reason", 9 | "author": "author ", 10 | "date": "2020-02-20", 11 | "extraKey": [] 12 | } 13 | ], 14 | "deny": [], 15 | "exclude": [], 16 | "reject": [], 17 | "replace": [], 18 | "substitute": [] 19 | } 20 | -------------------------------------------------------------------------------- /src/test/resources/rules/invalid-extra-key.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [], 3 | "deny": [], 4 | "exclude": [], 5 | "reject": [], 6 | "replace": [], 7 | "substitute": [], 8 | "extraKey": [] 9 | } 10 | -------------------------------------------------------------------------------- /src/test/resources/rules/invalid-missing-align-key.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [ 3 | { 4 | "name": "align-foo", 5 | "group": "io.foo", 6 | "includes": [], 7 | "excludes": [], 8 | "author": "author ", 9 | "date": "2020-02-20" 10 | } 11 | ], 12 | "deny": [], 13 | "exclude": [], 14 | "reject": [], 15 | "replace": [], 16 | "substitute": [] 17 | } 18 | -------------------------------------------------------------------------------- /src/test/resources/rules/invalid-missing-key.json: -------------------------------------------------------------------------------- 1 | { 2 | "align": [], 3 | "deny": [], 4 | "reject": [], 5 | "replace": [], 6 | "substitute": [] 7 | } 8 | -------------------------------------------------------------------------------- /src/test/resources/valid-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema", 3 | "title": "Resolution Rule", 4 | "description": "validation of resolution rules", 5 | "type": "object", 6 | "properties": { 7 | "align": { 8 | "type": "array", 9 | "items": { 10 | "type": "object", 11 | "properties": { 12 | "name": { 13 | "type": "string" 14 | }, 15 | "group": { 16 | "type": "string" 17 | }, 18 | "includes": { 19 | "type": "array" 20 | }, 21 | "excludes": { 22 | "type": "array" 23 | }, 24 | "match": { 25 | "type": "string" 26 | }, 27 | "ruleSet": { 28 | "type": "string" 29 | }, 30 | "reason": { 31 | "type": "string" 32 | }, 33 | "author": { 34 | "type": "string" 35 | }, 36 | "date": { 37 | "type": "string" 38 | } 39 | }, 40 | "required": [ 41 | "includes", 42 | "excludes", 43 | "reason", 44 | "author", 45 | "date", 46 | "group" 47 | ], 48 | "additionalProperties": false 49 | }, 50 | "uniqueItems": true 51 | }, 52 | "deny": { 53 | "type": "array" 54 | }, 55 | "exclude": { 56 | "type": "array" 57 | }, 58 | "reject": { 59 | "type": "array" 60 | }, 61 | "replace": { 62 | "type": "array" 63 | }, 64 | "substitute": { 65 | "type": "array" 66 | } 67 | }, 68 | "required": [ 69 | "align", 70 | "deny", 71 | "exclude", 72 | "reject", 73 | "replace", 74 | "substitute" 75 | ], 76 | "additionalProperties": false 77 | } --------------------------------------------------------------------------------