[
  {
    "path": ".asf.yaml",
    "content": "# \n#  Licensed to the Apache Software Foundation (ASF) under one or more\n#  contributor license agreements.  See the NOTICE file distributed with\n#  this work for additional information regarding copyright ownership.\n#  The ASF licenses this file to You under the Apache License, Version 2.0\n#  (the \"License\"); you may not use this file except in compliance with\n#  the License.  You may obtain a copy of the License at\n# \n#       http://www.apache.org/licenses/LICENSE-2.0\n# \n#  Unless required by applicable law or agreed to in writing, software\n#  distributed under the License is distributed on an \"AS IS\" BASIS,\n#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#  See the License for the specific language governing permissions and\n#  limitations under the License.\n#\n# see https://s.apache.org/asfyaml\ngithub:\n  description: \"Apache Maven Shade Plugin\"\n  homepage: https://maven.apache.org/plugins/maven-shade-plugin/\n  labels:\n    - java\n    - build-management\n    - maven-plugins\n    - maven-shade-plugin\n    - maven\n  enabled_merge_buttons:\n    squash: true\n    merge: false\n    rebase: true\n  autolink_jira:\n    - MSHADE\n  protected_branches:\n    master: {}\n  pull_requests:\n    del_branch_on_merge: true\n  features:\n    issues: true\nnotifications:\n  commits: commits@maven.apache.org\n  issues: issues@maven.apache.org\n  pullrequests: issues@maven.apache.org\n"
  },
  {
    "path": ".git-blame-ignore-revs",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n# Change maven code style\n80d78cc62109585f14659d509211a14d36867a78\n\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/BUG.yml",
    "content": "#\n#  Licensed to the Apache Software Foundation (ASF) under one or more\n#  contributor license agreements.  See the NOTICE file distributed with\n#  this work for additional information regarding copyright ownership.\n#  The ASF licenses this file to You under the Apache License, Version 2.0\n#  (the \"License\"); you may not use this file except in compliance with\n#  the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#  Unless required by applicable law or agreed to in writing, software\n#  distributed under the License is distributed on an \"AS IS\" BASIS,\n#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#  See the License for the specific language governing permissions and\n#  limitations under the License.\n#\n\n# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema\n\nname: Bug Report\ndescription: File a bug report\nlabels: [\"bug\"]\n\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this bug report.     \n\n        Simple fixes in single PRs do not require issues. \n  \n        **Do you use the latest project version?**\n\n  - type: input\n    id: version\n    attributes:\n      label: Affected version\n    validations:\n      required: true\n\n  - type: textarea\n    id: message\n    attributes:\n      label: Bug description\n    validations:\n      required: true\n\n\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/FEATURE.yml",
    "content": "#\n#  Licensed to the Apache Software Foundation (ASF) under one or more\n#  contributor license agreements.  See the NOTICE file distributed with\n#  this work for additional information regarding copyright ownership.\n#  The ASF licenses this file to You under the Apache License, Version 2.0\n#  (the \"License\"); you may not use this file except in compliance with\n#  the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#  Unless required by applicable law or agreed to in writing, software\n#  distributed under the License is distributed on an \"AS IS\" BASIS,\n#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#  See the License for the specific language governing permissions and\n#  limitations under the License.\n#\n\n# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema\n\nname: Feature request\ndescription: File a proposal for new feature, improvement\nlabels: [\"enhancement\"]\n\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this new feature, improvement proposal.\n\n  - type: textarea\n    id: message\n    attributes:\n      label: New feature, improvement proposal\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "#\n#  Licensed to the Apache Software Foundation (ASF) under one or more\n#  contributor license agreements.  See the NOTICE file distributed with\n#  this work for additional information regarding copyright ownership.\n#  The ASF licenses this file to You under the Apache License, Version 2.0\n#  (the \"License\"); you may not use this file except in compliance with\n#  the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#  Unless required by applicable law or agreed to in writing, software\n#  distributed under the License is distributed on an \"AS IS\" BASIS,\n#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#  See the License for the specific language governing permissions and\n#  limitations under the License.\n#\n\n# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser\n\nblank_issues_enabled: false\n\ncontact_links:\n\n  - name: Project Mailing Lists\n    url: https://maven.apache.org/mailing-lists.html\n    about: Please ask a question or discuss here\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "#\n#  Licensed to the Apache Software Foundation (ASF) under one or more\n#  contributor license agreements.  See the NOTICE file distributed with\n#  this work for additional information regarding copyright ownership.\n#  The ASF licenses this file to You under the Apache License, Version 2.0\n#  (the \"License\"); you may not use this file except in compliance with\n#  the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#  Unless required by applicable law or agreed to in writing, software\n#  distributed under the License is distributed on an \"AS IS\" BASIS,\n#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#  See the License for the specific language governing permissions and\n#  limitations under the License.\n#\n# Please see the documentation for all configuration options:\n# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates\n#\nversion: 2\nupdates:\n  - package-ecosystem: maven\n    directory: \"/\"\n    schedule:\n      interval: daily\n      time: '04:00'\n    ignore:\n      # ignore Java 8+ dependencies\n      - dependency-name: org.mockito:mockito-core\n        versions:\n          - \">= 3.0\"\n      - dependency-name: org.apache.commons:commons-lang3\n        versions:\n          - \">= 3.9\"\n      - dependency-name: commons-io:commons-io\n        versions:\n          - \">= 2.7\"\n      # Ignore Maven 3.2.1+\n      - dependency-name: org.apache.maven.plugin-testing:maven-plugin-testing-tools\n        versions:\n          - \">=3.2.0\"\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n      time: '04:00'"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "Following this checklist to help us incorporate your \ncontribution quickly and easily:\n\n - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MSHADE) filed \n       for the change (usually before you start working on it).  Trivial changes like typos do not \n       require a JIRA issue.  Your pull request should address just this issue, without \n       pulling in other changes.\n - [ ] Each commit in the pull request should have a meaningful subject line and body.\n - [ ] Format the pull request title like `[MSHADE-XXX] - Fixes bug in ApproximateQuantiles`,\n       where you replace `MSHADE-XXX` with the appropriate JIRA issue. Best practice\n       is to use the JIRA issue title in the pull request title and in the first line of the \n       commit message.\n - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.\n - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will \n       be performed on your pull request automatically.\n - [ ] You have run the integration tests successfully (`mvn -Prun-its clean verify`).\n\nIf your pull request is about ~20 lines of code you don't need to sign an\n[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure\nplease ask on the developers list.\n\nTo make clear that you license your contribution under \nthe [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)\nyou have to acknowledge this by using the following check-box.\n\n - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)\n\n - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).\n\n"
  },
  {
    "path": ".github/release-drafter.yml",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n_extends: maven-gh-actions-shared\ntag-template: maven-shade-plugin-$RESOLVED_VERSION\n"
  },
  {
    "path": ".github/workflows/maven-verify.yml",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\nname: Verify\n\non:\n  push:\n  pull_request:\n\njobs:\n  build:\n    name: Verify\n    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4\n\n"
  },
  {
    "path": ".github/workflows/pr-automation.yml",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\nname: PR Automation\non:\n  pull_request_target:\n    types:\n      - closed\n\njobs:\n  pr-automation:\n    name: PR Automation\n    uses: apache/maven-gh-actions-shared/.github/workflows/pr-automation.yml@v4\n"
  },
  {
    "path": ".github/workflows/release-drafter.yml",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n   \nname: Release Drafter\non:\n  push:\n    branches:\n      - master\njobs:\n   update_release_draft:\n      uses: apache/maven-gh-actions-shared/.github/workflows/release-drafter.yml@v4\n"
  },
  {
    "path": ".github/workflows/stale.yml",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\nname: Stale\n\non:\n  schedule:\n    - cron: '27 2 * * *'\n  issue_comment:\n    types: [ 'created' ]\n\njobs:\n  stale:\n    uses: 'apache/maven-gh-actions-shared/.github/workflows/stale.yml@v4'\n"
  },
  {
    "path": ".gitignore",
    "content": "target/\n.project\n.classpath\n.settings/\n.svn/\nbin/\n# Intellij\n*.ipr\n*.iml\n.idea\nout/\n.DS_Store\n/bootstrap\n/dependencies.xml\n.java-version\n.checkstyle\n"
  },
  {
    "path": "Jenkinsfile",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nasfMavenTlpPlgnBuild()\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "<!---\n Licensed to the Apache Software Foundation (ASF) under one or more\n contributor license agreements.  See the NOTICE file distributed with\n this work for additional information regarding copyright ownership.\n The ASF licenses this file to You under the Apache License, Version 2.0\n (the \"License\"); you may not use this file except in compliance with\n the License.  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\nContributing to [Apache Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/)\n======================\n\n[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/apache/maven.svg?label=License)][license]\n[![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven.plugins/maven-shade-plugin.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.maven.plugins/maven-shade-plugin)\n[![Reproducible Builds](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/jvm-repo-rebuild/reproducible-central/master/content/org/apache/maven/plugins/maven-shade-plugin/badge.json)](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/maven/plugins/maven-shade-plugin/README.md)\n[![Jenkins Status](https://img.shields.io/jenkins/s/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-shade-plugin/job/master.svg?)][build]\n[![Jenkins tests](https://img.shields.io/jenkins/t/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-shade-plugin/job/master.svg?)][test-results]\n\n\nYou have found a bug, or you have an idea for a cool new feature? Contributing\ncode is a great way to give something back to the open source community. Before\nyou dig right into the code, there are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of\nthings.\n\nGetting Started\n---------------\n\n+ Make sure you have a [GitHub account](https://github.com/signup/free).\n+ If you're planning to implement a new feature, it makes sense to discuss your changes \n  on the [dev list][ml-list] first. \n  This way you can make sure you're not wasting your time on something that isn't \n  considered to be in Apache Maven's scope.\n+ Submit a ticket for your issue, assuming one does not already exist.\n  + Clearly describe the issue, including steps to reproduce when it is a bug.\n  + Make sure you fill in the earliest version that you know has the issue.\n+ Fork the repository on GitHub.\n\nMaking and Submitting Changes\n--------------\n\nWe accept Pull Requests via GitHub. The [developer mailing list][ml-list] is the\nmain channel of communication for contributors.  \nThere are some guidelines which will make applying PRs easier for us:\n+ Create a topic branch from where you want to base your work (this is usually the master branch).\n  Push your changes to a topic branch in your fork of the repository.\n+ Make commits of logical units.\n+ Respect the original code style: by using the same [codestyle][code-style],\n  patches should only highlight the actual difference, not being disturbed by any formatting issues:\n  + Only use spaces for indentation.\n  + Create minimal diffs - disable on save actions like reformat source code or organize imports. \n    If you feel the source code should be reformatted, create a separate PR for this change.\n  + Check for unnecessary whitespace with `git diff --check` before committing.\n+ Make sure you have added the necessary tests (JUnit/IT) for your changes.\n+ Run all the tests with `mvn -Prun-its verify` to assure nothing else was accidentally broken.\n+ Submit a pull request to the repository in the Apache organization.\n\nIf you plan to contribute on a regular basis, please consider filing a [contributor license agreement][cla].\n\nDeveloper Tips\n--------------\n\nIf your machine is sufficiently powerful, and you want to parallelize the IT execution to validate the build\nbefore a PR you can set the concurrency in `MAVEN_OPTS`:\n\n````\nMAVEN_OPTS=-Dinvoker.parallelThreads=2 mvn verify -Prun-its\n````\n\nYou can also run a single IT test using:\n\n````\nmvn verify -Prun-its -Dinvoker.test=myitproject\n````\n\nAdditional Resources\n--------------------\n\n+ [Contributing patches](https://maven.apache.org/guides/development/guide-maven-development.html#Creating_and_submitting_a_patch)\n+ [Contributor License Agreement][cla]\n+ [General GitHub documentation](https://help.github.com/)\n+ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)\n+ [Apache Maven X Account](https://x.com/ASFMavenProject)\n+ [Apache Maven Bluesky Account](https://bsky.app/profile/maven.apache.org)\n+ [Apache Maven Mastodon Account](https://mastodon.social/deck/@ASFMavenProject@fosstodon.org)\n+ [Slack channel for regular contributors](https://infra.apache.org/slack.html)\n\n\n[license]: https://www.apache.org/licenses/LICENSE-2.0\n[ml-list]: https://maven.apache.org/mailing-lists.html\n[code-style]: https://maven.apache.org/developers/conventions/code.html\n[cla]: https://www.apache.org/licenses/#clas\n[maven-wiki]: https://cwiki.apache.org/confluence/display/MAVEN/Index\n[test-results]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-shade-plugin/job/master/lastCompletedBuild/testReport/\n[build]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-shade-plugin/job/master/\n"
  },
  {
    "path": "pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements. See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership. The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License. You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied. See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins</groupId>\n    <artifactId>maven-plugins</artifactId>\n    <version>47</version>\n    <relativePath />\n  </parent>\n\n  <artifactId>maven-shade-plugin</artifactId>\n  <version>3.6.3-SNAPSHOT</version>\n  <packaging>maven-plugin</packaging>\n\n  <name>Apache Maven Shade Plugin</name>\n  <description>Repackages the project classes together with their dependencies into a single uber-jar, optionally renaming classes\n    or removing unused classes.</description>\n\n  <contributors>\n    <contributor>\n      <name>Trask Stalnaker</name>\n    </contributor>\n    <contributor>\n      <name>Anthony Dahanne</name>\n    </contributor>\n    <contributor>\n      <name>Fabiano Cipriano de Oliveira</name>\n    </contributor>\n    <contributor>\n      <name>Markus Karg</name>\n    </contributor>\n    <contributor>\n      <name>Torsten Curdt</name>\n    </contributor>\n  </contributors>\n\n  <prerequisites>\n    <maven>3.6.3</maven>\n  </prerequisites>\n\n  <scm>\n    <connection>scm:git:https://github.com/apache/maven-shade-plugin.git</connection>\n    <developerConnection>scm:git:https://github.com/apache/maven-shade-plugin.git</developerConnection>\n    <tag>HEAD</tag>\n    <url>https://github.com/apache/maven-shade-plugin/tree/${project.scm.tag}</url>\n  </scm>\n  <issueManagement>\n    <system>GitHub</system>\n    <url>https://github.com/apache/maven-shade-plugin/issues/</url>\n  </issueManagement>\n  <ciManagement>\n    <system>Jenkins</system>\n    <url>https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-shade-plugin/</url>\n  </ciManagement>\n  <distributionManagement>\n    <site>\n      <id>apache.website</id>\n      <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url>\n    </site>\n  </distributionManagement>\n\n  <properties>\n    <mavenVersion>3.9.15</mavenVersion>\n    <javaVersion>8</javaVersion>\n    <currentVersion>${project.version}</currentVersion>\n    <asmVersion>9.9.1</asmVersion>\n    <slf4j.version>1.7.36</slf4j.version>\n    <project.build.outputTimestamp>2026-03-02T10:52:20Z</project.build.outputTimestamp>\n  </properties>\n\n  <dependencyManagement>\n    <dependencies>\n      <dependency>\n        <groupId>junit</groupId>\n        <artifactId>junit</artifactId>\n        <version>4.13.2</version>\n      </dependency>\n      <dependency>\n        <groupId>org.hamcrest</groupId>\n        <artifactId>hamcrest</artifactId>\n        <version>3.0</version>\n      </dependency>\n      <dependency>\n        <groupId>org.hamcrest</groupId>\n        <artifactId>hamcrest-core</artifactId>\n        <version>3.0</version>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <dependencies>\n    <!-- Needed dependencies -->\n    <dependency>\n      <groupId>org.ow2.asm</groupId>\n      <artifactId>asm</artifactId>\n      <version>${asmVersion}</version>\n    </dependency>\n    <dependency>\n      <groupId>org.ow2.asm</groupId>\n      <artifactId>asm-commons</artifactId>\n      <version>${asmVersion}</version>\n    </dependency>\n    <dependency>\n      <groupId>org.jdom</groupId>\n      <artifactId>jdom2</artifactId>\n      <version>2.0.6.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.vafer</groupId>\n      <artifactId>jdependency</artifactId>\n      <version>2.15</version>\n    </dependency>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-utils</artifactId>\n      <version>3.6.1</version>\n    </dependency>\n\n    <!-- Maven (provided) -->\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-plugin-api</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-model</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-core</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-artifact</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-resolver-provider</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.plugin-tools</groupId>\n      <artifactId>maven-plugin-annotations</artifactId>\n      <version>3.15.2</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>javax.inject</groupId>\n      <artifactId>javax.inject</artifactId>\n      <version>1</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-api</artifactId>\n      <version>${slf4j.version}</version>\n      <scope>provided</scope>\n    </dependency>\n\n    <!-- Test -->\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.hamcrest</groupId>\n      <artifactId>hamcrest</artifactId>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.xmlunit</groupId>\n      <artifactId>xmlunit-legacy</artifactId>\n      <version>2.11.0</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.mockito</groupId>\n      <artifactId>mockito-core</artifactId>\n      <version>4.11.0</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.eclipse.sisu</groupId>\n      <artifactId>org.eclipse.sisu.plexus</artifactId>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-simple</artifactId>\n      <version>${slf4j.version}</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.plugin-testing</groupId>\n      <artifactId>maven-plugin-testing-harness</artifactId>\n      <version>3.5.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.rat</groupId>\n          <artifactId>apache-rat-plugin</artifactId>\n          <configuration>\n            <excludes combine.children=\"append\">\n              <!-- Can't add license header otherwise the tests will fail. -->\n              <exclude>src/it/mrm/repository/services-resource-transformer/*/META-INF/services/org.apache.maven.Shade</exclude>\n              <exclude>src/it/mrm/repository/services-resource-transformer-with-reloc-includes-excludes/*/META-INF/services/org.apache.maven.shade</exclude>\n              <exclude>rel-path-test-files/**</exclude>\n              <exclude>src/it/projects/dep-reduced-pom-use-base-version/repo/org/apache/maven/its/shade/drp/a/0.1-SNAPSHOT/_maven.repositories</exclude>\n              <exclude>src/it/projects/mshade-123/sample.txt</exclude>\n              <exclude>src/it/projects/MSHADE-133/src/main/resources/myConfig.yml</exclude>\n              <exclude>src/it/projects/rerun-with-reloc/src/main/resources/some-ordinary-resource.txt</exclude>\n              <exclude>src/it/projects/rerun-without-reloc/src/main/resources/some-ordinary-resource.txt</exclude>\n              <exclude>src/it/projects/MSHADE-182/src/main/resources/META-INF/services/relocateme.Service</exclude>\n              <exclude>src/it/projects/MSHADE-390-sisu-index/**</exclude>\n            </excludes>\n          </configuration>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-enforcer-plugin</artifactId>\n          <executions>\n            <execution>\n              <id>enforce-bytecode-version</id>\n              <configuration>\n                <rules>\n                  <enforceBytecodeVersion>\n                    <ignoreClasses>\n                      <ignoreClass>module-info</ignoreClass>\n                    </ignoreClasses>\n                    <excludes>\n                      <exclude>org.vafer:jdependency</exclude>\n                    </excludes>\n                  </enforceBytecodeVersion>\n                </rules>\n              </configuration>\n            </execution>\n          </executions>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n\n    <plugins>\n      <plugin>\n        <groupId>org.eclipse.sisu</groupId>\n        <artifactId>sisu-maven-plugin</artifactId>\n      </plugin>\n    </plugins>\n  </build>\n\n  <profiles>\n    <profile>\n      <id>run-its</id>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-jar-plugin</artifactId>\n            <executions>\n              <execution>\n                <goals>\n                  <goal>test-jar</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-invoker-plugin</artifactId>\n            <configuration>\n              <goals>\n                <goal>package</goal>\n              </goals>\n              <showErrors>true</showErrors>\n              <projectsDirectory>src/it/projects</projectsDirectory>\n              <settingsFile>src/it/mrm/settings.xml</settingsFile>\n              <extraArtifacts>\n                <extraArtifact>org.apache.maven.plugins:maven-shade-plugin:${project.version}:test-jar</extraArtifact>\n              </extraArtifacts>\n            </configuration>\n          </plugin>\n          <plugin>\n            <groupId>org.codehaus.mojo</groupId>\n            <artifactId>mrm-maven-plugin</artifactId>\n            <version>1.7.1</version>\n            <configuration>\n              <repositories>\n                <mockRepo>\n                  <source>src/it/mrm/repository</source>\n                  <!-- due to on the fly created jars -->\n                  <cloneTo>target/mock-repo</cloneTo>\n                </mockRepo>\n                <proxyRepo />\n              </repositories>\n            </configuration>\n            <executions>\n              <execution>\n                <goals>\n                  <goal>start</goal>\n                  <goal>stop</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n  </profiles>\n</project>\n"
  },
  {
    "path": "src/it/MSHADE-321_respectDrpFlag/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drp</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-321</name>\n  <description>\n    Test that dependency-reduced-pom is created with respect to flag only.\n    Shade plugin starts to create DRP even if the artifact has been renamed because of the configuration\n  </description>\n\n  <repositories>\n    <repository>\n      <id>shade-it</id>\n      <url>file://${basedir}/repo</url>\n      <releases>\n        <checksumPolicy>ignore</checksumPolicy>\n      </releases>\n      <snapshots>\n        <enabled>false</enabled>\n      </snapshots>\n    </repository>\n  </repositories>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drp</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1</version>\n    </dependency>\n\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>\n              <finalName>shade_321</finalName>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <createDependencyReducedPom>true</createDependencyReducedPom>\n              <dependencyReducedPomLocation>target/shade_321.xml</dependencyReducedPomLocation>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MSHADE-321_respectDrpFlag/repo/org/apache/maven/its/shade/drp/a/0.1/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drp</groupId>\r\n  <artifactId>a</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n</project>\r\n"
  },
  {
    "path": "src/it/MSHADE-321_respectDrpFlag/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport groovy.xml.XmlParser\n\nFile jarRenamedFile = new File(basedir, \"target/shade_321.jar\")\nassert jarRenamedFile.isFile()\n\nFile pomFile = new File(basedir, \"target/shade_321.xml\")\nassert pomFile.isFile()\n\ndef ns = new groovy.xml.Namespace(\"http://maven.apache.org/POM/4.0.0\")\ndef pom = new XmlParser().parse(pomFile)\n\nassert pom[ns.modelVersion].size() == 1\nassert pom[ns.dependencies][ns.dependency].size() == 0\n"
  },
  {
    "path": "src/it/mrm/repository/MSHADE-247/mshade-247-one-0.1-sources.jar/org/apache/maven/its/shade/csj/Test.java",
    "content": "package org.apache.maven.its.shade.csj;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Test\n{\n\n}\n"
  },
  {
    "path": "src/it/mrm/repository/MSHADE-247/mshade-247-one-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <groupId>org.apache.maven.its.shade.csj</groupId>\r\n  <artifactId>mshade-247-one</artifactId>\r\n  <version>0.1</version>\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/MSHADE-247/mshade-247-two-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <groupId>org.apache.maven.its.shade.csj</groupId>\r\n  <artifactId>mshade-247-two</artifactId>\r\n  <version>0.1</version>\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/artifact-includes-excludes/a-0.1.jar/a.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/artifact-includes-excludes/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.aie</groupId>\r\n  <artifactId>a</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/artifact-includes-excludes/b-0.2.jar/b.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/artifact-includes-excludes/b-0.2.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.aie</groupId>\r\n  <artifactId>b</artifactId>\r\n  <version>0.2</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drp</groupId>\r\n  <artifactId>a</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom/b-0.2-client.jar/b-client.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom/b-0.2.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drp</groupId>\r\n  <artifactId>b</artifactId>\r\n  <version>0.2</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom/c-1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drp</groupId>\r\n  <artifactId>c</artifactId>\r\n  <version>1</version>\r\n  <packaging>pom</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-artifactset-provided-excludes/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpape</groupId>\n  <artifactId>a</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n</project>\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-artifactset-provided-excludes/b-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpape</groupId>\n  <artifactId>b</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drpape</groupId>\n      <artifactId>c</artifactId>\n      <version>0.1</version>\n    </dependency>\n  </dependencies>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n</project>\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-artifactset-provided-excludes/c-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpape</groupId>\n  <artifactId>c</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n</project>\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-artifactset-provided-excludes/d-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpape</groupId>\n  <artifactId>d</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drpape</groupId>\n      <artifactId>e</artifactId>\n      <version>0.1</version>\n    </dependency>\n  </dependencies>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n</project>\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-artifactset-provided-excludes/e-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpape</groupId>\n  <artifactId>e</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n</project>\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-exclusions/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drpe</groupId>\r\n  <artifactId>a</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n\r\n  <dependencies>\r\n    <dependency>\r\n      <groupId>org.apache.maven.its.shade.drpe</groupId>\r\n      <artifactId>b</artifactId>\r\n      <version>0.2</version>\r\n    </dependency>\r\n    <dependency>\r\n      <groupId>org.apache.maven.its.shade.drpe</groupId>\r\n      <artifactId>b</artifactId>\r\n      <classifier>alt</classifier>\r\n      <version>0.2</version>\r\n    </dependency>\r\n  </dependencies>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-exclusions/b-0.2-alt.jar/b-alt.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-exclusions/b-0.2.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drpe</groupId>\r\n  <artifactId>b</artifactId>\r\n  <version>0.2</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n\r\n  <dependencies>\r\n    <dependency>\r\n      <groupId>org.apache.maven.its.shade.drpe</groupId>\r\n      <artifactId>c</artifactId>\r\n      <version>1</version>\r\n    </dependency>\r\n  </dependencies>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-exclusions/c-1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drpe</groupId>\r\n  <artifactId>c</artifactId>\r\n  <version>1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-unique/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drp</groupId>\r\n  <artifactId>a</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-unique/b-0.2.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drp</groupId>\r\n  <artifactId>b</artifactId>\r\n  <version>0.2</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-unique/c-1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.drp</groupId>\r\n  <artifactId>c</artifactId>\r\n  <version>1</version>\r\n  <packaging>pom</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-use-base-version/a-0.1-20130115.024354-82.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drp</groupId>\n  <artifactId>a</artifactId>\n  <version>0.1-SNAPSHOT</version>\n  <packaging>jar</packaging>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n</project>\n"
  },
  {
    "path": "src/it/mrm/repository/dep-reduced-pom-use-base-version/maven-metadata.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<metadata modelVersion=\"1.1.0\">\n  <groupId>org.apache.maven.its.shade.drp</groupId>\n  <artifactId>a</artifactId>\n  <version>0.1-SNAPSHOT</version>\n  <versioning>\n    <snapshot>\n      <localCopy>true</localCopy>\n    </snapshot>\n    <lastUpdated>20130115024354</lastUpdated>\n    <snapshotVersions>\n      <snapshotVersion>\n        <extension>jar</extension>\n        <value>0.1-20130115.024354-82</value>\n        <updated>20130115024354</updated>\n      </snapshotVersion>\n      <snapshotVersion>\n        <extension>pom</extension>\n        <value>0.1-20130115.024354-82</value>\n        <updated>20130115024354</updated>\n      </snapshotVersion>\n    </snapshotVersions>\n  </versioning>\n</metadata>\n"
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/a-0.1.jar/META-INF/maven/org.apache.maven.its.shade.fac/a/pom.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\nversion=0.1\ngroupId=org.apache.maven.its.shade.fac\nartifactId=a\n"
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/a-0.1.jar/a.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/a-0.1.jar/org/a.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/a-0.1.jar/org/apache/a.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/a-0.1.jar/org/apache/maven/a.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.fac</groupId>\r\n  <artifactId>a</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/b-0.1-client.jar/META-INF/maven/org.apache.maven.its.shade.fac/b/pom.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\nversion=0.1\ngroupId=org.apache.maven.its.shade.fac\nartifactId=b\n"
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/b-0.1-client.jar/b.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/b-0.1-client.jar/org/apache/b.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/b-0.1-client.jar/org/apache/maven/b/b.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/b-0.1-client.jar/org/apache/maven/b.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/b-0.1-client.jar/org/b.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/filter-artifact-contents/b-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.fac</groupId>\r\n  <artifactId>b</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/non-runtime-scope-excluded/compile-1.0.jar/compile.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/non-runtime-scope-excluded/compile-1.0.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.nrse</groupId>\r\n  <artifactId>compile</artifactId>\r\n  <version>1.0</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <name>MSHADE</name>\r\n  <description>\r\n    Test that dependencies not matching runtime scope are automatically excluded.\r\n  </description>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/non-runtime-scope-excluded/provided-1.0.jar/provided.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/non-runtime-scope-excluded/provided-1.0.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.nrse</groupId>\r\n  <artifactId>provided</artifactId>\r\n  <version>1.0</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <name>MSHADE</name>\r\n  <description>\r\n    Test that dependencies not matching runtime scope are automatically excluded.\r\n  </description>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/non-runtime-scope-excluded/runtime-1.0.jar/runtime.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/non-runtime-scope-excluded/runtime-1.0.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.nrse</groupId>\r\n  <artifactId>runtime</artifactId>\r\n  <version>1.0</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <name>MSHADE</name>\r\n  <description>\r\n    Test that dependencies not matching runtime scope are automatically excluded.\r\n  </description>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/non-runtime-scope-excluded/test-1.0.jar/test.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/mrm/repository/non-runtime-scope-excluded/test-1.0.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.nrse</groupId>\r\n  <artifactId>test</artifactId>\r\n  <version>1.0</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <name>MSHADE</name>\r\n  <description>\r\n    Test that dependencies not matching runtime scope are automatically excluded.\r\n  </description>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/plugin-descriptor-relocation/comp-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.cdr</groupId>\r\n  <artifactId>comp</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n\r\n  <build>\r\n    <resources>\r\n      <resource>\r\n        <directory>.</directory>\r\n        <includes>\r\n          <include>pom.xml</include>\r\n          <include>src/**</include>\r\n        </includes>\r\n      </resource>\r\n      <resource>\r\n        <directory>src/main/resources</directory>\r\n      </resource>\r\n    </resources>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/services-resource-transformer/one-0.1.jar/META-INF/services/org.apache.maven.Shade",
    "content": "one # NOTE: No newline terminates this line/file"
  },
  {
    "path": "src/it/mrm/repository/services-resource-transformer/one-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.srt</groupId>\r\n  <artifactId>one</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/services-resource-transformer/two-0.1.jar/META-INF/services/org.apache.maven.Shade",
    "content": "two # NOTE: No newline terminates this line/file"
  },
  {
    "path": "src/it/mrm/repository/services-resource-transformer/two-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.srt</groupId>\r\n  <artifactId>two</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n\r\n  <distributionManagement>\r\n    <repository>\r\n      <id>maven-core-it</id>\r\n      <url>file:///${basedir}/repo</url>\r\n    </repository>\r\n  </distributionManagement>\r\n</project>\r\n"
  },
  {
    "path": "src/it/mrm/repository/services-resource-transformer-with-reloc-includes-excludes/mshade-237-one-0.1.jar/META-INF/services/org.apache.maven.shade",
    "content": "org.apache.maven.its.shade.One"
  },
  {
    "path": "src/it/mrm/repository/services-resource-transformer-with-reloc-includes-excludes/mshade-237-one-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.srt</groupId>\n  <artifactId>mshade-237-one</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n</project>\n"
  },
  {
    "path": "src/it/mrm/repository/services-resource-transformer-with-reloc-includes-excludes/mshade-237-two-0.1.jar/META-INF/services/org.apache.maven.shade",
    "content": "org.apache.maven.its.shade.Two"
  },
  {
    "path": "src/it/mrm/repository/services-resource-transformer-with-reloc-includes-excludes/mshade-237-two-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.srt</groupId>\n  <artifactId>mshade-237-two</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n</project>\n"
  },
  {
    "path": "src/it/mrm/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<settings>\n  <mirrors>\n    <mirror>\n      <id>mrm-maven-plugin</id>\n      <name>Mock Repository Manager</name>\n      <url>@mrm.repository.url@</url>\n      <mirrorOf>*</mirrorOf>\n    </mirror>\n  </mirrors>\n  <profiles>\n    <profile>\n      <id>it-repo</id>\n      <repositories>\n        <repository>\n          <id>snapshots</id>\n          <url>@mrm.repository.url@</url>\n          <releases>\n            <enabled>true</enabled>\n            <checksumPolicy>ignore</checksumPolicy>\n            <updatePolicy>never</updatePolicy>\n          </releases>\n          <snapshots>\n            <enabled>true</enabled>\n            <checksumPolicy>ignore</checksumPolicy>\n            <updatePolicy>always</updatePolicy>\n          </snapshots>\n        </repository>\n      </repositories>\n      <pluginRepositories>\n        <pluginRepository>\n          <id>snapshots</id>\n          <url>@mrm.repository.url@</url>\n          <releases>\n            <enabled>true</enabled>\n            <checksumPolicy>ignore</checksumPolicy>\n            <updatePolicy>never</updatePolicy>\n          </releases>\n          <snapshots>\n            <enabled>true</enabled>\n            <checksumPolicy>ignore</checksumPolicy>\n            <updatePolicy>always</updatePolicy>\n          </snapshots>\n        </pluginRepository>\n      </pluginRepositories>\n    </profile>\n  </profiles>\n  <activeProfiles>\n    <activeProfile>it-repo</activeProfile>\n  </activeProfiles>\n</settings>\n"
  },
  {
    "path": "src/it/projects/MSHADE-105/bundle/pom.xml",
    "content": "<?xml version='1.0' encoding='UTF-8'?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.its.shade.mr</groupId>\n    <artifactId>MSHADE-105-ROOT</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>MSHADE-105-BUNDLE</artifactId>\n\n  <packaging>bundle</packaging>\n  <dependencies>\n    <dependency>\n      <groupId>${project.groupId}</groupId>\n      <artifactId>MSHADE-105-SHADED-JAR</artifactId>\n      <version>${project.version}</version>\n    </dependency>\n  </dependencies>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.felix</groupId>\n        <artifactId>maven-bundle-plugin</artifactId>\n        <version>5.1.9</version>\n        <extensions>true</extensions>\n        <configuration>\n          <instructions>\n            <Embed-Dependency>*</Embed-Dependency>\n          </instructions>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-105/bundle/src/main/java/test/Dummy.java",
    "content": "package test;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\nimport internal.io.IOUtils;\n\nimport java.io.IOException;\nimport java.io.InputStream;\n\npublic class Dummy {\n    public static void dump(InputStream in) throws IOException {\n        IOUtils.copy(in, System.out);\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-105/pom.xml",
    "content": "<?xml version='1.0' encoding='UTF-8'?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.its.shade.mr</groupId>\n  <artifactId>MSHADE-105-ROOT</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n  <modules>\n    <module>shaded-jar</module>\n    <module>bundle</module>\n  </modules>\n\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-105/shaded-jar/pom.xml",
    "content": "<?xml version='1.0' encoding='UTF-8'?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.its.shade.mr</groupId>\n    <artifactId>MSHADE-105-ROOT</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>MSHADE-105-SHADED-JAR</artifactId>\n  <dependencies>\n    <dependency>\n      <groupId>commons-io</groupId>\n      <artifactId>commons-io</artifactId>\n      <version>2.14.0</version>\n    </dependency>\n  </dependencies>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.commons.io</pattern>\n                  <shadedPattern>internal.io</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-105/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.jar.*;\nimport java.util.*;\n\nJarFile jarFile = new JarFile( new File( basedir, \"bundle/target/MSHADE-105-BUNDLE-1.0-SNAPSHOT.jar\" ) );\n\nManifest mf = jarFile.getManifest();\njarFile.close();\n\nString importPackage = mf.getMainAttributes().getValue( \"Import-Package\" );\nSystem.out.println(\"importPackage:\"+importPackage);\n\nif ( importPackage.indexOf(\"org.apache.commons.io\" ) >=0 )\n{\n    throw new IllegalStateException( \"MANIFEST.MF has Import-Package entry with org.apache.commons.io\" );\n}\n\n\nreturn true;\n"
  },
  {
    "path": "src/it/projects/MSHADE-114/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade</groupId>\r\n  <artifactId>MSHADE-114</artifactId>\r\n  <version>1.0-SNAPSHOT</version>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <executions>\r\n          <execution>\r\n            <id>shade</id>\r\n            <phase>package</phase>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <transformers>\r\n                <transformer\r\n                  implementation=\"org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer\">\r\n                  <resource>.so</resource>\r\n                </transformer>\r\n                <transformer\r\n                  implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\r\n                  <manifestEntries>\r\n                    <Premain-Class>org.jacoco.agent.${rt}.JacocoAgent</Premain-Class>\r\n                  </manifestEntries>\r\n                </transformer>\r\n              </transformers>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-133/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade</groupId>\r\n  <artifactId>MSHADE-133</artifactId>\r\n  <version>1.0-SNAPSHOT</version>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <executions>\r\n          <execution>\r\n            <id>shade</id>\r\n            <phase>package</phase>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <transformers>\r\n                <transformer\r\n                  implementation=\"org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer\">\r\n                  <resources>\r\n                    <resource>myConfig.yml</resource>\r\n                    <resource>logback.xml</resource>\r\n                  </resources>\r\n                </transformer>\r\n              </transformers>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-133/src/main/resources/logback.xml",
    "content": "<?xml version='1.0'?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n"
  },
  {
    "path": "src/it/projects/MSHADE-133/src/main/resources/myConfig.yml",
    "content": ""
  },
  {
    "path": "src/it/projects/MSHADE-133/verify.groovy",
    "content": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements.  See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership.  The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License.  You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied.  See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\n\r\n def jarFile = new java.util.jar.JarFile( new File( basedir, \"/target/MSHADE-133-1.0-SNAPSHOT.jar\" ) )\r\n assert jarFile.getJarEntry(\"myComfig.yml\") == null\r\n assert jarFile.getJarEntry(\"logback.xml\") == null\r\n "
  },
  {
    "path": "src/it/projects/MSHADE-155/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.fnb</groupId>\n  <artifactId>shadedartifactid</artifactId>\n  <version>1.0</version>\n  \n  <name>MSHADE-155 :: using shadedArtifactId</name>\n  <description>\n    Test that the shaded artifact has the correct\n    artifactId which is defined by shadedArtifactId.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>create-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedArtifactId>${project.artifactId}-special</shadedArtifactId>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-155/src/main/resources/META-INF/ejb-jar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n"
  },
  {
    "path": "src/it/projects/MSHADE-155/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nFile targetFolder = new File ( basedir, \"target\" )\n\nFile originalArtifact = new File ( targetFolder, \"shadedartifactid-1.0.jar\" )\nassert originalArtifact.isFile()\n\nFile shadedArtifact = new File ( targetFolder, \"shadedartifactid-special-1.0-shaded.jar\")\nassert shadedArtifact.isFile()\n"
  },
  {
    "path": "src/it/projects/MSHADE-182/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.apache.maven.its.shade</groupId>\n    <artifactId>MSHADE-182</artifactId>\n    <version>1.0-SNAPSHOT</version>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <id>shade</id>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <relocations>\n                                <relocation>\n                                    <pattern>relocateme</pattern>\n                                    <shadedPattern>relocated</shadedPattern>\n                                </relocation>\n                            </relocations>\n                            <transformers>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\">\n                                </transformer>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-182/src/main/resources/META-INF/services/relocateme.Service",
    "content": "relocateme.ServiceImpl\n"
  },
  {
    "path": "src/it/projects/MSHADE-182/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n*/\n\ndef jarFile = new java.util.jar.JarFile(new File(basedir, \"/target/MSHADE-182-1.0-SNAPSHOT.jar\"))\ndef jarEntry = jarFile.getJarEntry(\"META-INF/services/relocated.Service\")\ndef content = new java.io.BufferedReader(new java.io.InputStreamReader(jarFile.getInputStream(jarEntry)))\nassert content.readLine() == \"relocated.ServiceImpl\"\n"
  },
  {
    "path": "src/it/projects/MSHADE-183/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mt</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-183</name>\n  <description>\n    Test that reproduces the issue described in MSHADE-183.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <!-- dummy dependency to test interaction of multiple manifests -->\n      <groupId>org.apache.maven.plugins</groupId>\n      <artifactId>maven-shade-plugin</artifactId>\n      <version>@project.version@</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-install-plugin</artifactId>\n        <version>@version.maven-install-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n        <configuration>\n          <archive>\n            <manifest>\n              <mainClass>org.apache.maven.Main</mainClass>\n            </manifest>\n            <manifestEntries>\n              <Test-Entry>FAILED</Test-Entry>\n              <Original-Entry>PASSED</Original-Entry>\n            </manifestEntries>\n          </archive>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                  <mainClass>org.apache.maven.Shade</mainClass>\n                  <manifestEntries>\n                    <Test-Entry>PASSED</Test-Entry>\n                    <Implementation-Build></Implementation-Build>\n                  </manifestEntries>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-183/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\n// NOTE: We deliberately use JarInputStream and not JarFile here!\nJarInputStream jarStream = new JarInputStream( new FileInputStream( new File( basedir, \"target/test-1.0.jar\" ) ) );\nManifest mf = jarStream.getManifest();\njarStream.close();\n\nif ( mf == null )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF is missing\" );\n}\n\nif ( !\"PASSED\".equals( mf.getMainAttributes().getValue( \"Test-Entry\" ) ) )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF is incomplete\" );\n}\n\nif ( !\"PASSED\".equals( mf.getMainAttributes().getValue( \"Original-Entry\" ) ) )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF is incomplete\" );\n}\n\nif ( !\"org.apache.maven.Shade\".equals( mf.getMainAttributes().getValue( \"Main-Class\" ) ) )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF is incomplete\" );\n}\nif ( null != mf.getMainAttributes().getValue( \"Implementation-Build\" ) )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF Implementation-Build content is not null as expected. (\" + mf.getMainAttributes().entrySet() + \")\" );\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-185/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\r\n# or more contributor license agreements.  See the NOTICE file\r\n# distributed with this work for additional information\r\n# regarding copyright ownership.  The ASF licenses this file\r\n# to you under the Apache License, Version 2.0 (the\r\n# \"License\"); you may not use this file except in compliance\r\n# with the License.  You may obtain a copy of the License at\r\n# \r\n#   http://www.apache.org/licenses/LICENSE-2.0\r\n# \r\n# Unless required by applicable law or agreed to in writing,\r\n# software distributed under the License is distributed on an\r\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n# KIND, either express or implied.  See the License for the\r\n# specific language governing permissions and limitations\r\n# under the License.\r\n\r\ninvoker.java.version = 9-\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-185/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>test.shade</groupId>\n  <artifactId>system-dep</artifactId>\n  <packaging>jar</packaging>\n  <version>1.0.0-SNAPSHOT</version>\n  <dependencies>\n    <dependency>\n      <groupId>jline</groupId>\n      <artifactId>jline</artifactId>\n      <version>2.12</version>\n    </dependency>\n    <dependency>\n      <groupId>com.sun</groupId>\n      <artifactId>tools</artifactId>\n      <version>1.6</version>\n      <scope>system</scope>\n      <systemPath>${java.home}/../lib/tools.jar</systemPath>\n      <optional>true</optional>\n    </dependency>\n  </dependencies>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>@project.groupId@</groupId>\n        <artifactId>@project.artifactId@</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <createDependencyReducedPom>true</createDependencyReducedPom>\n              <createSourcesJar>true</createSourcesJar>\n              <artifactSet>\n                <includes>\n                  <include>jline:jline</include>\n                </includes>\n              </artifactSet>\n              <relocations>\n                <relocation>\n                  <pattern>jline</pattern>\n                  <shadedPattern>org.crsh.console.jline</shadedPattern>\n                </relocation>\n              </relocations> \n           </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n\n"
  },
  {
    "path": "src/it/projects/MSHADE-185/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport groovy.xml.XmlSlurper;\n\nFile pomFile = new File( basedir, \"dependency-reduced-pom.xml\" );\nassert pomFile.isFile()\n\ndef project = new XmlSlurper().parse( pomFile )\n\nassert project.dependencies.dependency[0].artifactId == 'tools'\nassert project.dependencies.dependency[0].groupId == 'com.sun'\nassert project.dependencies.dependency[0].version == '1.6'\nassert project.dependencies.dependency[0].scope == 'system'\n// Check that the dependency-reduced pom does not have expand properties in \n// dependencies. They should be left untouched.\nassert project.dependencies.dependency[0].systemPath == '${java.home}/../lib/tools.jar'\n"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\r\n# or more contributor license agreements.  See the NOTICE file\r\n# distributed with this work for additional information\r\n# regarding copyright ownership.  The ASF licenses this file\r\n# to you under the Apache License, Version 2.0 (the\r\n# \"License\"); you may not use this file except in compliance\r\n# with the License.  You may obtain a copy of the License at\r\n# \r\n#   http://www.apache.org/licenses/LICENSE-2.0\r\n# \r\n# Unless required by applicable law or agreed to in writing,\r\n# software distributed under the License is distributed on an\r\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n# KIND, either express or implied.  See the License for the\r\n# specific language governing permissions and limitations\r\n# under the License.\r\n\r\ninvoker.goals=clean package\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/one/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <parent>\r\n    <groupId>org.apache.maven.its.shade.pp</groupId>\r\n    <artifactId>mshade-232</artifactId>\r\n    <version>1.0-SNAPSHOT</version>\r\n  </parent>\r\n\r\n  <artifactId>one</artifactId>\r\n\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/one/src/main/resources/org/apache/maven/plugins/shade/its/Message.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\r\n# or more contributor license agreements.  See the NOTICE file\r\n# distributed with this work for additional information\r\n# regarding copyright ownership.  The ASF licenses this file\r\n# to you under the Apache License, Version 2.0 (the\r\n# \"License\"); you may not use this file except in compliance\r\n# with the License.  You may obtain a copy of the License at\r\n# \r\n#   http://www.apache.org/licenses/LICENSE-2.0\r\n# \r\n# Unless required by applicable law or agreed to in writing,\r\n# software distributed under the License is distributed on an\r\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n# KIND, either express or implied.  See the License for the\r\n# specific language governing permissions and limitations\r\n# under the License.\r\n\r\none = one\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/one/src/main/resources/org/apache/maven/plugins/shade/its/Message_nl.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\r\n# or more contributor license agreements.  See the NOTICE file\r\n# distributed with this work for additional information\r\n# regarding copyright ownership.  The ASF licenses this file\r\n# to you under the Apache License, Version 2.0 (the\r\n# \"License\"); you may not use this file except in compliance\r\n# with the License.  You may obtain a copy of the License at\r\n# \r\n#   http://www.apache.org/licenses/LICENSE-2.0\r\n# \r\n# Unless required by applicable law or agreed to in writing,\r\n# software distributed under the License is distributed on an\r\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n# KIND, either express or implied.  See the License for the\r\n# specific language governing permissions and limitations\r\n# under the License.\r\n\r\none = een\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.pp</groupId>\r\n  <artifactId>mshade-232</artifactId>\r\n  <version>1.0-SNAPSHOT</version>\r\n  <packaging>pom</packaging>\r\n\r\n  <properties>\r\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r\n  </properties>\r\n\r\n\r\n  <dependencyManagement>\r\n    <dependencies>\r\n      <dependency>\r\n        <groupId>org.apache.maven.its.shade.pp</groupId>\r\n        <artifactId>one</artifactId>\r\n        <version>${project.version}</version>\r\n      </dependency>\r\n    </dependencies>\r\n  </dependencyManagement>\r\n\r\n  <modules>\r\n    <module>one</module>\r\n    <module>two</module>\r\n  </modules>\r\n\r\n</project>"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/two/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <parent>\r\n    <groupId>org.apache.maven.its.shade.pp</groupId>\r\n    <artifactId>mshade-232</artifactId>\r\n    <version>1.0-SNAPSHOT</version>\r\n  </parent>\r\n\r\n  <artifactId>two</artifactId>\r\n\r\n  <dependencies>\r\n    <dependency>\r\n      <groupId>org.apache.maven.its.shade.pp</groupId>\r\n      <artifactId>one</artifactId>\r\n    </dependency>\r\n  </dependencies>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <executions>\r\n          <execution>\r\n            <id>attach-shade</id>\r\n            <phase>package</phase>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <shadedArtifactAttached>false</shadedArtifactAttached>\r\n              <transformers>\r\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ResourceBundleAppendingTransformer\">\r\n                  <basename>org/apache/maven/plugins/shade/its/Message</basename>\r\n                </transformer>\r\n              </transformers>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/two/src/main/resources/org/apache/maven/plugins/shade/its/Message.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\r\n# or more contributor license agreements.  See the NOTICE file\r\n# distributed with this work for additional information\r\n# regarding copyright ownership.  The ASF licenses this file\r\n# to you under the Apache License, Version 2.0 (the\r\n# \"License\"); you may not use this file except in compliance\r\n# with the License.  You may obtain a copy of the License at\r\n# \r\n#   http://www.apache.org/licenses/LICENSE-2.0\r\n# \r\n# Unless required by applicable law or agreed to in writing,\r\n# software distributed under the License is distributed on an\r\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n# KIND, either express or implied.  See the License for the\r\n# specific language governing permissions and limitations\r\n# under the License.\r\n\r\ntwo = two\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/two/src/main/resources/org/apache/maven/plugins/shade/its/Message_nl.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\r\n# or more contributor license agreements.  See the NOTICE file\r\n# distributed with this work for additional information\r\n# regarding copyright ownership.  The ASF licenses this file\r\n# to you under the Apache License, Version 2.0 (the\r\n# \"License\"); you may not use this file except in compliance\r\n# with the License.  You may obtain a copy of the License at\r\n# \r\n#   http://www.apache.org/licenses/LICENSE-2.0\r\n# \r\n# Unless required by applicable law or agreed to in writing,\r\n# software distributed under the License is distributed on an\r\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n# KIND, either express or implied.  See the License for the\r\n# specific language governing permissions and limitations\r\n# under the License.\r\n\r\ntwo = twee\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-232_ResourceBundleAppendingTransformer/verify.groovy",
    "content": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements.  See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership.  The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License.  You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied.  See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\n\r\ndef jarFile = new java.util.jar.JarFile(new File(basedir, \"two/target/two-1.0-SNAPSHOT.jar\"))\r\ndef jarEntry = jarFile.getJarEntry(\"org/apache/maven/plugins/shade/its/Message.properties\")\r\ndef props = new Properties(); \r\nprops.load(jarFile.getInputStream(jarEntry));\r\nassert props.one == 'one'\r\nassert props.two == 'two'\r\n\r\njarEntry = jarFile.getJarEntry(\"org/apache/maven/plugins/shade/its/Message_nl.properties\")\r\nprops = new Properties(); \r\nprops.load(jarFile.getInputStream(jarEntry));\r\nassert props.one == 'een'\r\nassert props.two == 'twee'\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-239_finalName-attachments/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.fns</groupId>\r\n  <artifactId>artifactId</artifactId>\r\n  <version>version</version>\r\n\r\n  <url>https://issues.apache.org/jira/browse/MSHADE-239</url>\r\n  \r\n  <properties>\r\n    <some-other-crap>crapola</some-other-crap>\r\n  </properties>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <executions>\r\n          <execution>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <finalName>${project.artifactId}-${project.version}-${some-other-crap}-exe</finalName>\r\n              <createSourcesJar>true</createSourcesJar>\r\n              <shadedSourcesContent>true</shadedSourcesContent>\r\n              <shadedArtifactAttached>true</shadedArtifactAttached>\r\n              <shadedClassifierName>exe</shadedClassifierName>\r\n              <shadeTestJar>true</shadeTestJar>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-239_finalName-attachments/verify.groovy",
    "content": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements.  See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership.  The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License.  You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied.  See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\n\r\nassert new File( basedir, 'target/artifactId-version-crapola-exe.jar' ).exists() : \"target/artifactId-version-crapola-exe.jar doesn't exist\"\r\nassert new File( basedir, 'target/artifactId-version-crapola-exe-sources.jar' ).exists() : \"target/artifactId-version-crapola-exe-sources.jar doesn't exist\"\r\nassert new File( basedir, 'target/artifactId-version-crapola-exe-tests.jar' ).exists() : \"target/artifactId-version-crapola-exe-tests.jar doesn't exist\"\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-240_reloc-mavenfiles/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.plugins.shade.its</groupId>\r\n  <artifactId>mshade240</artifactId>\r\n  <version>1.0-SNAPSHOT</version>\r\n\r\n  <url>https://issues.apache.org/jira/browse/MSHADE-240</url>\r\n  \r\n  <dependencies>\r\n    <dependency>\r\n      <groupId>org.apache.maven</groupId>\r\n      <artifactId>maven-core</artifactId>\r\n      <version>3.0</version>\r\n    </dependency>\r\n  </dependencies>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <executions>\r\n          <execution>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <shadedArtifactAttached>false</shadedArtifactAttached>\r\n              <relocations>\r\n                <relocation>\r\n                  <pattern>META-INF/maven</pattern>\r\n                  <shadedPattern>META-INF/shade/maven</shadedPattern>\r\n                  <excludes>\r\n                    <exclude>META-INF/maven/${project.groupId}/${project.artifactId}/pom.*</exclude>\r\n                  </excludes>\r\n                </relocation>\r\n              </relocations>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-240_reloc-mavenfiles/verify.groovy",
    "content": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements.  See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership.  The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License.  You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied.  See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\n\r\ndef jarFile = new java.util.jar.JarFile( new File( basedir, \"target/mshade240-1.0-SNAPSHOT.jar\" ) )\r\ntry \r\n{\r\n  assert null != jarFile.getJarEntry( \"META-INF/maven/org.apache.maven.plugins.shade.its/mshade240/pom.properties\" )\r\n  assert null != jarFile.getJarEntry( \"META-INF/maven/org.apache.maven.plugins.shade.its/mshade240/pom.xml\" )\r\n  assert null != jarFile.getJarEntry( \"META-INF/shade/maven/org.apache.maven/maven-core/pom.properties\" )\r\n  assert null != jarFile.getJarEntry( \"META-INF/shade/maven/org.apache.maven/maven-core/pom.xml\" )\r\n\r\n  assert null == jarFile.getJarEntry( \"META-INF/shade/maven/org.apache.maven.plugins.shade.its/mshade240/pom.properties\" )\r\n  assert null == jarFile.getJarEntry( \"META-INF/shade/maven/org.apache.maven.plugins.shade.its/mshade240/pom.xml\" )\r\n  assert null == jarFile.getJarEntry( \"META-INF/maven/org.apache.maven/maven-core/pom.properties\" )\r\n  assert null == jarFile.getJarEntry( \"META-INF/maven/org.apache.maven/maven-core/pom.xml\" )\r\n}\r\nfinally \r\n{\r\n  jarFile.close()\r\n}\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-247/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <groupId>org.apache.maven.its.shade.csj</groupId>\r\n  <artifactId>mshade-247</artifactId>\r\n  <version>1.0</version>\r\n  <url>https://issues.apache.org/jira/browse/MSHADE-247</url>\r\n  <description>\r\n    Test that setting createSourcesJar to true does not fail the build when no sources Jar is available.\r\n  </description>\r\n\r\n  <dependencies>\r\n    <dependency>\r\n      <groupId>org.apache.maven.its.shade.csj</groupId>\r\n      <artifactId>mshade-247-one</artifactId>\r\n      <version>0.1</version>\r\n    </dependency>\r\n    <dependency>\r\n      <groupId>org.apache.maven.its.shade.csj</groupId>\r\n      <artifactId>mshade-247-two</artifactId>\r\n      <version>0.1</version>\r\n    </dependency>\r\n  </dependencies>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <executions>\r\n          <execution>\r\n            <id>shade</id>\r\n            <phase>package</phase>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <createSourcesJar>true</createSourcesJar>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-258_module_relocation/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <groupId>org.apache.maven.its.shade.csj</groupId>\r\n  <artifactId>mshade-258</artifactId>\r\n  <version>1.0-SNAPSHOT</version>\r\n  <url>https://issues.apache.org/jira/browse/MSHADE-258</url>\r\n  <description>\r\n    RemappingClassAdapter is deprecated and throws an exception with ASM 6.0 beta\r\n  </description>\r\n\r\n  <dependencies>\r\n    <dependency>\r\n      <groupId>org.ow2.asm</groupId>\r\n      <artifactId>asm</artifactId>\r\n      <version>@asmVersion@</version>\r\n    </dependency>\r\n  </dependencies>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <executions>\r\n          <execution>\r\n            <id>shade</id>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <relocations>\r\n                <relocation>\r\n                  <pattern>org.objectweb.asm</pattern>\r\n                  <shadedPattern>org.shaded.objectweb.asm</shadedPattern>\r\n                </relocation>\r\n              </relocations>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-258_module_relocation/verify.groovy",
    "content": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements.  See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership.  The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License.  You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied.  See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\n\r\ndef buildLog = new File ( basedir , \"build.log\" )\r\nassert buildLog.text.contains( \"[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.\" )\r\n\r\ndef jarFile = new java.util.jar.JarFile( new File( basedir, \"target/mshade-258-1.0-SNAPSHOT.jar\" ) )\r\ntry \r\n{\r\n  assert null == jarFile.getJarEntry( \"module-info.class\" )\r\n}\r\nfinally \r\n{\r\n  jarFile.close()\r\n}\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-260-reloc-serialized-lambda/README.txt",
    "content": "# Serialized Lambda Relocation Test\n\nThis integration test verifies that the maven-shade-plugin correctly rewrites\nserialized lambda metadata when relocating classes.\n\n## Background\n\nWhen a lambda expression or method reference uses a `Serializable` functional\ninterface, the Java compiler generates a `SerializedLambda` object that contains\nmetadata about the lambda's implementation class. This metadata includes the\nclass name, which must be rewritten during shading to reflect the relocated\npackage structure.\n\n## Test Structure\n\n- **MapFunction.java** - A `Serializable` functional interface\n- **Main.java** - Uses a method reference (`processor::process`) that creates\n  a serialized lambda\n- **Processor.java** - Contains the method used as a method reference\n- **DataHolder.java** - Simple data class passed through the lambda\n\n## Configuration\n\nThe test uses the `<shadeSerializedLambda>true</shadeSerializedLambda>` option:\n\n```xml\n<relocation>\n    <pattern>org.apache.maven.its.shade.reloc.lambda</pattern>\n    <shadedPattern>org.apache.maven.its.shade.reloc.shaded.lambda</shadedPattern>\n    <shadeSerializedLambda>true</shadeSerializedLambda>\n</relocation>\n```\n\n## What the Test Verifies\n\n1. All classes are relocated from `org.apache.maven.its.shade.reloc.lambda` to\n   `org.apache.maven.its.shade.reloc.shaded.lambda`\n2. The original package paths do NOT exist in the shaded JAR\n3. Most importantly: The serialized lambda metadata (in the bytecode's constant\n   pool) references the shaded package, not the original\n\n## Running the Test\n\n```bash\ncd /path/to/maven-shade-plugin\nmvn verify -Prun-its -Dinvoker.test=reloc-serialized-lambda\n```\n\n## Expected Behavior\n\nAfter shading:\n- `Main.class` should be at `org/apache/maven/its/shade/reloc/shaded/lambda/Main.class`\n- The bytecode should NOT contain references to the original package path\n  `org/apache/maven/its/shade/reloc/lambda/Processor`\n- All lambda metadata should use the shaded path\n  `org/apache/maven/its/shade/reloc/shaded/lambda/Processor`\n"
  },
  {
    "path": "src/it/projects/MSHADE-260-reloc-serialized-lambda/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# Lambdas were introduced in Java 8\ninvoker.java.version = 1.8+\n\n# Run package goal to trigger shade\ninvoker.goals = clean package\n"
  },
  {
    "path": "src/it/projects/MSHADE-260-reloc-serialized-lambda/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.reloc</groupId>\n  <artifactId>serialized-lambda</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>Serialized Lambda Relocation Test</name>\n  <description>\n    Test that serialized lambda metadata is properly relocated when shading.\n    This test uses a Serializable functional interface with a method reference\n    to ensure the lambda's captured class information is rewritten.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.maven.its.shade.reloc.lambda</pattern>\n                  <shadedPattern>org.apache.maven.its.shade.reloc.shaded.lambda</shadedPattern>\n                  <shadeSerializedLambda>true</shadeSerializedLambda>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-260-reloc-serialized-lambda/src/main/java/org/apache/maven/its/shade/reloc/lambda/DataHolder.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.its.shade.reloc.lambda;\n\n/**\n * A simple data class (record) used to demonstrate serialized lambda relocation.\n */\npublic class DataHolder {\n    private final String value;\n\n    public DataHolder(String value) {\n        this.value = value;\n    }\n\n    public String getValue() {\n        return value;\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-260-reloc-serialized-lambda/src/main/java/org/apache/maven/its/shade/reloc/lambda/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.its.shade.reloc.lambda;\n\n/**\n * Main class that uses a method reference with a Serializable functional interface.\n * When compiled, this creates a serialized lambda that captures class metadata.\n */\npublic class Main {\n    public static void main(String[] args) {\n        Processor processor = new Processor();\n        DataHolder data = new DataHolder(\"test\");\n        \n        // This method reference creates a serialized lambda\n        String result = transform(data, processor::process);\n        System.out.println(result);\n    }\n\n    public static String transform(DataHolder value, MapFunction<DataHolder, String> mapper) {\n        return mapper.map(value);\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-260-reloc-serialized-lambda/src/main/java/org/apache/maven/its/shade/reloc/lambda/MapFunction.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.its.shade.reloc.lambda;\n\nimport java.io.Serializable;\n\n/**\n * A serializable functional interface that will cause lambdas/method references\n * to have their class information stored in the serialized lambda metadata.\n */\n@FunctionalInterface\npublic interface MapFunction<T, R> extends Serializable {\n    R map(T t);\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-260-reloc-serialized-lambda/src/main/java/org/apache/maven/its/shade/reloc/lambda/Processor.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.its.shade.reloc.lambda;\n\n/**\n * Processor class that contains a method used as a method reference.\n */\npublic class Processor {\n    public String process(DataHolder data) {\n        return \"Processed: \" + data.getValue();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-260-reloc-serialized-lambda/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.util.jar.*\n\n// Path to the shaded JAR\nFile jarFile = new File(basedir, \"target/serialized-lambda-1.0.jar\")\nassert jarFile.exists() : \"Shaded JAR not found: ${jarFile}\"\n\nJarFile jar = new JarFile(jarFile)\n\n// Check 1: Verify shaded classes exist (with relocated package)\ndef shadedClasses = [\n    \"org/apache/maven/its/shade/reloc/shaded/lambda/Main.class\",\n    \"org/apache/maven/its/shade/reloc/shaded/lambda/Processor.class\",\n    \"org/apache/maven/its/shade/reloc/shaded/lambda/DataHolder.class\",\n    \"org/apache/maven/its/shade/reloc/shaded/lambda/MapFunction.class\"\n]\n\nshadedClasses.each { path ->\n    assert jar.getEntry(path) != null : \"Expected shaded class not found: ${path}\"\n}\n\n// Check 2: Verify original classes do NOT exist (they should be relocated)\ndef originalClasses = [\n    \"org/apache/maven/its/shade/reloc/lambda/Main.class\",\n    \"org/apache/maven/its/shade/reloc/lambda/Processor.class\",\n    \"org/apache/maven/its/shade/reloc/lambda/DataHolder.class\",\n    \"org/apache/maven/its/shade/reloc/lambda/MapFunction.class\"\n]\n\noriginalClasses.each { path ->\n    assert jar.getEntry(path) == null : \"Original class should have been relocated: ${path}\"\n}\n\n// Check 3: Read the Main class bytes and verify serialized lambda metadata is relocated\ndef mainEntry = jar.getJarEntry(\"org/apache/maven/its/shade/reloc/shaded/lambda/Main.class\")\nif (mainEntry != null) {\n    def is = jar.getInputStream(mainEntry)\n    def baos = new ByteArrayOutputStream()\n    def buffer = new byte[1024]\n    int len\n    while ((len = is.read(buffer)) != -1) {\n        baos.write(buffer, 0, len)\n    }\n    is.close()\n    \n    // Convert class bytes to string for pattern searching\n    // The serialized lambda metadata should contain the SHADED package, not original\n    def classContent = new String(baos.toByteArray(), \"ISO-8859-1\")\n    \n    // Look for the SerializedLambda bootstrap method marker\n    // This appears in the bytecode when lambdas are used\n    if (classContent.contains(\"SerializedLambda\")) {\n        // If we have SerializedLambda, verify the implementation class reference\n        // The implementation class should point to the shaded package\n        // Check that the original package name does NOT appear in serialized metadata\n        assert !classContent.contains(\"org/apache/maven/its/shade/reloc/lambda/Processor\") :\n            \"Serialized lambda metadata still contains original package path. \" +\n            \"The class reference should have been relocated to shaded package.\"\n\n        assert !classContent.contains(\"org/apache/maven/its/shade/reloc/lambda\") :\n                \"Serialized lambda metadata still contains original package path. \" +\n                        \"The class reference should have been relocated to shaded package.\"\n    }\n}\n\n// Check 4: Search all class files for any lingering original package references\ndef entries = jar.entries()\nboolean foundSerializedLambdaMetadata = false\nwhile (entries.hasMoreElements()) {\n    def entry = entries.nextElement()\n    if (entry.getName().endsWith(\".class\")) {\n        def is = jar.getInputStream(entry)\n        def baos = new ByteArrayOutputStream()\n        def buffer = new byte[1024]\n        int len\n        while ((len = is.read(buffer)) != -1) {\n            baos.write(buffer, 0, len)\n        }\n        is.close()\n        \n        def classContent = new String(baos.toByteArray(), \"ISO-8859-1\")\n        \n        // Check for SerializedLambda constant pool entries\n        if (classContent.contains(\"java/lang/invoke/LambdaMetafactory\") ||\n            classContent.contains(\"SerializedLambda\")) {\n            foundSerializedLambdaMetadata = true\n            \n            // If this class uses lambdas, verify it uses the shaded package\n            // The original package should not appear in constant pool references\n            assert !(classContent.contains(\"org/apache/maven/its/shade/reloc/lambda/\" +\n                \"Processor\") ||\n                classContent.contains(\"org/apache/maven/its/shade/reloc/lambda/\" +\n                \"Main\") ||\n                classContent.contains(\"org/apache/maven/its/shade/reloc/lambda/\" +\n                \"DataHolder\")) :\n                \"Class ${entry.getName()} contains reference to original \" +\n                \"package in lambda metadata. All references should use shaded \" +\n                \"package: org/apache/maven/its/shade/reloc/shaded/lambda/\"\n        }\n    }\n}\n\nif (!foundSerializedLambdaMetadata) {\n    println \"Warning: No serialized lambda metadata found in classes. \" +\n        \"This may indicate the test classes were not compiled with lambda usage.\"\n}\n\njar.close()\n\nprintln \"Serialized lambda relocation test PASSED!\"\nprintln \"All classes properly relocated and no original package references found.\"\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/api/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-284-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-284-api</artifactId>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/api/src/main/java/Api.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Api\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/api/src/main/resources/api-resource.txt",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/api/src/test/java/ApiTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class ApiTest\n{\n    public static void main(String[] args) {\n        new Api();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/api/src/test/resources/api-test-resource.txt",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/impl/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-284-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-284-impl</artifactId>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-284-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-284-api</artifactId>\n            <type>test-jar</type>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/impl/src/main/java/Impl.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Impl extends Api\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/impl/src/main/resources/impl-resource.txt",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/impl/src/test/java/ImplTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class ImplTest extends ApiTest\n{\n    public static void main(String[] args) {\n        new Impl();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/impl/src/test/resources/impl-test-resource.txt",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>org.apache.maven.its.shade.stj</groupId>\n    <artifactId>mshade-284-parent</artifactId>\n    <packaging>pom</packaging>\n    <version>1.0</version>\n    <modules>\n        <module>api</module>\n        <module>impl</module>\n        <module>uber</module>\n    </modules>\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-284-api</artifactId>\n                <version>1.0</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-284-api</artifactId>\n                <version>1.0</version>\n                <type>test-jar</type>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-284-impl</artifactId>\n                <version>1.0</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-284-impl</artifactId>\n                <version>1.0</version>\n                <type>test-jar</type>\n                <scope>test</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-jar-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/uber/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-284-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-284-uber</artifactId>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-284-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-284-api</artifactId>\n            <type>test-jar</type>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-284-impl</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-284-impl</artifactId>\n            <type>test-jar</type>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <shadeTestJar>true</shadeTestJar>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-284_shadeTestJar/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\ndef jarFile = new java.util.jar.JarFile( new File( basedir, \"uber/target/mshade-284-uber-1.0.jar\" ) )\ntry\n{\n    assert null != jarFile.getJarEntry( \"Api.class\" )\n    assert null != jarFile.getJarEntry( \"api-resource.txt\" )\n    assert null != jarFile.getJarEntry( \"Impl.class\" )\n    assert null != jarFile.getJarEntry( \"impl-resource.txt\" )\n    assert null == jarFile.getJarEntry( \"ApiTest.class\" )\n    assert null == jarFile.getJarEntry( \"api-test-resource.txt\" )\n    assert null == jarFile.getJarEntry( \"ImplTest.class\" )\n    assert null == jarFile.getJarEntry( \"impl-test-resource.txt\" )\n}\nfinally\n{\n    jarFile.close()\n}\n\ndef testJarFile = new java.util.jar.JarFile( new File( basedir, \"uber/target/mshade-284-uber-1.0-tests.jar\" ) )\ntry\n{\n    assert null == testJarFile.getJarEntry( \"Api.class\" )\n    assert null == testJarFile.getJarEntry( \"api-resource.txt\" )\n    assert null == testJarFile.getJarEntry( \"Impl.class\" )\n    assert null == testJarFile.getJarEntry( \"impl-resource.txt\" )\n    assert null != testJarFile.getJarEntry( \"ApiTest.class\" )\n    assert null != testJarFile.getJarEntry( \"api-test-resource.txt\" )\n    assert null != testJarFile.getJarEntry( \"ImplTest.class\" )\n    assert null != testJarFile.getJarEntry( \"impl-test-resource.txt\" )\n}\nfinally\n{\n    testJarFile.close()\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/api/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-285-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-285-api</artifactId>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/api/src/main/java/Api.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Production API class.\n */\npublic class Api\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/api/src/test/java/ApiTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Test API class.\n */\npublic class ApiTest\n{\n    public static void main(String[] args) {\n        new Api();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/impl/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-285-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-285-impl</artifactId>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-285-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-285-api</artifactId>\n            <type>test-jar</type>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/impl/src/main/java/Impl.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Production implementation class.\n */\npublic class Impl extends Api\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/impl/src/test/java/ImplTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Test implementation class.\n */\npublic class ImplTest extends ApiTest\n{\n    public static void main(String[] args) {\n        new Impl();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>org.apache.maven.its.shade.stj</groupId>\n    <artifactId>mshade-285-parent</artifactId>\n    <packaging>pom</packaging>\n    <version>1.0</version>\n    <modules>\n        <module>api</module>\n        <module>impl</module>\n        <module>uber</module>\n    </modules>\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-285-api</artifactId>\n                <version>1.0</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-285-api</artifactId>\n                <version>1.0</version>\n                <type>test-jar</type>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-285-impl</artifactId>\n                <version>1.0</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-285-impl</artifactId>\n                <version>1.0</version>\n                <type>test-jar</type>\n                <scope>test</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-source-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <artifactId>maven-jar-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/uber/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-285-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-285-uber</artifactId>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-285-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-285-api</artifactId>\n            <type>test-jar</type>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-285-impl</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-285-impl</artifactId>\n            <type>test-jar</type>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <createTestSourcesJar>true</createTestSourcesJar>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-285_createTestSourcesJar/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\ndef testSourceJarFile = new java.util.jar.JarFile( new File( basedir, \"uber/target/mshade-285-uber-1.0-test-sources.jar\" ) )\ntry\n{\n    assert null == testSourceJarFile.getJarEntry( \"Api.java\" )\n    assert null == testSourceJarFile.getJarEntry( \"Impl.java\" )\n    assert null != testSourceJarFile.getJarEntry( \"ApiTest.java\" )\n    assert null != testSourceJarFile.getJarEntry( \"ImplTest.java\" )\n}\nfinally\n{\n    testSourceJarFile.close()\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/dependency-service/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>dependency-service</artifactId>\n  <version>1.0</version>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/dependency-service/src/main/java/DependencyReferencedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class DependencyReferencedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/dependency-service/src/main/java/DependencyServiceClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class DependencyServiceClass implements DependencyServiceInterface\n{\n    private static DependencyReferencedClass anEssentialDependency;\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/dependency-service/src/main/java/DependencyServiceInterface.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic interface DependencyServiceInterface\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/dependency-service/src/main/java/DependencyUnreferencedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class DependencyUnreferencedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/dependency-service/src/main/resources/META-INF/services/DependencyServiceInterface",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\tDependencyServiceClass # Please do not remove comments or whitespace; they are part of the IT test.\n\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# jdependency-2.6.0 needs Java 8+\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>aggregate</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-313</name>\n  <description>\n    Prevent minimizeJar from excluding classes that are used by services.\n  </description>\n\n  <modules>\n    <module>unused-service</module>\n    <module>used-service</module>\n    <module>dependency-service</module>\n    <module>test</module>\n  </modules>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/test/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.mj</groupId>\n      <artifactId>unused-service</artifactId>\n      <version>1.0</version>\n    </dependency>\n\n    <dependency>\n      <groupId>org.apache.maven.its.shade.mj</groupId>\n      <artifactId>used-service</artifactId>\n      <version>1.0</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <minimizeJar>true</minimizeJar>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/test/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.util.ServiceLoader;\n\npublic class Main\n{\n    public static void main( String[] args ) {\n        ServiceLoader.load( SomeServiceInterface.class );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/unused-service/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>unused-service</artifactId>\n  <version>1.0</version>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/unused-service/src/main/java/UnusedServiceClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class UnusedServiceClass implements UnusedServiceInterface\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/unused-service/src/main/java/UnusedServiceInterface.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic interface UnusedServiceInterface\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/unused-service/src/main/resources/META-INF/services/UnusedServiceInterface",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\tUnusedServiceClass # Please do not remove comments or whitespace; they are part of the IT test.\n\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/used-service/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>used-service</artifactId>\n  <version>1.0</version>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.mj</groupId>\n      <artifactId>dependency-service</artifactId>\n      <version>1.0</version>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/used-service/src/main/java/SomeReferencedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.util.ServiceLoader;\n\npublic class SomeReferencedClass\n{\n    {\n        ServiceLoader.load( DependencyServiceInterface.class );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/used-service/src/main/java/SomeServiceClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class SomeServiceClass implements SomeServiceInterface\n{\n    private static SomeReferencedClass anEssentialDependency;\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/used-service/src/main/java/SomeServiceInterface.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic interface SomeServiceInterface\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/used-service/src/main/java/SomeUnreferencedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class SomeUnreferencedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/used-service/src/main/resources/META-INF/services/SomeServiceInterface",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\tSomeServiceClass # Please do not remove comments or whitespace; they are part of the IT test.\n\n"
  },
  {
    "path": "src/it/projects/MSHADE-313_minimized-services/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"Main.class\",\n    \"META-INF/services/SomeServiceInterface\",\n    \"SomeServiceInterface.class\",\n    \"SomeServiceClass.class\",\n    \"SomeReferencedClass.class\",\n    \"META-INF/services/DependencyServiceInterface\",\n    \"DependencyServiceInterface.class\",\n    \"DependencyServiceClass.class\",\n    \"DependencyReferencedClass.class\"\n};\n\nString[] unwanted =\n{\n    // Unused SPI config files are not removed\n    //\"META-INF/services/UnusedServiceInterface\",\n    \"UnusedServiceInterface.class\",\n    \"UnusedServiceClass.class\",\n    \"SomeUnreferencedClass.class\",\n    \"DependencyUnreferencedClass.class\"\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"test/target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/dependency/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>dependency</artifactId>\n  <version>1.0</version>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/dependency/src/main/java/SomeUnusedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class SomeUnusedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/dependency/src/main/java/SomeUsedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.util.ServiceLoader;\n\npublic class SomeUsedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/dependency/src/main/java/x/y/z/AnotherExemptedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage x.y.z;\n\npublic class AnotherExemptedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/dependency/src/main/java/x/y/z/SomeDependencyOfExemptedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage x.y.z;\n\npublic class SomeDependencyOfExemptedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/dependency/src/main/java/x/y/z/SomeExemptedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage x.y.z;\n\npublic class SomeExemptedClass\n{\n    public SomeDependencyOfExemptedClass essentialDependency;\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# jdependency-2.6.0 needs Java 8+\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>aggregate</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-316</name>\n  <description>\n    Prevent minimizeJar from excluding classes explicitly exempted.\n  </description>\n\n  <modules>\n    <module>dependency</module>\n    <module>test</module>\n  </modules>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/test/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.mj</groupId>\n      <artifactId>dependency</artifactId>\n      <version>1.0</version>\n    </dependency>\n\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <minimizeJar>true</minimizeJar>\n              <filters>\n                <filter>\n                  <artifact>org.apache.maven.its.shade.mj:dependency</artifact>\n                  <excludeDefaults>false</excludeDefaults>\n                  <includes>\n                    <include>**/SomeExempted*</include>\n                    <include>**\\AnotherExempted*</include>\n                  </includes>\n                </filter>\n              </filters>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/test/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Main\n{\n    public SomeUsedClass essentialDependency;\n\n    public static void main( String[] args ) throws ClassNotFoundException\n    {\n        Class.forName( \"x.y.z.SomeExemptedClass\" );\n        Class.forName( \"x.y.z.AnotherExemptedClass\" );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-316/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"Main.class\",\n    \"SomeUsedClass.class\",\n    \"x/y/z/SomeExemptedClass.class\",\n    \"x/y/z/AnotherExemptedClass.class\",\n    \"x/y/z/SomeDependencyOfExemptedClass.class\"\n};\n\nString[] unwanted =\n{\n    \"SomeUnusedClass.class\"\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"test/target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/api/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-340-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-340-api</artifactId>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/api/src/main/java/Api.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Production API class.\n */\npublic class Api\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/api/src/test/java/ApiTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Test API class.\n */\npublic class ApiTest\n{\n    public static void main(String[] args) {\n        new Api();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/impl/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-340-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-340-impl</artifactId>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-340-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-340-api</artifactId>\n            <type>test-jar</type>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/impl/src/main/java/Impl.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Production implementation class.\n */\npublic class Impl extends Api\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/impl/src/test/java/ImplTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Test implementation class.\n */\npublic class ImplTest extends ApiTest\n{\n    public static void main(String[] args) {\n        new Impl();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>org.apache.maven.its.shade.stj</groupId>\n    <artifactId>mshade-340-parent</artifactId>\n    <packaging>pom</packaging>\n    <version>1.0</version>\n    <modules>\n        <module>api</module>\n        <module>impl</module>\n        <module>uber</module>\n        <module>uber-user</module>\n    </modules>\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-340-api</artifactId>\n                <version>1.0</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-340-api</artifactId>\n                <version>1.0</version>\n                <type>test-jar</type>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-340-impl</artifactId>\n                <version>1.0</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-340-impl</artifactId>\n                <version>1.0</version>\n                <type>test-jar</type>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-340-uber</artifactId>\n                <version>1.0</version>\n                <classifier>jack-of-all</classifier>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.maven.its.shade.stj</groupId>\n                <artifactId>mshade-340-uber</artifactId>\n                <version>1.0</version>\n                <type>test-jar</type>\n                <classifier>jack-of-all-tests</classifier>\n                <scope>test</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-source-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>default-source</id>\n                        <goals>\n                            <goal>jar-no-fork</goal>\n                            <goal>test-jar-no-fork</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <artifactId>maven-jar-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/uber/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-340-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-340-uber</artifactId>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-340-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-340-api</artifactId>\n            <type>test-jar</type>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-340-impl</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-340-impl</artifactId>\n            <type>test-jar</type>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <shadedArtifactAttached>true</shadedArtifactAttached>\n                            <shadedClassifierName>jack-of-all</shadedClassifierName>\n                            <shadeTestJar>true</shadeTestJar>\n                            <createSourcesJar>true</createSourcesJar>\n                            <createTestSourcesJar>true</createTestSourcesJar>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/uber/src/main/java/Uber.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Proper class of the uber project.\n */\npublic class Uber\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/uber/src/test/java/UberTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Proper test of the uber project.\n */\npublic class UberTest\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/uber-user/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.maven.its.shade.stj</groupId>\n        <artifactId>mshade-340-parent</artifactId>\n        <version>1.0</version>\n    </parent>\n    <artifactId>mshade-340-uber-user</artifactId>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-340-uber</artifactId>\n            <type>jar</type>\n            <classifier>jack-of-all</classifier>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.stj</groupId>\n            <artifactId>mshade-340-uber</artifactId>\n            <type>test-jar</type>\n            <classifier>jack-of-all-tests</classifier>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <shadedArtifactAttached>true</shadedArtifactAttached>\n                            <shadedClassifierName>jack-of-all</shadedClassifierName>\n                            <shadeTestJar>true</shadeTestJar>\n                            <createSourcesJar>true</createSourcesJar>\n                            <createTestSourcesJar>true</createTestSourcesJar>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/uber-user/src/main/java/UberUser.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class UberUser\n{\n    Api api;\n    Impl impl;\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/uber-user/src/test/java/UberUserTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * MSHADE-340 The fact that this class compiles verifies the fix.\n * Without the fix, the (test) dependency cannot be found and compilation fails.\n * Even though the file exists, it is not correctly attached to the project.\n */\npublic class UberUserTest\n{\n    UberUser uberUser;\n    ApiTest apiTest;\n    ImplTest implTest;\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\ndef originalUberJar = new File( basedir, \"uber/target/mshade-340-uber-1.0.jar\" )\ndef jackOfAllUberJar = new File( basedir, \"uber/target/mshade-340-uber-1.0-jack-of-all.jar\" )\ndef originalUberTestJar = new File ( basedir, \"uber/target/mshade-340-uber-1.0-tests.jar\" )\ndef jackOfAllUberTestJar = new File ( basedir, \"uber/target/mshade-340-uber-1.0-jack-of-all-tests.jar\" )\ndef originalUberSourcesJar = new File( basedir, \"uber/target/mshade-340-uber-1.0-sources.jar\" )\ndef jackOfAllUberSourcesJar = new File( basedir, \"uber/target/mshade-340-uber-1.0-jack-of-all-sources.jar\" )\ndef originalUberTestSourcesJar = new File ( basedir, \"uber/target/mshade-340-uber-1.0-test-sources.jar\" )\ndef jackOfAllUberTestSourcesJar = new File ( basedir, \"uber/target/mshade-340-uber-1.0-jack-of-all-test-sources.jar\" )\n\nassert originalUberJar.exists()\nassert jackOfAllUberJar.exists()\nassert originalUberTestJar.exists()\nassert jackOfAllUberTestJar.exists()\nassert originalUberSourcesJar.exists()\nassert jackOfAllUberSourcesJar.exists()\nassert originalUberTestSourcesJar.exists()\nassert jackOfAllUberTestSourcesJar.exists()\n\ndef originalUberJarFile = new java.util.jar.JarFile( originalUberJar )\ntry\n{\n    assert null == originalUberJarFile.getJarEntry( \"Api.class\" )\n    assert null == originalUberJarFile.getJarEntry( \"Impl.class\" )\n    assert null != originalUberJarFile.getJarEntry( \"Uber.class\" )\n}\nfinally\n{\n    originalUberJarFile.close()\n}\n\ndef jackOfAllUberJarFile = new java.util.jar.JarFile( jackOfAllUberJar )\ntry\n{\n    assert null != jackOfAllUberJarFile.getJarEntry( \"Api.class\" )\n    assert null != jackOfAllUberJarFile.getJarEntry( \"Impl.class\" )\n    assert null != jackOfAllUberJarFile.getJarEntry( \"Uber.class\" )\n}\nfinally\n{\n    jackOfAllUberJarFile.close()\n}\n\ndef originalUberTestJarFile = new java.util.jar.JarFile( originalUberTestJar )\ntry\n{\n    assert null == originalUberTestJarFile.getJarEntry( \"ApiTest.class\" )\n    assert null == originalUberTestJarFile.getJarEntry( \"ImplTest.class\" )\n    assert null != originalUberTestJarFile.getJarEntry( \"UberTest.class\" )\n}\nfinally\n{\n    originalUberTestJarFile.close()\n}\n\ndef jackOfAllUberTestJarFile = new java.util.jar.JarFile( jackOfAllUberTestJar )\ntry\n{\n    assert null != jackOfAllUberTestJarFile.getJarEntry( \"ApiTest.class\" )\n    assert null != jackOfAllUberTestJarFile.getJarEntry( \"ImplTest.class\" )\n    assert null != jackOfAllUberTestJarFile.getJarEntry( \"UberTest.class\" )\n}\nfinally\n{\n    jackOfAllUberTestJarFile.close()\n}\n\ndef originalUberSourcesJarFile = new java.util.jar.JarFile( originalUberSourcesJar )\ntry\n{\n    assert null == originalUberSourcesJarFile.getJarEntry( \"Api.java\" )\n    assert null == originalUberSourcesJarFile.getJarEntry( \"Impl.java\" )\n    assert null != originalUberSourcesJarFile.getJarEntry( \"Uber.java\" )\n}\nfinally\n{\n    originalUberSourcesJarFile.close()\n}\n\ndef jackOfAllUberSourcesJarFile = new java.util.jar.JarFile( jackOfAllUberSourcesJar )\ntry\n{\n    assert null != jackOfAllUberSourcesJarFile.getJarEntry( \"Api.java\" )\n    assert null != jackOfAllUberSourcesJarFile.getJarEntry( \"Impl.java\" )\n    assert null != jackOfAllUberSourcesJarFile.getJarEntry( \"Uber.java\" )\n}\nfinally\n{\n    jackOfAllUberSourcesJarFile.close()\n}\n\ndef originalUberTestSourcesJarFile = new java.util.jar.JarFile( originalUberTestSourcesJar )\ntry\n{\n    assert null == originalUberTestSourcesJarFile.getJarEntry( \"ApiTest.java\" )\n    assert null == originalUberTestSourcesJarFile.getJarEntry( \"ImplTest.java\" )\n    assert null != originalUberTestSourcesJarFile.getJarEntry( \"UberTest.java\" )\n}\nfinally\n{\n    originalUberTestSourcesJarFile.close()\n}\n\ndef jackOfAllUberTestSourcesJarFile = new java.util.jar.JarFile( jackOfAllUberTestSourcesJar )\ntry\n{\n    assert null != jackOfAllUberTestSourcesJarFile.getJarEntry( \"ApiTest.java\" )\n    assert null != jackOfAllUberTestSourcesJarFile.getJarEntry( \"ImplTest.java\" )\n    assert null != jackOfAllUberTestSourcesJarFile.getJarEntry( \"UberTest.java\" )\n}\nfinally\n{\n    jackOfAllUberTestSourcesJarFile.close()\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-351/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.srt</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-351</name>\n  <description>\n    Test the merging of META-INF/services/** entries.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.srt</groupId>\n      <artifactId>one</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.srt</groupId>\n      <artifactId>two</artifactId>\n      <version>0.1</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <transformers>\n                <transformer implementation=\n                  \"org.apache.maven.plugins.shade.resource.properties.OpenWebBeansPropertiesTransformer\" />\n                <transformer implementation=\n                  \"org.apache.maven.plugins.shade.resource.properties.MicroprofileConfigTransformer\" />\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-351/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\nimport org.codehaus.plexus.util.*;\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\nJarEntry jarEntry = jarFile.getEntry( \"META-INF/services/org.apache.maven.Shade\" );\nString service = IOUtil.toString( jarFile.getInputStream( jarEntry ), \"UTF-8\" );\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/MSHADE-36-inject-dep-reduced-pom-in-final/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals = clean package\n"
  },
  {
    "path": "src/it/projects/MSHADE-36-inject-dep-reduced-pom-in-final/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n\n  <groupId>org.apache.maven.its.shade.drp</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-36</name>\n  <description>\n    Test to see that the dependency-reduced-pom.xml is injected into the final jar instead of the original pom.xml\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.2</version>\n    </dependency>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-utils</artifactId>\n      <version>3.5.1</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <minimizeJar>true</minimizeJar>\n              <createDependencyReducedPom>true</createDependencyReducedPom>\n              <useDependencyReducedPomInJar>true</useDependencyReducedPomInJar>\n              <relocations>\n                <relocation>\n                  <pattern>org.codehaus.plexus</pattern>\n                  <shadedPattern>com.example.shaded.org.codehaus.plexus</shadedPattern>\n                </relocation>\n              </relocations>\n              <artifactSet>\n                <includes>\n                  <include>junit:junit</include>\n                  <include>org.codehaus.plexus:plexus-utils</include>\n                </includes>\n              </artifactSet>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-36-inject-dep-reduced-pom-in-final/src/main/java/com/example/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage com.example;\n\nimport org.codehaus.plexus.util.StringUtils;\n\npublic class Main\n{\n    public static void main( String[] args ) {\n        System.out.println( \"Hello World!\" + ( isEmpty(\"foo\") ? \" is empty!\" : \" -- \") );\n    }\n\n    public static boolean isEmpty( String input ) {\n        return StringUtils.isEmpty( input );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-36-inject-dep-reduced-pom-in-final/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.jar.*;\nimport java.util.Arrays;\nimport org.codehaus.plexus.util.*;\n\nString[] wanted =\n{\n    \"com/example/Main.class\",\n    \"junit/runner/logo.gif\",\n    \"com/example/shaded/org/codehaus/plexus/util/StringUtils.class\",\n};\n\nString[] unwanted =\n{\n    \"junit/textui/TestRunner.class\",\n    \"org/codehaus/plexus/util/StringUtils.class\",\n};\n\nJarFile jarFile = null;\ntry\n{\n    jarFile = new JarFile ( new File( basedir, \"target/test-1.0.jar\" ) );\n\n    for ( String path:wanted )\n    {\n        if ( jarFile.getEntry( path ) == null )\n        {\n            throw new IllegalStateException( \"wanted path is missing: \"+path );\n        }\n    }\n\n    for ( String path:unwanted )\n    {\n        if ( jarFile.getEntry( path ) != null )\n        {\n            throw new IllegalStateException ( \"unwanted path is present: \"+path );\n        }\n    }\n\n    JarEntry jarEntry = jarFile.getEntry( \"META-INF/maven/org.apache.maven.its.shade.drp/test/pom.xml\" );\n    String pomFile = IOUtil.toString( jarFile.getInputStream( jarEntry ), \"UTF-8\" );\n\n    if ( pomFile.contains( \"<groupId>org.codehaus.plexus</groupId>\" ) )\n    {\n        throw new IllegalStateException( \"The pom.xml still contains a reference to the org.codehaus.plexus dependency\" );\n    }\n\n}\nfinally\n{\n    if ( jarFile != null ) {\n        jarFile.close();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-363_old-Transformer/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.pp</groupId>\r\n  <artifactId>mshade-363</artifactId>\r\n  <version>1.0-SNAPSHOT</version>\r\n\r\n  <name>check non-breaking change to ResourceTransformer's API</name>\r\n  <description>support for Reproducible Builds in MSHADE-352 requires a new long time parameter to\r\n   void processResource( String resource, InputStream is, List&lt;Relocator&gt; relocators, long time )\r\n   breaking old maven-shade-plugin extensions implementing interface without this parameter\r\n  </description>\r\n\r\n  <properties>\r\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r\n  </properties>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <dependencies>\r\n          <dependency><!-- adds an extra ResourceTransformer released a few years ago -->\r\n            <groupId>org.springframework.boot</groupId>\r\n            <artifactId>spring-boot-maven-plugin</artifactId>\r\n            <version>1.5.22.RELEASE</version>\r\n          </dependency>\r\n        </dependencies>\r\n        <executions>\r\n          <execution>\r\n            <id>use-extra-resource-transformer</id>\r\n            <phase>package</phase>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <transformers><!-- use the extra transformer that does not provide the new extra parameter for Reproducible Builds -->\r\n                <transformer implementation=\"org.springframework.boot.maven.PropertiesMergingResourceTransformer\">\r\n                  <resource>Message.properties</resource>\r\n                </transformer>\r\n              </transformers>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-363_old-Transformer/src/main/resources/Message.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\none = one\n"
  },
  {
    "path": "src/it/projects/MSHADE-363_old-plugin/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.pp</groupId>\r\n  <artifactId>mshade-363-use-custom</artifactId>\r\n  <version>1.0-SNAPSHOT</version>\r\n\r\n  <name>check new ReproducibleResourceTransformer API can be used with older shade plugin</name>\r\n  <description>if new extensions cannot be used with older shade plugin, it will add user-visible constraints...</description>\r\n\r\n  <properties>\r\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r\n  </properties>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>3.2.2</version><!-- last version of maven-shade-plugin without the new ReproducibleResourceTransformer interface -->\r\n        <dependencies>\r\n          <dependency><!-- tests.jar adds an extra ResourceTransformer released a few years ago, with the missing ReproducibleResourceTransformer interface -->\r\n            <groupId>org.apache.maven.plugins</groupId>\r\n            <artifactId>maven-shade-plugin</artifactId>\r\n            <version>@project.version@</version>\r\n            <classifier>tests</classifier>\r\n          </dependency>\r\n        </dependencies>\r\n        <executions>\r\n          <execution>\r\n            <id>use-extra-resource-transformer</id>\r\n            <phase>package</phase>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <transformers><!-- use the extra transformer that implements ReproducibleResourceTransformer -->\r\n                <transformer implementation=\"org.apache.maven.plugins.shade.custom.CustomReproducibleResourceTransformer\" />\r\n              </transformers>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/MSHADE-363_old-plugin/src/main/resources/Message.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\none = one\n"
  },
  {
    "path": "src/it/projects/MSHADE-373/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mt</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-373</name>\n  <description>\n    Test that reproduces the issue described in MSHADE-373.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <!-- dummy dependency to test interaction of multiple manifests -->\n      <groupId>org.apache.maven.plugins</groupId>\n      <artifactId>maven-shade-plugin</artifactId>\n      <version>@project.version@</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-install-plugin</artifactId>\n        <version>@version.maven-install-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n        <configuration>\n          <archive>\n            <manifest>\n              <mainClass>org.apache.maven.Main</mainClass>\n            </manifest>\n            <manifestEntries>\n              <Test-Entry>PASSED</Test-Entry>\n              <Original-Entry>PASSED</Original-Entry>\n            </manifestEntries>\n          </archive>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createSourcesJar>true</createSourcesJar>\n              <shadeTestJar>true</shadeTestJar>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                  <manifestEntries>\n                    <Custom-Entry>SET</Custom-Entry> <!-- not using original manifest but using transformer directly -->\n                  </manifestEntries>\n                </transformer>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                  <forShade>sources-jar</forShade>\n                  <manifestEntries>\n                    <Test-Entry>FAILED</Test-Entry>\n                    <Archiver-Version />\n                  </manifestEntries>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-373/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\n// NOTE: We deliberately use JarInputStream and not JarFile here!\nManifest extractManifest(name) {\n    file = new File( basedir, \"target/\" + name );\n    if ( !file.exists() )\n    {\n        throw new IllegalStateException( \"No file '\" + file + \"'\" );\n    }\n    JarInputStream jarStream = new JarInputStream( new FileInputStream( file ) );\n    Manifest mf = jarStream.getManifest();\n    jarStream.close();\n    return mf;\n}\n\nvoid assertsEntries( name, expectedTestEntry, expectedOriginalEntry, expectedCustomEntry ) {\n    attributes = extractManifest( name ).getMainAttributes();\n\n    if ( !Objects.equals( expectedTestEntry, attributes.getValue( \"Test-Entry\" ) ) )\n    {\n        throw new IllegalStateException( \"Test-Entry should have been '\" + expectedTestEntry + \"' in \" + name + \": \" + attributes.entrySet() );\n    }\n\n    if ( !Objects.equals( expectedOriginalEntry, attributes.getValue( \"Original-Entry\" ) ) )\n    {\n        throw new IllegalStateException( \"Original-Entry should have been '\" + expectedOriginalEntry + \"' in \" + name + \": \" + attributes.entrySet() );\n    }\n\n    if ( !Objects.equals( expectedCustomEntry, attributes.getValue( \"Custom-Entry\" ) ) )\n    {\n        throw new IllegalStateException( \"Custom-Entry should have been '\" + expectedCustomEntry + \"' in \" + name + \": \" + attributes.entrySet() );\n    }\n}\n\nassertsEntries( \"test-1.0.jar\", \"PASSED\", \"PASSED\", \"SET\" );\nassertsEntries( \"test-1.0-sources.jar\", \"FAILED\", null, null ); // specific config\nassertsEntries( \"test-1.0-tests.jar\", \"PASSED\", \"PASSED\", \"SET\" ); // inherits from the default transformer\n"
  },
  {
    "path": "src/it/projects/MSHADE-382_skip_execution/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/MSHADE-382_skip_execution/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>skip-execution</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-382</name>\n  <description>\n    Skip shading\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>create-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <skip>true</skip>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-382_skip_execution/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nassert !(new File( basedir, \"target/original-skip-execution-1.0.jar\" ).exists()) : \"Shading was not skipped.\""
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals=clean package\n"
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/one/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.its.shade.pp</groupId>\n    <artifactId>mshade-390</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>one</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/one/src/main/java/org/apache/one/One.java",
    "content": "package org.apache.one;\n\npublic class One {\n\n}"
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/one/src/main/resources/META-INF/sisu/javax.inject.Named",
    "content": "org.apache.one.One"
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.pp</groupId>\n  <artifactId>mshade-390</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n\n  <dependencyManagement>\n    <dependencies>\n      <dependency>\n        <groupId>org.apache.maven.its.shade.pp</groupId>\n        <artifactId>one</artifactId>\n        <version>${project.version}</version>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <modules>\n    <module>one</module>\n    <module>two</module>\n  </modules>\n\n</project>"
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/two/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.its.shade.pp</groupId>\n    <artifactId>mshade-390</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>two</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.pp</groupId>\n      <artifactId>one</artifactId>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.SisuIndexResourceTransformer\"/>\n              </transformers>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.one</pattern>\n                  <shadedPattern>org.apache.two.org.apache.one</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/two/src/main/java/org/apache/two/Two.java",
    "content": "package org.apache.two;\n\npublic class Two {\n\n}"
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/two/src/main/resources/META-INF/sisu/javax.inject.Named",
    "content": "org.apache.two.Two"
  },
  {
    "path": "src/it/projects/MSHADE-390-sisu-index/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\ndef jarFile = new java.util.jar.JarFile(new File(basedir, \"two/target/two-1.0-SNAPSHOT.jar\"))\ndef jarEntry = jarFile.getJarEntry(\"META-INF/sisu/javax.inject.Named\")\ndef merged = jarFile.getInputStream(jarEntry).getText()\nassert merged.contains( 'org.apache.two.org.apache.one.One' )\nassert merged.contains( 'org.apache.two.Two' )\n"
  },
  {
    "path": "src/it/projects/MSHADE-391_noRelocationKeepOriginalClasses/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>org.apache.maven.its.shade.csj</groupId>\n    <artifactId>mshade-391</artifactId>\n    <version>1.0</version>\n    <url>https://issues.apache.org/jira/browse/MSHADE-391</url>\n    <description>\n        ASM-processed classes should not be written to the shaded JAR if they have not been relocated and do not refer\n        to relocated classes either. In that case, the user expects to retain the original classes.\n    </description>\n\n    <dependencies>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n            <version>2.13.0</version>\n        </dependency>\n        <dependency>\n            <groupId>commons-lang</groupId>\n            <artifactId>commons-lang</artifactId>\n            <version>2.6</version>\n            <scope>compile</scope>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <!-- Replace the version by 3.2.4 or something older in order to see it fail -->\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <id>shade</id>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <relocations>\n                                <relocation>\n                                    <pattern>org.apache.commons.io</pattern>\n                                    <shadedPattern>org.shaded.commons.io</shadedPattern>\n                                </relocation>\n                            </relocations>\n                            <filters>\n                                <filter>\n                                    <artifact>*:*</artifact>\n                                    <excludes>\n                                        <exclude>META-INF/**</exclude>\n                                    </excludes>\n                                </filter>\n                            </filters>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-391_noRelocationKeepOriginalClasses/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.security.MessageDigest\nimport java.util.jar.JarFile\n\ndef originalChecksumsMD5 = [\n    'ArrayUtils.class'                                    : '4644ce91f5dbf1172f3bc2eafa1220bc',\n    'BitField.class'                                      : 'ec5d367938cb9f59912fafbe708112fa',\n    'BooleanUtils.class'                                  : 'c321cc00995b4e81162cec9366406817',\n    'builder/CompareToBuilder.class'                      : '70c085203ca3506fb0fbd1eed8de9ffe',\n    'builder/EqualsBuilder.class'                         : 'e538ada29bf74d053b4174c6d0338c29',\n    'builder/HashCodeBuilder.class'                       : '76e129cfdadefc856588351c830570e6',\n    'builder/IDKey.class'                                 : 'fa08336106e492b5ac9f9901bd7ec690',\n    'builder/ReflectionToStringBuilder.class'             : '5a30e353b9f1bd0c9d8ed547c3ef576d',\n    'builder/StandardToStringStyle.class'                 : 'bd26865d3f4f0e3a0f24efe00897f4f3',\n    'builder/ToStringBuilder.class'                       : '8493114752dd3552e21eba63343e6558',\n    'builder/ToStringStyle$DefaultToStringStyle.class'    : 'e4d42ea42ea43ad971fe5d33624063a6',\n    'builder/ToStringStyle$MultiLineToStringStyle.class'  : '3f2306c0f664229419dad8bfcfb0142d',\n    'builder/ToStringStyle$NoFieldNameToStringStyle.class': '9ed4e831c533c0fc98f3583c1e6fda31',\n    'builder/ToStringStyle$ShortPrefixToStringStyle.class': '4aa105e83bcd37a06f6d598a9c59d91c',\n    'builder/ToStringStyle$SimpleToStringStyle.class'     : 'c156f9816faa3da7b664df81fe811b50',\n    'builder/ToStringStyle.class'                         : '4088eef1b6a33ff2b6483b2f79461364',\n    'CharEncoding.class'                                  : '68b058ceea276d04247aff21ef7dbb63',\n    'CharRange$1.class'                                   : 'b3034e9540791bc9ce371e75d0ba8785',\n    'CharRange$CharacterIterator.class'                   : 'fdb6df8bbf32f88f88749ade8552d081',\n    'CharRange.class'                                     : 'a6b95e2ed34c8e46a9889568e56bacb8',\n    'CharSet.class'                                       : '4e0df369374e877afefc76153797cffd',\n    'CharSetUtils.class'                                  : '94a3d9c03ce37f671e5bdbb6605fe18b',\n    'CharUtils.class'                                     : '5706b8e0802f818efac9e5c6c203d428',\n    'ClassUtils.class'                                    : '09bc083bfe4f11d562d32c14b88b5a8e',\n    'Entities$ArrayEntityMap.class'                       : 'ff3a4211ef9b3c463eb79c1d04ad8d25',\n    'Entities$BinaryEntityMap.class'                      : '12b7fdc0621bea444f687950466fd89b',\n    'Entities$EntityMap.class'                            : '8e35cd73a7f6d80f45b328c228bcbc7d',\n    'Entities$HashEntityMap.class'                        : 'e8ab521f1a3fdca02c7e44daa33f7688',\n    'Entities$LookupEntityMap.class'                      : '1e59392ae388c8da917881f9f8b4998d',\n    'Entities$MapIntMap.class'                            : 'ce32c8d2649bbf479e7c511d110bf9c2',\n    'Entities$PrimitiveEntityMap.class'                   : '110a8762a727788dc038d47385a55eaf',\n    'Entities$TreeEntityMap.class'                        : '2a51fb240cd9cc51dbf249ebc20c5639',\n    'Entities.class'                                      : '8d0f106f7591b55d0b57927d0fcce871',\n    'enum/Enum$Entry.class'                               : 'bb9c0b1ecfcd16e873d180ce20129e9e',\n    'enum/Enum.class'                                     : 'fda3012c2bc97b7d0425057b8d98ca30',\n    'enum/EnumUtils.class'                                : 'd9d966cd69bef5a14d9c514a3aec8a1d',\n    'enum/ValuedEnum.class'                               : '6196dd12bd0b6debcef93f78cae0f094',\n    'enums/Enum$Entry.class'                              : 'a625be33cd61f7e00da41d868ac5fbde',\n    'enums/Enum.class'                                    : '5769c6367611bdeaab3536c979e931ec',\n    'enums/EnumUtils.class'                               : '5c4c227735393bcd5d550172afe0d1e7',\n    'enums/ValuedEnum.class'                              : '7cc89eafa3f01eca7f989e4a95880484',\n    'exception/CloneFailedException.class'                : 'a1d1fe5140c39f1d9c13b9716df320e0',\n    'exception/ExceptionUtils.class'                      : 'bfbbc6b82e778a91c9ac885a582aa87a',\n    'exception/Nestable.class'                            : 'cb37cc4f6aa95ddc1e08e24dfdb1faeb',\n    'exception/NestableDelegate.class'                    : '72610ad6e1acd693a73bd169c4c2fe66',\n    'exception/NestableError.class'                       : 'e9dec41924015b2a37fcc724994601d7',\n    'exception/NestableException.class'                   : 'f88cb396c859f785b13272236dd2d14a',\n    'exception/NestableRuntimeException.class'            : 'b3712109e98e7dfe916c028944be71a2',\n    'IllegalClassException.class'                         : '592efb0cd4c69c78890f51e5aefd5323',\n    'IncompleteArgumentException.class'                   : 'c65def57686f1433fec9de1a53d7e968',\n    'IntHashMap$Entry.class'                              : '312431259a720c5cc59919164e1f6f94',\n    'IntHashMap.class'                                    : '09e0c9e37e06edc13912e9179d123df2',\n    'LocaleUtils.class'                                   : 'ba8b698331343045e4714ab276d84df3',\n    'math/DoubleRange.class'                              : 'ae74dc56efa1d6608a34cd87326775df',\n    'math/FloatRange.class'                               : 'ca15b57ff629ad21c135daa3af4ae748',\n    'math/Fraction.class'                                 : '966d7dba648d56d40415f1d76eb61f22',\n    'math/IEEE754rUtils.class'                            : '904f0342faa83dc32aa3ce09b570d6e6',\n    'math/IntRange.class'                                 : '1a08884805a90e85a4af5f38f5c1d3ae',\n    'math/JVMRandom.class'                                : '1c38d4c2b8dcd9feee7ca4affc945ef9',\n    'math/LongRange.class'                                : 'ebc6dbf88a701e592764d635234eeec4',\n    'math/NumberRange.class'                              : '78de0d669bc79bba406be19c5fdd0abb',\n    'math/NumberUtils.class'                              : '5ae54b27c20fa65144d64c65449aaa89',\n    'math/RandomUtils.class'                              : '40155ad57c6f32460e0f32f3db22b173',\n    'math/Range.class'                                    : 'dab8235e8a5cc7d9b9103f416478f39a',\n    'mutable/Mutable.class'                               : '0c3515bc904e276c781486c67ec34e71',\n    'mutable/MutableBoolean.class'                        : '1f5979176185bf9638ca60d15526b45e',\n    'mutable/MutableByte.class'                           : 'd458d842df3c178069a7969fc9f6af38',\n    'mutable/MutableDouble.class'                         : '1c32ae0b6cdfc00d48280164a6ef8e9b',\n    'mutable/MutableFloat.class'                          : 'f5a58dc62a9f95081f678db598f9513d',\n    'mutable/MutableInt.class'                            : '2350cc67b99f6427d404ea7233d94664',\n    'mutable/MutableLong.class'                           : '7459b453c34cfe6beeb877bcc5fc4e81',\n    'mutable/MutableObject.class'                         : 'f16ed36d34163fd6219c59fffdc02760',\n    'mutable/MutableShort.class'                          : 'e3192bee99861e409c941bc2a5be9add',\n    'NotImplementedException.class'                       : '45f4bfa15f637b7ac8fba0ea5af9a981',\n    'NullArgumentException.class'                         : '206902af1b00283b40b258b28385f63b',\n    'NumberRange.class'                                   : '54fbe10934f95117f8d3f0c0546b56c7',\n    'NumberUtils.class'                                   : '2de64e30b07a36e11f095f3146f16aa0',\n    'ObjectUtils$Null.class'                              : '1138f88d2527f63458eaa56c959f818c',\n    'ObjectUtils.class'                                   : '40483af3c9a0cdcb5ee0df43c1fa3ae8',\n    'RandomStringUtils.class'                             : '1a4f147bab572b579db352d06979ce0a',\n    'reflect/ConstructorUtils.class'                      : '96b06ea51ec96064b7d881975dffc8bb',\n    'reflect/FieldUtils.class'                            : 'f37be95c51f707ea1dd965d02f20f540',\n    'reflect/MemberUtils.class'                           : '9fe7b0a7c664458058668c5400a2139b',\n    'reflect/MethodUtils.class'                           : '4d7781bf651d8a1f750ba75f628f45e4',\n    'SerializationException.class'                        : '7eaeab8f24eeed40e089d4abeffc3ad4',\n    'SerializationUtils.class'                            : '32062839391b9896caa63067a4040a6c',\n    'StringEscapeUtils.class'                             : 'c1fe975a05f7d14823d3dbce29c23bb2',\n    'StringUtils.class'                                   : 'bb4c964dd2c5057d3a8f282ea381c05d',\n    'SystemUtils.class'                                   : '74492426bb3b60ea1e3c3816b955f40f',\n    'text/CompositeFormat.class'                          : 'dd2b0fc2a4784eb07754f8271d758ba5',\n    'text/ExtendedMessageFormat.class'                    : 'eb32c6eb2f83e784c5479a00edb9d35d',\n    'text/FormatFactory.class'                            : 'b8b2a7245d750929eebf82c59a34af4a',\n    'text/StrBuilder$StrBuilderReader.class'              : 'b67a32739b45226ae25297150f4a3672',\n    'text/StrBuilder$StrBuilderTokenizer.class'           : '22d8351ad6688698c281e980b5e2aef0',\n    'text/StrBuilder$StrBuilderWriter.class'              : '911b13b209c459ab0e649fcf16da119f',\n    'text/StrBuilder.class'                               : '0daf9125d2bb85d7be8f0930d65a8881',\n    'text/StrLookup$MapStrLookup.class'                   : '9468c0e1dbf42c9842f57662ab65a295',\n    'text/StrLookup.class'                                : '5755445f8e6509993c501450b4ca0283',\n    'text/StrMatcher$CharMatcher.class'                   : 'c40179bba463256255193200fad920b1',\n    'text/StrMatcher$CharSetMatcher.class'                : '93b22e1f09237f052c32ec202d95dd16',\n    'text/StrMatcher$NoMatcher.class'                     : '1bf4cce48a7fc1abd12ce0ddc32a0f21',\n    'text/StrMatcher$StringMatcher.class'                 : 'e223633d564e39846dd74ce6aa343a1d',\n    'text/StrMatcher$TrimMatcher.class'                   : '681a4bd78f7f2c5fd74a99370ad4b20b',\n    'text/StrMatcher.class'                               : 'f5a6d712ffd750ca1c7613b394ea3f22',\n    'text/StrSubstitutor.class'                           : '1cfa5ab4e0990595dec646037c5967a9',\n    'text/StrTokenizer.class'                             : 'bf73deb873f50e8ba34de3998e2972c4',\n    'time/DateFormatUtils.class'                          : 'fb537b3f1a510ac0c52804e4aff27763',\n    'time/DateUtils$DateIterator.class'                   : 'ba97d5b0027fe3e5a591f07864e44bbb',\n    'time/DateUtils.class'                                : 'df75657605e945dbbcbe886704470137',\n    'time/DurationFormatUtils$Token.class'                : 'ed64a1f1a2a41e56ae50309a1fde175c',\n    'time/DurationFormatUtils.class'                      : 'e393be23cc1ab1ff59091a1b83cc9bbd',\n    'time/FastDateFormat$CharacterLiteral.class'          : '249c346d9821e022bdb659c222dbf644',\n    'time/FastDateFormat$NumberRule.class'                : 'c41df9bc3bdff9cb4d68dd74885616b6',\n    'time/FastDateFormat$PaddedNumberField.class'         : '4cd9e98b2afc00b17d0d2038b397de24',\n    'time/FastDateFormat$Pair.class'                      : '8a934ec5d93793facff76c7e8cf3280e',\n    'time/FastDateFormat$Rule.class'                      : '442ea43c86a34ef4a5d416d3dead1ada',\n    'time/FastDateFormat$StringLiteral.class'             : '4d61134d7b4947e972418208f946417c',\n    'time/FastDateFormat$TextField.class'                 : '6894c0815fcc85c5ceb9a22df07ab4fd',\n    'time/FastDateFormat$TimeZoneDisplayKey.class'        : '20a24c7f131f38d1e4deb74572c10f45',\n    'time/FastDateFormat$TimeZoneNameRule.class'          : '529cab8e6727bf6f67f921060d5be564',\n    'time/FastDateFormat$TimeZoneNumberRule.class'        : '0217783a5cac5dc5ab9e32c7c1b82d63',\n    'time/FastDateFormat$TwelveHourField.class'           : '17aa8c1efb59e32ab1c3309a315a2d4a',\n    'time/FastDateFormat$TwentyFourHourField.class'       : 'a1a4a9dae07bb5f8406e4b21d36fe6a3',\n    'time/FastDateFormat$TwoDigitMonthField.class'        : 'c5ace49716048e8f189fc1b24bad9a96',\n    'time/FastDateFormat$TwoDigitNumberField.class'       : '92b23f96a47805d2f35df7436e268186',\n    'time/FastDateFormat$TwoDigitYearField.class'         : '876f335aad5398564e7065a6dc049e35',\n    'time/FastDateFormat$UnpaddedMonthField.class'        : '4471d8973417c87437795a7c14f6e1d9',\n    'time/FastDateFormat$UnpaddedNumberField.class'       : '26bc03b8208bb6e1f5d815029165fde9',\n    'time/FastDateFormat.class'                           : '81458555c631fd1cd7d1c7b580a252d0',\n    'time/StopWatch.class'                                : 'c9cd6ccf4eb13950ce32bccc4229d3d2',\n    'UnhandledException.class'                            : '01110b3515eb3f010cbc0485f1cb9b02',\n    'Validate.class'                                      : 'ee955facbc21ae85ba81f2ca10c2dbb9',\n    'WordUtils.class'                                     : '771ffae0f501e8378cda1a516bda46b2',\n]\n\ndef jarFile = new JarFile( new File( basedir, \"target/mshade-391-1.0.jar\" ) )\ntry\n{\n    originalChecksumsMD5.each { checksumEntry ->\n        def entryPath = \"org/apache/commons/lang/$checksumEntry.key\"\n        def bytes = jarFile.getInputStream(jarFile.getJarEntry(entryPath)).bytes\n        def jarEntryMD5 = MessageDigest.getInstance(\"MD5\").digest(bytes).encodeHex().toString()\n        assert checksumEntry.value == jarEntryMD5\n    }\n    true\n}\nfinally\n{\n    jarFile.close()\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# jdependency-2.6.0 needs Java 8+\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.acme</groupId>\n    <artifactId>module-with-services</artifactId>\n    <version>1.0</version>\n\n    <properties>\n        <maven.compiler.source>8</maven.compiler.source>\n        <maven.compiler.target>8</maven.compiler.target>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <id>shade</id>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                        <minimizeJar>true</minimizeJar>\n                        <entryPoints>\n                            <entryPoint>org.acme.Application</entryPoint>\n                        </entryPoints>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/Application.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\nimport java.util.ServiceLoader;\n\npublic class Application\n{\n    private UsedClass usedClass = new UsedClass();\n\n    public static void main( String[] args )\n    {\n        ServiceLoader.load( UsedService.class );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/UnusedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\npublic class UnusedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/UnusedService.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\npublic interface UnusedService\n{\n    public void doSomething();\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/UnusedServiceImplA.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\npublic class UnusedServiceImplA implements UnusedService\n{\n    @Override\n    public void doSomething()\n    {\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/UnusedServiceImplB.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\npublic class UnusedServiceImplB implements UnusedService\n{\n    @Override\n    public void doSomething()\n    {\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/UsedClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\npublic class UsedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/UsedService.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\npublic interface UsedService\n{\n    public void doSomething();\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/UsedServiceUnusedImpl.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\npublic class UsedServiceUnusedImpl implements UsedService\n{\n    @Override\n    public void doSomething()\n    {\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/java/org/acme/UsedServiceUsedImpl.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.acme;\n\npublic class UsedServiceUsedImpl implements UsedService\n{\n    @Override\n    public void doSomething()\n    {\n    }\n}\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/resources/META-INF/services/org.acme.UnusedService",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n# These services are defined, but not used in the entry point or any of its dependency classes\norg.acme.UnusedServiceUsedImplA\norg.acme.UnusedServiceUsedImplB\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/src/main/resources/META-INF/services/org.acme.UsedService",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\norg.acme.UsedServiceUsedImpl\n\n# This implementation is *not* used:\n# org.acme.UsedServiceUnusedImpl\n"
  },
  {
    "path": "src/it/projects/MSHADE-400_self-minimized-services/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"META-INF/services/org.acme.UsedService\",\n    \"org/acme/Application.class\",\n    \"org/acme/UsedClass.class\",\n    \"org/acme/UsedService.class\",\n    \"org/acme/UsedServiceUsedImpl.class\"\n};\n\nString[] unwanted =\n{\n    // Unused SPI config files are not removed\n    //\"META-INF/services/org.acme.UnusedService\",\n    \"org/acme/UsedServiceUnusedImpl.class\",\n    \"org/acme/UnusedClass.class\",\n    \"org/acme/UnusedService.class\",\n    \"org/acme/UnusedServiceImplA.class\",\n    \"org/acme/UnusedServiceImplB.class\"\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/module-with-services-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/MSHADE-413-parallel/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.timeoutInSeconds=60\ninvoker.goals = clean install -T2 -pl p1/ -pl p2/\n"
  },
  {
    "path": "src/it/projects/MSHADE-413-parallel/p1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.its.shade.parallel</groupId>\n    <artifactId>mshade413-parent</artifactId>\n    <version>1.0</version>\n  </parent>\n\n  <artifactId>mshade413-p1</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-413-p1</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.projectnessie</groupId>\n      <artifactId>nessie-spark-extensions-base</artifactId>\n      <version>0.22.0</version>\n    </dependency>\n    <dependency>\n      <groupId>org.projectnessie</groupId>\n      <artifactId>nessie-spark-extensions-base</artifactId>\n      <version>0.22.0</version>\n      <classifier>tests</classifier>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.iceberg</groupId>\n      <artifactId>iceberg-spark3-runtime</artifactId>\n      <version>0.13.1</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.junit.jupiter</groupId>\n      <artifactId>junit-jupiter-api</artifactId>\n      <version>5.8.2</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <artifactSet>\n            <includes>\n              <include>org.projectnessie</include>\n            </includes>\n          </artifactSet>\n        </configuration>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-413-parallel/p2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.its.shade.parallel</groupId>\n    <artifactId>mshade413-parent</artifactId>\n    <version>1.0</version>\n  </parent>\n\n  <artifactId>mshade413-p2</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-413-p2</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.projectnessie</groupId>\n      <artifactId>nessie-spark-extensions-base</artifactId>\n      <version>0.22.0</version>\n    </dependency>\n    <dependency>\n      <groupId>org.projectnessie</groupId>\n      <artifactId>nessie-spark-extensions-base</artifactId>\n      <version>0.22.0</version>\n      <classifier>tests</classifier>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.iceberg</groupId>\n      <artifactId>iceberg-spark3-runtime</artifactId>\n      <version>0.13.1</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.junit.jupiter</groupId>\n      <artifactId>junit-jupiter-api</artifactId>\n      <version>5.8.2</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <artifactSet>\n            <includes>\n              <include>org.projectnessie</include>\n            </includes>\n          </artifactSet>\n        </configuration>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-413-parallel/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.parallel</groupId>\n  <artifactId>mshade413-parent</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-413</name>\n  <description>\n    Test that shade works in two parallel project builds.\n  </description>\n\n  <modules>\n    <module>p1</module>\n    <module>p2</module>\n  </modules>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-420/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals.1 = clean package -DfinalName=current-OS dependency:copy-dependencies\n\ninvoker.mavenOpts.2=-Duser.timezone=Etc/UTC\ninvoker.goals.2 = package -DfinalName=UTC\ninvoker.mavenOpts.3=-Duser.timezone=Asia/Tokyo\ninvoker.goals.3 = package -DfinalName=Tokyo\ninvoker.mavenOpts.4=-Duser.timezone=Canada/Yukon\ninvoker.goals.4 = package -DfinalName=Yukon\n"
  },
  {
    "path": "src/it/projects/MSHADE-420/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.parallel</groupId>\n  <artifactId>mshade420</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-420</name>\n  <description>\n    Some jar entries are timezone-sensitive.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>net.java.dev.jna</groupId>\n      <artifactId>jna</artifactId>\n      <version>5.13.0</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <finalName>${finalName}</finalName>\n              <filters>\n                <filter>\n                  <artifact>net.java.dev.jna:jna</artifact>\n                  <excludes><!-- exclude files not having the issue, to ease review -->\n                    <exclude>META-INF/*</exclude>\n                    <exclude>**/*.class</exclude>\n                    <exclude>com/sun/jna/win32**/*</exclude>\n                  </excludes>\n                </filter>\n              </filters>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-dependency-plugin</artifactId>\n        <version>3.5.0</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>copy-dependencies</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-420/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.security.MessageDigest\nimport java.util.jar.JarFile\n\nString describeEntry(JarFile jar, String name, long time) {\n    def entry = jar.getEntry(name)\n    return String.format(\"  - %-47s: time = %d, lastModified = %s = diff %d min., extra = %b\", name, entry.getTime(), entry.getLastModifiedTime().toString(),\n           (long)((entry.getTime() / 1000L - time)/60L), entry.getExtra() != null)\n}\n\nString describeJar(JarFile jar) {\n    return describeEntry(jar, \"com/sun/jna/openbsd-x86-64/libjnidispatch.so\", 1671223758L) + '\\n'\\\n         + describeEntry(jar, \"com/sun/jna/linux-loongarch64/libjnidispatch.so\", 1671223358L)\n}\n\nString describe(String name) {\n    def file = new File(basedir, \"target/\" + name)\n    def jar = new JarFile(file)\n\n    println(name)\n    return \"sha1 = \" + MessageDigest.getInstance(\"SHA1\").digest(file.bytes).encodeHex().toString()\\\n         + \"\\n\" + describeJar(jar)\n}\n\nvoid describeTz(TimeZone tz) {\n    println(\"TZ = \" + tz.getID() + \", raw offset = \" + tz.getRawOffset() / 60000 + \" min., offset to current TZ = \" + (tz.getRawOffset() - TimeZone.getDefault().getRawOffset()) / 60000 + \" min.\")\n}\n\ndescribeTz(TimeZone.getDefault())\nprintln(describe(\"dependency/jna-5.13.0.jar\"))\nprintln(describe(\"current-OS.jar\"))\ndef utcDescription = describe(\"UTC.jar\")\ndescribeTz(TimeZone.getTimeZone(\"Etc/UTC\"))\nprintln(utcDescription)\ndef tokyoDescription = describe(\"Tokyo.jar\")\ndescribeTz(TimeZone.getTimeZone(\"Asia/Tokyo\"))\nprintln(tokyoDescription)\ndescribeTz(TimeZone.getTimeZone(\"Canada/Yukon\"))\nprintln(describe(\"Yukon.jar\"))\n\nassert utcDescription == tokyoDescription"
  },
  {
    "path": "src/it/projects/MSHADE-420/zipdetails.txt",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# extract of zipdetails tool (https://perldoc.perl.org/zipdetails) output on target/dependency/jna-5.13.0.jar\n# and on UTC.jar and Tokyo.jar\n# to compare details of a problematic zip entry vs non-problematic in origin jar\n# vs in shaded jars\n#\n\n# extracts from *.zipdetails.txt and *.zipdetails-stderr.txt files generated by:\n$ for n in UTC Tokyo dependency/jna-5.13.0 ; do sha1sum $n.jar ; zipdetails $n.jar > $n-zipdetails.txt 2> $n-zipdetails-stderr.txt ; done\n2f9bd2808b7f93058abd8a66e160b699e2ff53f1  UTC.jar\nbc0b043cbcdda98b53d9aa8f8ef3a4e7f6624708  Tokyo.jar\n1200e7ebeedbe0d10062093f32925a912020e747  dependency/jna-5.13.0.jar\n# done on my own Linux box with Paris TZ in January 2024 (I don't know if other OS TZ may have an impact, or daylight savings,\n# recording details for comparing with anybody getting different results on SHA1s)\n# focused on problematic zip entries com/sun/jna/openbsd-x86-64/libjnidispatch.so vs non-problematic com/sun/jna/linux-loongarch64/libjnidispatch.so\n\n# initial zipdetails contains 2 \"Extra ID\" fields\n\n##\n## jna-5.13.0.jar\n##\n# zip entry in jna-5.13.0.jar causing the issue\nADD 1600309 1648805 CENTRAL HEADER ref Local #B5: com/sun/jna/openbsd-x86-64/libjnidispatch.so\n1CAAA1 CENTRAL HEADER #B5    02014B50\n1CAAA5 Created Zip Spec      14 '2.0'\n1CAAA6 Created OS            03 'Unix'\n1CAAA7 Extract Zip Spec      0A '1.0'\n1CAAA8 Extract OS            00 'MS-DOS'\n1CAAA9 General Purpose Flag  0800\n       [Bits 1-2]            0 'Normal Compression'\n       [Bit 11]              1 'Language Encoding'\n1CAAAB Compression Method    0008 'Deflated'\n1CAAAD Last Mod Time         5590AE29 'Fri Dec 16 21:49:18 2022'\n1CAAB1 CRC                   9D24CF73\n1CAAB5 Compressed Length     0000BD70\n1CAAB9 Uncompressed Length   0001E03E\n1CAABD Filename Length       002C\n1CAABF Extra Length          0018\n1CAAC1 Comment Length        0000\n1CAAC3 Disk Start            0000\n1CAAC5 Int File Attributes   0000\n       [Bit 0]               0 'Binary Data'\n1CAAC7 Ext File Attributes   81ED0000\n1CAACB Local Header Offset   00186B35\n1CAACF Filename              'com/sun/jna/openbsd-x86-\n                             64/libjnidispatch.so'\n1CAAFB Extra ID #0001        5455 'UT: Extended Timestamp'\n1CAAFD   Length              0005\n1CAAFF   Flags               '03 mod access'\n1CAB00   Mod Time            639CD9CE 'Fri Dec 16 21:49:18 2022'\n1CAB04 Extra ID #0002        7875 'ux: Unix Extra Type 3'\n1CAB06   Length              000B\n1CAB08   Version             01\n1CAB09   UID Size            04\n1CAB0A   UID                 00000000\n1CAB0E   GID Size            04\n1CAB0F   GID                 00000000\n\n# usual zip entry jna-5.13.0.jar, not causing any issue\nADD 1059307 1109553 CENTRAL HEADER ref Local #A1: com/sun/jna/linux-loongarch64/libjnidispatch.so\n1CA392 CENTRAL HEADER #A1    02014B50\n1CA396 Created Zip Spec      14 '2.0'\n1CA397 Created OS            03 'Unix'\n1CA398 Extract Zip Spec      0A '1.0'\n1CA399 Extract OS            00 'MS-DOS'\n1CA39A General Purpose Flag  0800\n       [Bits 1-2]            0 'Normal Compression'\n       [Bit 11]              1 'Language Encoding'\n1CA39C Compression Method    0008 'Deflated'\n1CA39E Last Mod Time         5590AD53 'Fri Dec 16 21:42:38 2022'\n1CA3A2 CRC                   1AA0D033\n1CA3A6 Compressed Length     0000C446\n1CA3AA Uncompressed Length   0005B768\n1CA3AE Filename Length       002F\n1CA3B0 Extra Length          0000\n1CA3B2 Comment Length        0000\n1CA3B4 Disk Start            0000\n1CA3B6 Int File Attributes   0000\n       [Bit 0]               0 'Binary Data'\n1CA3B8 Ext File Attributes   81A40000\n1CA3BC Local Header Offset   001029EB\n1CA3C0 Filename              'com/sun/jna/linux-\n                             loongarch64/libjnidispatch.so'\n\n\n##\n## UTC.jar = shaded content with JVM UTC TZ\n##\n# zip entry in UTC.jar having an issue\nADD 1317115 1365611 CENTRAL HEADER ref Local #38: com/sun/jna/openbsd-x86-64/libjnidispatch.so\n14E7BF CENTRAL HEADER #38    02014B50\n14E7C3 Created Zip Spec      14 '2.0'\n14E7C4 Created OS            00 'MS-DOS'\n14E7C5 Extract Zip Spec      14 '2.0'\n14E7C6 Extract OS            00 'MS-DOS'\n14E7C7 General Purpose Flag  0808\n       [Bits 1-2]            0 'Normal Compression'\n       [Bit  3]              1 'Streamed'\n       [Bit 11]              1 'Language Encoding'\n14E7C9 Compression Method    0008 'Deflated'\n14E7CB Last Mod Time         5590A629 'Fri Dec 16 20:49:18 2022'\n14E7CF CRC                   9D24CF73\n14E7D3 Compressed Length     0000BD70\n14E7D7 Uncompressed Length   0001E03E\n14E7DB Filename Length       002C\n14E7DD Extra Length          0000\n14E7DF Comment Length        0000\n14E7E1 Disk Start            0000\n14E7E3 Int File Attributes   0000\n       [Bit 0]               0 'Binary Data'\n14E7E5 Ext File Attributes   00000000\n14E7E9 Local Header Offset   001418FB\n14E7ED Filename              'com/sun/jna/openbsd-x86-\n                             64/libjnidispatch.so'\n\n# zip entry in UTC.jar not having an issue\nADD 776025 826271 CENTRAL HEADER ref Local #24: com/sun/jna/linux-loongarch64/libjnidispatch.so\n14E188 CENTRAL HEADER #24    02014B50\n14E18C Created Zip Spec      14 '2.0'\n14E18D Created OS            00 'MS-DOS'\n14E18E Extract Zip Spec      14 '2.0'\n14E18F Extract OS            00 'MS-DOS'\n14E190 General Purpose Flag  0808\n       [Bits 1-2]            0 'Normal Compression'\n       [Bit  3]              1 'Streamed'\n       [Bit 11]              1 'Language Encoding'\n14E192 Compression Method    0008 'Deflated'\n14E194 Last Mod Time         5590AD53 'Fri Dec 16 21:42:38 2022'\n14E198 CRC                   1AA0D033\n14E19C Compressed Length     0000C446\n14E1A0 Uncompressed Length   0005B768\n14E1A4 Filename Length       002F\n14E1A6 Extra Length          0000\n14E1A8 Comment Length        0000\n14E1AA Disk Start            0000\n14E1AC Int File Attributes   0000\n       [Bit 0]               0 'Binary Data'\n14E1AE Ext File Attributes   00000000\n14E1B2 Local Header Offset   000BD759\n14E1B6 Filename              'com/sun/jna/linux-\n                             loongarch64/libjnidispatch.so'\n\n\n##\n## Tokyo.jar = shaded content with JVM Asia/Tokyo TZ\n##\n# zip entry in Tokyo.jar having an issue\nADD 1317115 1365611 CENTRAL HEADER ref Local #38: com/sun/jna/openbsd-x86-64/libjnidispatch.so\n14E7BF CENTRAL HEADER #38    02014B50\n14E7C3 Created Zip Spec      14 '2.0'\n14E7C4 Created OS            00 'MS-DOS'\n14E7C5 Extract Zip Spec      14 '2.0'\n14E7C6 Extract OS            00 'MS-DOS'\n14E7C7 General Purpose Flag  0808\n       [Bits 1-2]            0 'Normal Compression'\n       [Bit  3]              1 'Streamed'\n       [Bit 11]              1 'Language Encoding'\n14E7C9 Compression Method    0008 'Deflated'\n14E7CB Last Mod Time         55912E29 'Sat Dec 17 05:49:18 2022'\n14E7CF CRC                   9D24CF73\n14E7D3 Compressed Length     0000BD70\n14E7D7 Uncompressed Length   0001E03E\n14E7DB Filename Length       002C\n14E7DD Extra Length          0000\n14E7DF Comment Length        0000\n14E7E1 Disk Start            0000\n14E7E3 Int File Attributes   0000\n       [Bit 0]               0 'Binary Data'\n14E7E5 Ext File Attributes   00000000\n14E7E9 Local Header Offset   001418FB\n14E7ED Filename              'com/sun/jna/openbsd-x86-\n                             64/libjnidispatch.so'\n\n# zip entry in Tokyo.jar not having an issue\nADD 776025 826271 CENTRAL HEADER ref Local #24: com/sun/jna/linux-loongarch64/libjnidispatch.so\n14E188 CENTRAL HEADER #24    02014B50\n14E18C Created Zip Spec      14 '2.0'\n14E18D Created OS            00 'MS-DOS'\n14E18E Extract Zip Spec      14 '2.0'\n14E18F Extract OS            00 'MS-DOS'\n14E190 General Purpose Flag  0808\n       [Bits 1-2]            0 'Normal Compression'\n       [Bit  3]              1 'Streamed'\n       [Bit 11]              1 'Language Encoding'\n14E192 Compression Method    0008 'Deflated'\n14E194 Last Mod Time         5590AD53 'Fri Dec 16 21:42:38 2022'\n14E198 CRC                   1AA0D033\n14E19C Compressed Length     0000C446\n14E1A0 Uncompressed Length   0005B768\n14E1A4 Filename Length       002F\n14E1A6 Extra Length          0000\n14E1A8 Comment Length        0000\n14E1AA Disk Start            0000\n14E1AC Int File Attributes   0000\n       [Bit 0]               0 'Binary Data'\n14E1AE Ext File Attributes   00000000\n14E1B2 Local Header Offset   000BD759\n14E1B6 Filename              'com/sun/jna/linux-\n                             loongarch64/libjnidispatch.so'\n"
  },
  {
    "path": "src/it/projects/MSHADE-462/all/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <parent>\n    <groupId>org.apache.maven.its.shade.sa</groupId>\n    <artifactId>mshade-462</artifactId>\n    <version>1.0-SNAPSHOT</version>\n    <relativePath>../pom.xml</relativePath>\n  </parent>\n\n  <modelVersion>4.0.0</modelVersion>\n  <artifactId>all</artifactId>\n  <packaging>jar</packaging>\n\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.sa</groupId>\n      <artifactId>one</artifactId>\n      <version>${project.version}</version>\n      <scope>compile</scope>\n      <optional>true</optional>\n    </dependency>\n  </dependencies>\n\n  <build>\n\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n          </execution>\n        </executions>\n        <configuration>\n          <createSourcesJar>true</createSourcesJar>\n          <createDependencyReducedPom>false</createDependencyReducedPom>\n          <promoteTransitiveDependencies>false</promoteTransitiveDependencies>\n          <artifactSet>\n            <includes>\n              <include>org.apache.maven.its.shade.sa:one</include>\n            </includes>\n          </artifactSet>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-462/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.timeoutInSeconds=60\ninvoker.goals = clean install\n"
  },
  {
    "path": "src/it/projects/MSHADE-462/one/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.its.shade.sa</groupId>\n    <artifactId>mshade-462</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>one</artifactId>\n  <packaging>jar</packaging>\n\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-462/one/src/main/java/org/apache/one/One.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.apache.one;\n\npublic class One {\n\n}"
  },
  {
    "path": "src/it/projects/MSHADE-462/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project>\n  <parent>\n    <groupId>org.apache</groupId>\n    <artifactId>apache</artifactId>\n    <version>31</version>\n  </parent>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.sa</groupId>\n  <artifactId>mshade-462</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencyManagement>\n    <dependencies>\n      <dependency>\n        <groupId>org.apache.maven.its.shade.sa</groupId>\n        <artifactId>one</artifactId>\n        <version>${project.version}</version>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <modules>\n    <module>one</module>\n    <module>all</module>\n  </modules>\n  <build>\n\n  <plugins>\n    <plugin>\n      <groupId>org.apache.maven.plugins</groupId>\n      <artifactId>maven-compiler-plugin</artifactId>\n      <version>@version.maven-compiler-plugin@</version>\n      <configuration>\n        <compilerArgs>\n          <compilerArg>-proc:none</compilerArg>\n          <compilerArg>-parameters</compilerArg>\n        </compilerArgs>\n        <fork>true</fork>\n        <source>1.8</source>\n        <target>1.8</target>\n        <encoding>UTF-8</encoding>\n      </configuration>\n    </plugin>\n  </plugins>\n</build>\n\n</project>"
  },
  {
    "path": "src/it/projects/MSHADE-467_parallel-dependency-reduced-pom/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals = package -T 4\n"
  },
  {
    "path": "src/it/projects/MSHADE-467_parallel-dependency-reduced-pom/pom.xml",
    "content": "<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.apache.maven.its.shade.parallel</groupId>\n    <artifactId>MSHADE-467</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>pom</packaging>\n\n    <modules>\n        <module>shadeMT1</module>\n        <module>shadeMT2</module>\n        <module>shadeMT3</module>\n        <module>shadeMT4</module>\n    </modules>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.commons</groupId>\n            <artifactId>commons-vfs2</artifactId>\n            <version>2.9.0</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>commons-logging</groupId>\n                    <artifactId>commons-logging</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.apache.hadoop</groupId>\n                    <artifactId>*</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>com.vividsolutions</groupId>\n            <artifactId>jts</artifactId>\n            <version>1.13</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>xercesImpl</groupId>\n                    <artifactId>xerces</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>com.itextpdf</groupId>\n            <artifactId>itextpdf</artifactId>\n            <version>5.5.13.3</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>*</groupId>\n                    <artifactId>*</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.xmlgraphics</groupId>\n            <artifactId>batik-swing</artifactId>\n            <version>1.17</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>xml-apis</groupId>\n                    <artifactId>xml-apis</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.apache.xmlgraphics</groupId>\n                    <artifactId>batik-ext</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.xmlgraphics</groupId>\n            <artifactId>batik-dom</artifactId>\n            <version>1.17</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>xerces</groupId>\n                    <artifactId>xercesImpl</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.xmlgraphics</groupId>\n            <artifactId>batik-transcoder</artifactId>\n            <version>1.17</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>*</groupId>\n                    <artifactId>org.apache.avalon</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.apache.xmlgraphics</groupId>\n                    <artifactId>fop</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.springframework.boot</groupId>\n            <artifactId>spring-boot-starter-test</artifactId>\n            <version>2.7.18</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.junit.jupiter</groupId>\n                    <artifactId>junit-jupiter</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>grpc-core</artifactId>\n            <version>1.58.0</version>\n        </dependency>\n        <dependency>\n            <groupId>io.micrometer</groupId>\n            <artifactId>micrometer-registry-stackdriver</artifactId>\n            <version>1.9.16</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.annotation</groupId>\n                    <artifactId>javax.annotation-api</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.springframework.boot</groupId>\n            <artifactId>spring-boot</artifactId>\n            <version>2.7.18</version>\n        </dependency>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-simple</artifactId>\n            <version>1.7.36</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-shade-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <executions>\n                        <execution>\n                            <phase>package</phase>\n                            <goals>\n                                <goal>shade</goal>\n                            </goals>\n                            <configuration>\n                                <artifactSet>\n                                    <includes>\n                                        <include>org.springframework.boot:*</include>\n                                    </includes>\n                                </artifactSet>\n                            </configuration>\n                        </execution>\n                    </executions>\n                    <configuration>\n                        <promoteTransitiveDependencies>true</promoteTransitiveDependencies>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-467_parallel-dependency-reduced-pom/shadeMT1/pom.xml",
    "content": "<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.maven.its.shade.parallel</groupId>\n        <artifactId>MSHADE-467</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>shadeMT1</artifactId>\n\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-shade-plugin</artifactId>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-467_parallel-dependency-reduced-pom/shadeMT2/pom.xml",
    "content": "<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.maven.its.shade.parallel</groupId>\n        <artifactId>MSHADE-467</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>shadeMT2</artifactId>\n\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-shade-plugin</artifactId>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-467_parallel-dependency-reduced-pom/shadeMT3/pom.xml",
    "content": "<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.maven.its.shade.parallel</groupId>\n        <artifactId>MSHADE-467</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>shadeMT3</artifactId>\n\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-shade-plugin</artifactId>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-467_parallel-dependency-reduced-pom/shadeMT4/pom.xml",
    "content": "<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.maven.its.shade.parallel</groupId>\n        <artifactId>MSHADE-467</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>shadeMT4</artifactId>\n\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-shade-plugin</artifactId>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/MSHADE-467_parallel-dependency-reduced-pom/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n(1..4).each {\n    def exclusionCount = new File(\"$basedir/shadeMT$it/dependency-reduced-pom.xml\")\n        .readLines()\n        .findAll { it.contains '<exclusion>' }\n        .size()\n    assert exclusionCount == 5\n} || true\n"
  },
  {
    "path": "src/it/projects/artifact-includes-excludes/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.aie</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-33</name>\n  <description>\n    Test artifact selection via glob includes/excludes.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.aie</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.aie</groupId>\n      <artifactId>b</artifactId>\n      <version>0.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <artifactSet>\n                <includes>\n                  <include>org.apache.maven.its.shade.aie</include>\n                </includes>\n                <excludes>\n                  <exclude>*:b:jar:</exclude>\n                </excludes>\n              </artifactSet>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/artifact-includes-excludes/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"a.properties\",\n};\n\nString[] unwanted =\n{\n    \"b.properties\",\n    \"junit/framework/TestCase.class\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/attach-after-lifecycle-fork/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# verify -shade and -sources are attached and installed\ninvoker.goals = install\n"
  },
  {
    "path": "src/it/projects/attach-after-lifecycle-fork/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.aalf</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-44</name>\n  <description>\n    Test that attaching artifacts works when the plugin is executed after another plugin that forked the lifecycle.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-install-plugin</artifactId>\n          <version>@version.maven-install-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-source-plugin</artifactId>\n        <version>2.0.4</version>\n        <executions>\n          <!-- NOTE: This is the execution that forks the lifecycle -->\n          <execution>\n            <id>attach-sources</id>\n            <phase>package</phase>\n            <goals>\n              <goal>jar</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <!-- NOTE: It's the order of plugin executions that matters here, so run after lifecycle fork by Source Plugin -->\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shade</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/attach-after-lifecycle-fork/setup.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.*;\n\nimport org.codehaus.plexus.util.*;\n\nFile file = new File( localRepositoryPath, \"org/apache/maven/its/shade/aalf\" );\nSystem.out.println( \"Deleting \" + file );\nFileUtils.deleteDirectory( file );\n\nreturn true;\n"
  },
  {
    "path": "src/it/projects/attach-after-lifecycle-fork/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\n\nString[] paths =\n{\n    \"org/apache/maven/its/shade/aalf/test/1.0/test-1.0-shade.jar\",\n    \"org/apache/maven/its/shade/aalf/test/1.0/test-1.0-sources.jar\",\n};\n\nfor ( String path : paths )\n{\n    File file = new File( localRepositoryPath, path );\n    System.out.println( \"Checking for existence of \" + file );\n    if ( !file.isFile() )\n    {\n        throw new FileNotFoundException( \"Missing: \" + file.getAbsolutePath() );\n    }\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/projects/attached-artifact-type/consumer/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.its.shade.aat</groupId>\n    <artifactId>parent</artifactId>\n    <version>1.0</version>\n  </parent>\n\n  <artifactId>consumer</artifactId>\n  <packaging>ear</packaging>\n\n  <name>MSHADE-46 :: Shaded Artifact Consumer</name>\n  <description>\n    Test that attached shaded artifacts have the same type as the original main artifact.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.aat</groupId>\n      <artifactId>shade</artifactId>\n      <version>1.0</version>\n      <type>ejb</type>\n      <classifier>shaded</classifier>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-ear-plugin</artifactId>\n        <configuration>\n          <modules>\n            <!--\n            NOTE: In Maven 2.0.x, an artifact type mismatch will cause an early failure during dependency resolution.\n            In contrast, Maven 2.1.0 will successfully resolve the dependency from the reactor due to MNG-4056. However,\n            the resolved artifact will have the type as specified by its creator and the EAR Plugin will not accept a\n            \"jar\" for an EJB module.\n            -->\n            <ejbModule>\n              <groupId>org.apache.maven.its.shade.aat</groupId>\n              <artifactId>shade</artifactId>\n              <classifier>shaded</classifier>\n            </ejbModule>\n          </modules>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/attached-artifact-type/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# NOTE: Running only up to \"package\" is crucial, we want to check proper resolution from the reactor\ninvoker.goals = clean package\n"
  },
  {
    "path": "src/it/projects/attached-artifact-type/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.aat</groupId>\n  <artifactId>parent</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-46</name>\n  <description>\n    Test that attached shaded artifacts have the same type as the original main artifact.\n  </description>\n\n  <modules>\n    <module>shade</module>\n    <module>consumer</module>\n  </modules>\n\n  <properties>\n    <maven.test.skip>true</maven.test.skip>\n  </properties>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-install-plugin</artifactId>\n          <version>@version.maven-install-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-ear-plugin</artifactId>\n          <version>2.3.1</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-ejb-plugin</artifactId>\n          <version>2.1</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-shade-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/attached-artifact-type/shade/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.its.shade.aat</groupId>\n    <artifactId>parent</artifactId>\n    <version>1.0</version>\n  </parent>\n\n  <artifactId>shade</artifactId>\n  <!-- NOTE: Using a type different than \"jar\" is the essential part of this test -->\n  <packaging>ejb</packaging>\n\n  <name>MSHADE-46 :: Shaded Artifact Producer</name>\n  <description>\n    Test that attached shaded artifacts have the same type as the original main artifact.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>attach-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/attached-artifact-type/shade/src/main/resources/META-INF/ejb-jar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/app/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.its.shade.cdr</groupId>\n    <artifactId>mshade71</artifactId>\n    <version>1.0</version>\n  </parent>\n\n  <artifactId>test</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.cdr</groupId>\n      <artifactId>comp</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-container-default</artifactId>\n      <version>1.0-alpha-9-stable-1</version>\n      <exclusions>\n        <exclusion>\n          <groupId>junit</groupId>\n          <artifactId>junit</artifactId>\n        </exclusion>\n      </exclusions>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.maven.component.api</pattern>\n                  <shadedPattern>hidden.api</shadedPattern>\n                </relocation>\n                <relocation>\n                  <pattern>org.apache.maven.component.impl</pattern>\n                  <shadedPattern>hidden.impl</shadedPattern>\n                </relocation>\n                <relocation>\n                  <pattern>org.apache.maven.test</pattern>\n                  <shadedPattern>hidden.impl</shadedPattern>\n                </relocation>\n              </relocations>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer\"/>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>exec-maven-plugin</artifactId>\n        <version>1.1.1</version>\n        <executions>\n          <execution>\n            <id>run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>${JAVA_HOME}/bin/java</executable>\n              <arguments>\n                <argument>-classpath</argument>\n                <argument>${project.build.directory}/test-1.0.jar</argument>\n                <argument>Main</argument>\n              </arguments>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/app/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport org.apache.maven.component.api.*;\n\nimport org.codehaus.plexus.*;\n\npublic class Main\n{\n\n    public static void main( String[] args )\n        throws Exception\n    {\n        DefaultPlexusContainer container = new DefaultPlexusContainer();\n        container.initialize();\n        container.start();\n        \n        Component comp = (Component) container.lookup( Component.class.getName(), \"test\" );\n        System.out.println( comp.getId() );\n        if ( !\"test-default\".equals( comp.getId() ) )\n        {\n            throw new IllegalStateException( \"bad component \" + comp );\n        }\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/app/src/main/java/org/apache/maven/test/TestComponent.java",
    "content": "package org.apache.maven.test;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\nimport org.apache.maven.component.api.*;\n\npublic class TestComponent implements Component\n{\n\n    private Component component;\n\n    public String getId()\n    {\n        return \"test-\" + component.getId();\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/app/src/main/resources/META-INF/plexus/components.xml",
    "content": "<?xml version='1.0'?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<component-set>\n  <components>\n    <component>\n      <role>org.apache.maven.component.api.Component</role>\n      <role-hint>test</role-hint>\n      <implementation>org.apache.maven.test.TestComponent</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n      <requirements>\n        <requirement>\n          <role>org.apache.maven.component.api.Component</role>\n          <role-hint>default</role-hint>\n          <field-name>component</field-name>\n        </requirement>\n      </requirements>\n    </component>\n  </components>\n</component-set>\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/lib/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.its.shade.cdr</groupId>\n    <artifactId>mshade71</artifactId>\n    <version>1.0</version>\n  </parent>\n  <groupId>org.apache.maven.its.shade.cdr</groupId>\n  <artifactId>comp</artifactId>\n  <version>0.1</version>\n</project>\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/lib/src/main/java/org/apache/maven/component/api/Component.java",
    "content": "package org.apache.maven.component.api;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic interface Component\n{\n\n    String getId();\n\n}\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/lib/src/main/java/org/apache/maven/component/impl/DefaultComponent.java",
    "content": "package org.apache.maven.component.impl;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport org.apache.maven.component.api.*;\n\npublic class DefaultComponent implements Component\n{\n\n    public String getId()\n    {\n        return \"default\";\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/lib/src/main/resources/META-INF/plexus/components.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<component-set>\n  <components>\n    <component>\n      <role>org.apache.maven.component.api.Component</role>\n      <role-hint>default</role-hint>\n      <implementation>org.apache.maven.component.impl.DefaultComponent</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n    </component>\n  </components>\n</component-set>\n"
  },
  {
    "path": "src/it/projects/component-descriptor-relocation/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n\n  <groupId>org.apache.maven.its.shade.cdr</groupId>\n  <artifactId>mshade71</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-71</name>\n  <description>\n    Test that Plexus component descriptors get adjusted to account for relocation of role/impl classes.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n  \n  <modules>\n    <module>lib</module>\n    <module>app</module>\n  </modules>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drp</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-53</name>\n  <description>\n    Test that creation of the dependency reduced POM properly handles dependencies with classifiers.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drp</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drp</groupId>\n      <artifactId>b</artifactId>\n      <version>0.2</version>\n      <classifier>client</classifier>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drp</groupId>\n      <artifactId>c</artifactId>\n      <version>1</version>\n      <type>pom</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n\t      <!-- allow testing that pom dependencies are omitted with p-t-d -->\n\t      <promoteTransitiveDependencies>true</promoteTransitiveDependencies>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <createDependencyReducedPom>true</createDependencyReducedPom>\n              <dependencyReducedPomLocation>target/dependency-reduced-pom.xml</dependencyReducedPomLocation>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport groovy.xml.XmlParser\n\nFile pomFile = new File( basedir, \"target/dependency-reduced-pom.xml\" );\nassert pomFile.isFile()\n\ndef ns = new groovy.xml.Namespace(\"http://maven.apache.org/POM/4.0.0\") \ndef pom = new XmlParser().parse( pomFile )\n\nassert pom[ns.modelVersion].size() == 1\nassert pom[ns.dependencies][ns.dependency].size() == 0\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-artifactset-provided-excludes/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpape</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-311</name>\n  <description>\n    Tests that creation of the dependency reduced POM does not create excludes for a provided transitive dependency.\n    This dependency 'c' is a compile dependency of 'b' which is a provided dependency of this project.\n    Shade-plugin is configured to only include (compile) dependency 'a', not 'b' (which must therefore be retained).\n    Additionally (to prevent regressions), this project has a provided dependency 'd' which depends on 'e', but 'e' is excluded.\n    That exclusion must be retained in the dependency reduced POM.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drpape</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drpape</groupId>\n      <artifactId>b</artifactId>\n      <version>0.1</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drpape</groupId>\n      <artifactId>d</artifactId>\n      <version>0.1</version>\n      <scope>provided</scope>\n      <exclusions>\n        <exclusion>\n          <groupId>org.apache.maven.its.shade.drpape</groupId>\n          <artifactId>e</artifactId>\n        </exclusion>\n      </exclusions>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>true</createDependencyReducedPom>\n              <dependencyReducedPomLocation>target/dependency-reduced-pom.xml</dependencyReducedPomLocation>\n              <artifactSet>\n                <includes>\n                  <include>org.apache.maven.its.shade.drpape:a</include>\n                </includes>\n              </artifactSet>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-artifactset-provided-excludes/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport groovy.xml.XmlParser\n\nFile pomFile = new File( basedir, \"target/dependency-reduced-pom.xml\" );\nassert pomFile.isFile()\n\ndef ns = new groovy.xml.Namespace(\"http://maven.apache.org/POM/4.0.0\") \ndef pom = new XmlParser().parse( pomFile )\n\nassert pom[ns.modelVersion].size() == 1\n\nassert pom[ns.dependencies][ns.dependency].size() == 2\n\ndef depB = pom[ns.dependencies][ns.dependency][0]\nassert depB[ns.artifactId].text().equals('b')\nassert depB[ns.scope].text().equals('provided')\nassert depB[ns.exclusions][ns.exclusion].size() == 0\n\ndef depD = pom[ns.dependencies][ns.dependency][1]\nassert depD[ns.artifactId].text().equals('d')\nassert depD[ns.scope].text().equals('provided')\ndef depDExclusions = depD[ns.exclusions][ns.exclusion]\nassert depDExclusions.size() == 1\nassert depDExclusions[0][ns.artifactId].text().equals('e')\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-exclusions/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.timeoutInSeconds=60"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-exclusions/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpe</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-223</name>\n  <description>\n    Test that creation of the dependency reduced POM properly handles dependencies with classifiers.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drpe</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1</version>\n      <exclusions>\n        <exclusion>\n          <groupId>org.apache.maven.its.shade.drpe</groupId>\n          <artifactId>c</artifactId>\n        </exclusion>\n      </exclusions>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <createDependencyReducedPom>true</createDependencyReducedPom>\n              <artifactSet>\n                <includes>\n                  <include>org.apache.maven.its.shade.drpe:a</include>\n                </includes>\n              </artifactSet>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-exclusions/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport groovy.xml.XmlParser\n\nFile pomFile = new File( basedir, \"dependency-reduced-pom.xml\" )\nassert pomFile.isFile()\n\ndef ns = new groovy.xml.Namespace(\"http://maven.apache.org/POM/4.0.0\") \ndef pom = new XmlParser().parse( pomFile )\n\nassert pom[ns.modelVersion].size() == 1\nassert pom[ns.dependencies][ns.dependency].size() == 2\nassert pom[ns.dependencies][ns.dependency][0][ns.exclusions][ns.exclusion].size() == 1\nassert pom[ns.dependencies][ns.dependency][1][ns.exclusions][ns.exclusion].size() == 1\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-relocated-result/child/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.its.shade.drpwlp</groupId>\n    <artifactId>parent</artifactId>\n    <version>1.0</version>\n  </parent>\n\n    <artifactId>child</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-66</name>\n  <description>\n    Test that creation of the dependency reduced POM succeeds if the POM inherits from a parent that is only\n    locally available. In other words, the parent can only be resolved by following the relativePath in the POM\n    which demands for the dependency reduced POM to reside in the original project directory.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <createDependencyReducedPom>true</createDependencyReducedPom>\n              <dependencyReducedPomLocation>target/drp.xml</dependencyReducedPomLocation>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-relocated-result/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals = clean package\ninvoker.project = child\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-relocated-result/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpwlp</groupId>\n  <artifactId>parent</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-66</name>\n  <description>\n    Test that creation of the dependency reduced POM succeeds if the POM inherits from a parent that is only\n    locally available. In other words, the parent can only be resolved by following the relativePath in the POM\n    which demands for the dependency reduced POM to reside in the original project directory.\n  </description>\n\n  <modules>\n    <module>child</module>\n  </modules>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-install-plugin</artifactId>\n          <version>@version.maven-install-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-jar-plugin</artifactId>\n          <version>@version.maven-jar-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-resources-plugin</artifactId>\n          <version>@version.maven-resources-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-shade-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-surefire-plugin</artifactId>\n          <version>@version.maven-surefire@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-unique/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project>\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>org.apache.maven.its.shade.drp</groupId>\n    <artifactId>test</artifactId>\n    <version>1.0</version>\n\n    <name>MSHADE-53</name>\n    <description>\n    Test that creation of the dependency reduced POM properly handles dependencies with classifiers.\n  </description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.drp</groupId>\n            <artifactId>a</artifactId>\n            <version>0.1</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.drp</groupId>\n            <artifactId>b</artifactId>\n            <version>0.2</version>\n            <classifier>client</classifier>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.its.shade.drp</groupId>\n            <artifactId>c</artifactId>\n            <version>1</version>\n            <type>pom</type>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <id>shade</id>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>\n                            <shadedArtifactAttached>false</shadedArtifactAttached>\n                            <createDependencyReducedPom>true</createDependencyReducedPom>\n                            <generateUniqueDependencyReducedPom>true</generateUniqueDependencyReducedPom>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n              <groupId>org.codehaus.mojo</groupId>\n              <artifactId>properties-maven-plugin</artifactId>\n              <version>1.3.0</version>\n              <executions>\n                <execution>\n                  <goals>\n                    <goal>write-project-properties</goal>\n                  </goals>\n                  <phase>package</phase>\n                  <configuration>\n                    <outputFile>target/project.properties</outputFile>\n                  </configuration>\n                </execution>\n              </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-unique/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.Properties;\nimport groovy.xml.XmlParser\n\ndef drps = basedir.listFiles( { dir, file -> file ==~ \"dependency-reduced-.*\\\\.xml\" } as FilenameFilter )\n\nFile pomFile = drps[0]\n\ndef ns = new groovy.xml.Namespace(\"http://maven.apache.org/POM/4.0.0\") \ndef pom = new XmlParser().parse( pomFile )\n\nassert pom[ns.modelVersion].size() == 1\nassert pom[ns.dependencies][ns.dependency].size() == 0\n\ndef props = new File( basedir, \"target/project.properties\" )\nProperties properties = new Properties();\nFileInputStream inp = new FileInputStream( props );\nproperties.load( inp );\ninp.close();\n\nassert properties[\"maven.shade.dependency-reduced-pom\"] != null\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-use-base-version/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drp</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>MSHADE-136</name>\n  <description>\n    Test that creation of the dependency reduced POM properly handles snapshot dependencies with useBaseVersion.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.drp</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1-SNAPSHOT</version>\n      <scope>compile</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <useBaseVersion>true</useBaseVersion>\n              <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>\n              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>\n              <dependencyReducedPomLocation>target/dependency-reduced-pom.xml</dependencyReducedPomLocation>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-use-base-version/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport groovy.xml.XmlParser\n\nFile pomFile = new File( basedir, \"target/dependency-reduced-pom.xml\" );\nassert pomFile.isFile()\n\ndef ns = new groovy.xml.Namespace(\"http://maven.apache.org/POM/4.0.0\") \ndef pom = new XmlParser().parse( pomFile )\n\nassert pom[ns.modelVersion].size() == 1\nassert pom[ns.dependencies][ns.dependency].size() == 1\n// assert the dependency is named -SNAPSHOT and not -20130115.024354-82\nassert pom[ns.dependencies][ns.dependency][0][ns.version][0].text().equals(\"0.1-SNAPSHOT\")\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-with-local-parent/child/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.its.shade.drpwlp</groupId>\n    <artifactId>parent</artifactId>\n    <version>1.0</version>\n  </parent>\n\n    <artifactId>child</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-66</name>\n  <description>\n    Test that creation of the dependency reduced POM succeeds if the POM inherits from a parent that is only\n    locally available. In other words, the parent can only be resolved by following the relativePath in the POM\n    which demands for the dependency reduced POM to reside in the original project directory.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <createDependencyReducedPom>true</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-with-local-parent/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals = clean package\ninvoker.project = child\n"
  },
  {
    "path": "src/it/projects/dep-reduced-pom-with-local-parent/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.drpwlp</groupId>\n  <artifactId>parent</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-66</name>\n  <description>\n    Test that creation of the dependency reduced POM succeeds if the POM inherits from a parent that is only\n    locally available. In other words, the parent can only be resolved by following the relativePath in the POM\n    which demands for the dependency reduced POM to reside in the original project directory.\n  </description>\n\n  <modules>\n    <module>child</module>\n  </modules>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-install-plugin</artifactId>\n          <version>@version.maven-install-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-jar-plugin</artifactId>\n          <version>@version.maven-jar-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-resources-plugin</artifactId>\n          <version>@version.maven-resources-plugin@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-shade-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-surefire-plugin</artifactId>\n          <version>@version.maven-surefire@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-with-reloc/app/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.dcwr</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-30</name>\n  <description>\n    Test that duplicate classes/resources on the class path are gracefully handled.\n  </description>\n\n  <!--\n  These dependencies contain the same class/resource. In reality, this might happen for API JARs that have been\n  packaged by different providers and hence have different group identifiers.\n  -->\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.dcwr</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.dcwr</groupId>\n      <artifactId>b</artifactId>\n      <version>0.1</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <!-- NOTE: This test checks the code path using class relocation -->\n              <relocations>\n                <relocation>\n                  <pattern>org.apache</pattern>\n                  <shadedPattern>hidden</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-with-reloc/libs/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.dcwr</groupId>\r\n  <artifactId>a</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-with-reloc/libs/b-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.dcwr</groupId>\r\n  <artifactId>b</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-with-reloc/libs/src/main/java/org/apache/maven/its/shade/MyInterface.java",
    "content": "package org.apache.maven.its.shade;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic interface MyInterface\n{\n    void execute();\n}\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-with-reloc/libs/src/main/java/org/apache/maven/its/shade/impl/MyImpl.java",
    "content": "package org.apache.maven.its.shade.impl;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport org.apache.maven.its.shade.MyInterface;\n\npublic class MyImpl implements MyInterface\n{\n    @Override\n    public void execute()\n    {\n        // do nothing\n    }\n}\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-with-reloc/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.dcwr</groupId>\n  <artifactId>mshade30</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-30</name>\n  <description>\n    Test that duplicate classes/resources on the class path are gracefully handled.\n  </description>\n  \n  <modules>\n    <module>libs/a-0.1.pom</module>\n    <module>libs/b-0.1.pom</module>\n    <module>app</module>\n  </modules>\n</project>\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-without-reloc/app/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.dcwor</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <!--\n  These dependencies contain the same class/resource. In reality, this might happen for API JARs that have been\n  packaged by different providers and hence have different group identifiers.\n  -->\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.dcwor</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.dcwor</groupId>\n      <artifactId>b</artifactId>\n      <version>0.1</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <!-- NOTE: This test checks the code path not using class relocation -->\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-without-reloc/libs/a-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.dcwor</groupId>\r\n  <artifactId>a</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-without-reloc/libs/b-0.1.pom",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project>\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.dcwor</groupId>\r\n  <artifactId>b</artifactId>\r\n  <version>0.1</version>\r\n  <packaging>jar</packaging>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-without-reloc/libs/src/main/java/org/apache/maven/its/shade/MyInterface.java",
    "content": "package org.apache.maven.its.shade;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic interface MyInterface\n{\n    void execute();\n}\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-without-reloc/libs/src/main/java/org/apache/maven/its/shade/impl/MyImpl.java",
    "content": "package org.apache.maven.its.shade.impl;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport org.apache.maven.its.shade.MyInterface;\n\npublic class MyImpl implements MyInterface\n{\n    @Override\n    public void execute()\n    {\n        // do nothing\n    }\n}\n"
  },
  {
    "path": "src/it/projects/duplicate-classes-without-reloc/libs/src/main/resources/some-ordinary-resource.txt",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License."
  },
  {
    "path": "src/it/projects/duplicate-classes-without-reloc/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.dcwor</groupId>\n  <artifactId>mshade30</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-30</name>\n  <description>\n    Test that duplicate classes/resources on the class path are gracefully handled.\n  </description>\n\n  <modules>\n    <module>libs/a-0.1.pom</module>\n    <module>libs/b-0.1.pom</module>\n    <module>app</module>\n  </modules>\n</project>\n"
  },
  {
    "path": "src/it/projects/empty-apache-notice-transform/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project\n  xmlns=\"http://maven.apache.org/POM/4.0.0\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"\n>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.eant</groupId>\n  <artifactId>empty-apache-notice-transform</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n  \n  <name>MSHADE-101</name>\n  <description>\n    Test that NullPointerException is not thrown when projectName parameter is unset.\n  </description>\n  \n\n  <dependencies>\n    <dependency>\n        <groupId>org.apache.velocity</groupId>\n        <artifactId>velocity</artifactId>\n        <version>1.7</version>\n    </dependency>\n  \n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n  \n            <configuration>\n               <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer\">\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/projects/empty-relocation-pattern/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.buildResult = failure\n"
  },
  {
    "path": "src/it/projects/empty-relocation-pattern/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project\n  xmlns=\"http://maven.apache.org/POM/4.0.0\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"\n>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.eant</groupId>\n  <artifactId>empty-relocation-pattern</artifactId>\n  <version>0.1-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  \n  <name>Prevent usage of empty pattern</name>\n  <description>\n    Test that relocations with empty patterns lead to build failure (https://github.com/apache/maven-shade-plugin/issues/793).\n  </description>\n  \n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <relocations>\n                <relocation>\n                  <!-- not valid -->\n                  <pattern />\n                  <shadedPattern>org.example</shadedPattern>\n                </relocation>\n              </relocations>              \n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/projects/empty-relocation-shaded-pattern/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project\n  xmlns=\"http://maven.apache.org/POM/4.0.0\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.eant</groupId>\n  <artifactId>empty-relocation-shaded-pattern</artifactId>\n  <version>0.1-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  \n  <name>MSHADE-94</name>\n  <description>\n    Test that NullPointerException is not thrown when shadedPattern parameter is unset.\n  </description>\n  \n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n  \n            <configuration>\n              <relocations>\n                <relocation>\n                  <pattern>org.example</pattern>\n                  <shadedPattern/>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/projects/extrajar/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.extrajar</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>extrajar</name>\n  <description>\n    Test that asserts addition of extra-jars.\n  </description>\n\n  <properties>\n    <slf4j.version>1.7.36</slf4j.version>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-api</artifactId>\n      <version>${slf4j.version}</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <extraArtifacts>\n                <extraArtifact>org.slf4j:slf4j-simple:${slf4j.version}</extraArtifact>\n              </extraArtifacts>\n              <filters>\n                <filter>\n                  <artifact>*:*</artifact>\n                  <excludes>\n                    <exclude>META-INF/MANIFEST.MF</exclude>\n                  </excludes>\n                </filter>\n              </filters>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/extrajar/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"org/slf4j/Logger.class\",\n    \"org/slf4j/impl/SimpleLogger.class\"\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0-shaded.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/extrajar-missing-file/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.buildResult = failure\n"
  },
  {
    "path": "src/it/projects/extrajar-missing-file/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.extrajar</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>extrajar</name>\n  <description>\n    Test that asserts failure if specified extra jar is not a file.\n  </description>\n\n  <properties>\n    <slf4j.version>1.7.36</slf4j.version>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-api</artifactId>\n      <version>${slf4j.version}</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <extraJars>\n                <extraJar>${project.build.directory}/no-such-file.jar</extraJar>\n              </extraJars>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/filter-artifact-contents/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.fac</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-68</name>\n  <description>\n    Test that artifact contents can be filtered using glob includes/excludes.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.fac</groupId>\n      <artifactId>a</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.fac</groupId>\n      <artifactId>b</artifactId>\n      <version>0.1</version>\n      <classifier>client</classifier>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <filters>\n                <filter>\n                  <artifact>org.apache.maven.its.shade.fac:a</artifact>\n                  <includes>\n                    <include>**/a.properties</include>\n                  </includes>\n                </filter>\n                <filter>\n                  <artifact>org.apache.maven.its.shade.fac:b:client</artifact>\n                  <excludes>\n                    <exclude>org/apache/*</exclude>\n                    <exclude>org/apache/maven/b/</exclude>\n                  </excludes>\n                </filter>\n                <filter>\n                  <artifact>*:*</artifact>\n                  <excludes>\n                    <exclude>org/*</exclude>\n                  </excludes>\n                </filter>\n              </filters>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/filter-artifact-contents/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"a.properties\",\n    \"org/apache/a.properties\",\n    \"org/apache/maven/a.properties\",\n    \"b.properties\",\n    \"org/apache/maven/b.properties\",\n};\n\nString[] unwanted =\n{\n    \"META-INF/maven/org.apache.maven.its.shade.fac/a/pom.properties\",\n    \"org/a.properties\",\n    \"org/b.properties\",\n    \"org/apache/b.properties\",\n    \"org/apache/maven/b/b.properties\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/finalNameBuild/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals = install\n"
  },
  {
    "path": "src/it/projects/finalNameBuild/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.fnb</groupId>\n  <artifactId>finalNameBuild</artifactId>\n  <version>1.0</version>\n\n\n  <name>MSHADE-54 :: Shaded Artifact Producer</name>\n  <description>\n    Test that attached artifact has the correct finalName if\n    the finalName is set in the build section and\n    artifact attaching is NOT activated.\n  </description>\n\n  <build>\n    <finalName>MyFinalName</finalName>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>create-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/finalNameBuild/setup.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\n\nimport org.codehaus.plexus.util.*;\n\nFile file = new File( localRepositoryPath, \"org/apache/maven/its/shade/fnb\" );\nSystem.out.println( \"Deleting \" + file );\nFileUtils.deleteDirectory( file );\n\nreturn true;\n\n"
  },
  {
    "path": "src/it/projects/finalNameBuild/src/main/resources/META-INF/ejb-jar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n"
  },
  {
    "path": "src/it/projects/finalNameBuild/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\nimport java.util.regex.*;\n\ntry\n{\n    // check for primary artifact, which is actually the shaded one!\n    File file = new File( basedir, \"target/MyFinalName.jar\" );\n    System.out.println( \"file with finalName : \" + file );\n    if ( !file.exists() )\n    {\n        System.out.println( \"file with finalName does not exist: \" + file );\n        return false;\n    }\n\n    // check for original unshaded jar\n    File original = new File( basedir, \"target/original-MyFinalName.jar\" );\n    System.out.println( \"'orifinal' file with name : \" + original );\n    if ( !original.exists() )\n    {\n        System.out.println( \"'original' file does not exist: \" + original );\n        return false;\n    }\n\n    // check for the artifact in the repo. This is the shaded one!\n    File rfile = new File( localRepositoryPath\n                         ,  \"org/apache/maven/its/shade/fnb/finalNameBuild/1.0/finalNameBuild-1.0.jar\" );\n    System.out.println( \"Checking for existence in repo: \" + rfile );\n    if ( !rfile.isFile() )\n    {\n        throw new FileNotFoundException( \"Missing: \" + rfile.getAbsolutePath() );\n    }\n}\ncatch( Throwable t )\n{\n    t.printStackTrace();\n    return false;\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/projects/finalNameBuild-attached/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals = install\n"
  },
  {
    "path": "src/it/projects/finalNameBuild-attached/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.fnba</groupId>\n  <artifactId>finalNameBuildAttached</artifactId>\n  <version>1.0</version>\n\n\n  <name>MSHADE-54 :: Shaded Artifact Producer</name>\n  <description>\n    Test that attached artifact has the correct finalName if\n    the finalName is set in the build section and\n    artifact attaching is activated.\n  </description>\n\n  <build>\n    <finalName>MyFinalName</finalName>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/finalNameBuild-attached/setup.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\n\nimport org.codehaus.plexus.util.*;\n\nFile file = new File( localRepositoryPath, \"org/apache/maven/its/shade/fnba\" );\nSystem.out.println( \"Deleting \" + file );\nFileUtils.deleteDirectory( file );\n\nreturn true;\n\n"
  },
  {
    "path": "src/it/projects/finalNameBuild-attached/src/main/resources/META-INF/ejb-jar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n"
  },
  {
    "path": "src/it/projects/finalNameBuild-attached/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\nimport java.util.regex.*;\n\ntry\n{\n    // check for primary artifact, which is the unshaded one!\n    File file = new File( basedir, \"target/MyFinalName.jar\" );\n    System.out.println( \"file with finalName : \" + file );\n    if ( !file.exists() )\n    {\n        System.out.println( \"file with finalName does not exist: \" + file );\n        return false;\n    }\n\n    // check for the shaded jar\n    File shaded = new File( basedir, \"target/finalNameBuildAttached-1.0-shaded.jar\" );\n    System.out.println( \"shaded file with name : \" + shaded );\n    if ( !shaded.exists() )\n    {\n        System.out.println( \"shaded file does not exist: \" + shaded );\n        return false;\n    }\n\n    // check for the artifact in the repo (unshaded)\n    File rfile = new File( localRepositoryPath\n                         ,  \"org/apache/maven/its/shade/fnba/finalNameBuildAttached/1.0/finalNameBuildAttached-1.0.jar\" );\n    System.out.println( \"Checking for existence in repo: \" + rfile );\n    if ( !rfile.isFile() )\n    {\n        throw new FileNotFoundException( \"Missing: \" + rfile.getAbsolutePath() );\n    }\n\n    // check for the shaded artifact in the repo (shaded as attached artifact)\n    File afile = new File( localRepositoryPath\n                         ,  \"org/apache/maven/its/shade/fnba/finalNameBuildAttached/1.0/finalNameBuildAttached-1.0-shaded.jar\" );\n    System.out.println( \"Checking for existence in repo: \" + afile );\n    if ( !afile.isFile() )\n    {\n        throw new FileNotFoundException( \"Missing: \" + afile.getAbsolutePath() );\n    }\n}\ncatch( Throwable t )\n{\n    t.printStackTrace();\n    return false;\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/projects/finalNameShade/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals = install\n"
  },
  {
    "path": "src/it/projects/finalNameShade/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.fns</groupId>\n  <artifactId>finalNameShade</artifactId>\n  <version>1.0</version>\n\n\n  <name>MSHADE-54 :: Shaded Artifact Producer</name>\n  <description>\n    Test that attached artifact has the correct finalName if\n    the finalName is set in the shade plugin section and\n    artifact attaching is NOT activated.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <finalName>MyFinalShadeName</finalName>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/finalNameShade/setup.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\n\nimport org.codehaus.plexus.util.*;\n\nFile file = new File( localRepositoryPath, \"org/apache/maven/its/shade/fns\" );\nSystem.out.println( \"Deleting \" + file );\nFileUtils.deleteDirectory( file );\n\nreturn true;\n\n"
  },
  {
    "path": "src/it/projects/finalNameShade/src/main/resources/META-INF/ejb-jar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n"
  },
  {
    "path": "src/it/projects/finalNameShade/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\nimport java.util.regex.*;\n\ntry\n{\n    // check for primary artifact, which is the unshaded one!\n    File file = new File( basedir, \"target/finalNameShade-1.0.jar\" );\n    System.out.println( \"file with finalName : \" + file );\n    if ( !file.exists() )\n    {\n        System.out.println( \"file with finalName does not exist: \" + file );\n        return false;\n    }\n\n    // check for the shaded jar\n    File shaded = new File( basedir, \"target/MyFinalShadeName.jar\" );\n    System.out.println( \"shaded file with name : \" + shaded );\n    if ( !shaded.exists() )\n    {\n        System.out.println( \"shaded file does not exist: \" + shaded );\n        return false;\n    }\n\n    // check for the artifact in the repo\n    File rfile = new File( localRepositoryPath\n                         ,  \"org/apache/maven/its/shade/fns/finalNameShade/1.0/finalNameShade-1.0.jar\" );\n    System.out.println( \"Checking for existence in repo: \" + rfile );\n    if ( !rfile.isFile() )\n    {\n        throw new FileNotFoundException( \"Missing: \" + rfile.getAbsolutePath() );\n    }\n\n}\ncatch( Throwable t )\n{\n    t.printStackTrace();\n    return false;\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/projects/finalNameShade-attached/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals = install\n"
  },
  {
    "path": "src/it/projects/finalNameShade-attached/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.fnsa</groupId>\n  <artifactId>finalNameShadeAttached</artifactId>\n  <version>1.0</version>\n\n\n  <name>MSHADE-54 :: Shaded Artifact Producer</name>\n  <description>\n    Test that attached artifact has the correct finalName if\n    the finalName is set in the shade plugin section and\n    artifact attaching is activated.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <finalName>MyFinalShadeName</finalName>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/finalNameShade-attached/setup.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\n\nimport org.codehaus.plexus.util.*;\n\nFile file = new File( localRepositoryPath, \"org/apache/maven/its/shade/fnsa\" );\nSystem.out.println( \"Deleting \" + file );\nFileUtils.deleteDirectory( file );\n\nreturn true;\n\n"
  },
  {
    "path": "src/it/projects/finalNameShade-attached/src/main/resources/META-INF/ejb-jar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n"
  },
  {
    "path": "src/it/projects/finalNameShade-attached/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.*;\nimport java.util.regex.*;\n\ntry\n{\n    // check for primary artifact, which is the unshaded one!\n    File file = new File( basedir, \"target/finalNameShadeAttached-1.0.jar\" );\n    System.out.println( \"file with finalName : \" + file );\n    if ( !file.exists() )\n    {\n        System.out.println( \"file with finalName does not exist: \" + file );\n        return false;\n    }\n\n    // check for the shaded jar\n    File shaded = new File( basedir, \"target/MyFinalShadeName.jar\" );\n    System.out.println( \"shaded file with name : \" + shaded );\n    if ( !shaded.exists() )\n    {\n        System.out.println( \"shaded file does not exist: \" + shaded );\n        return false;\n    }\n\n    // check for the artifact in the repo\n    File rfile = new File( localRepositoryPath\n                         ,  \"org/apache/maven/its/shade/fnsa/finalNameShadeAttached/1.0/finalNameShadeAttached-1.0.jar\" );\n    System.out.println( \"Checking for existence in repo: \" + rfile );\n    if ( !rfile.isFile() )\n    {\n        throw new FileNotFoundException( \"Missing: \" + rfile.getAbsolutePath() );\n    }\n\n    // check for the shaded artifact in the repo\n    File afile = new File( localRepositoryPath\n                         ,  \"org/apache/maven/its/shade/fnsa/finalNameShadeAttached/1.0/finalNameShadeAttached-1.0-shaded.jar\" );\n    System.out.println( \"Checking for existence in repo: \" + afile );\n    if ( !afile.isFile() )\n    {\n        throw new FileNotFoundException( \"Missing: \" + afile.getAbsolutePath() );\n    }\n\n}\ncatch( Throwable t )\n{\n    t.printStackTrace();\n    return false;\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/projects/implicit-inclusion-of-project-artifact/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.iiopa</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-72</name>\n  <description>\n    Test that the project artifact is included in the output JAR even if it is not explicitly given\n    by the non-empty includes for the artifact set.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <artifactSet>\n                <includes>\n                  <include>junit:junit</include>\n                </includes>\n              </artifactSet>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/implicit-inclusion-of-project-artifact/src/main/java/Passed.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Passed\n{\n}\n"
  },
  {
    "path": "src/it/projects/implicit-inclusion-of-project-artifact/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"Passed.class\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/manifest-retained/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mr</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-20</name>\n  <description>\n    Test that existing manifest entries are retained upon shading.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <!-- dummy dependency to test interaction of multiple manifests -->\n      <groupId>org.apache.maven.plugins</groupId>\n      <artifactId>maven-shade-plugin</artifactId>\n      <version>@project.version@</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-install-plugin</artifactId>\n        <version>@version.maven-install-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n        <configuration>\n          <archive>\n            <manifest>\n              <mainClass>org.apache.maven.Main</mainClass>\n            </manifest>\n            <manifestEntries>\n              <Test-Entry>PASSED</Test-Entry>\n            </manifestEntries>\n          </archive>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shaded</shadedClassifierName>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/manifest-retained/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0-shaded.jar\" ) );\nManifest mf = jarFile.getManifest();\njarFile.close();\n\nif ( !\"PASSED\".equals( mf.getMainAttributes().getValue( \"Test-Entry\" ) ) )\n{\n    throw new IllegalStateException( \"MANIFEST.MF is incomplete\" );\n}\n\nif ( !\"org.apache.maven.Main\".equals( mf.getMainAttributes().getValue( \"Main-Class\" ) ) )\n{\n    throw new IllegalStateException( \"MANIFEST.MF is incomplete\" );\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/projects/manifest-transformed/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mt</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-77</name>\n  <description>\n    Test that manifest is properly transformed and ends up as the first entry in the JAR.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <!-- dummy dependency to test interaction of multiple manifests -->\n      <groupId>org.apache.maven.plugins</groupId>\n      <artifactId>maven-shade-plugin</artifactId>\n      <version>@project.version@</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-install-plugin</artifactId>\n          <version>@version.maven-install-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-jar-plugin</artifactId>\n          <version>@version.maven-jar-plugin@</version>\n        <configuration>\n          <archive>\n            <manifest>\n              <mainClass>org.apache.maven.Main</mainClass>\n            </manifest>\n            <manifestEntries>\n              <Test-Entry>FAILED</Test-Entry>\n              <Original-Entry>PASSED</Original-Entry>\n            </manifestEntries>\n          </archive>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                  <mainClass>org.apache.maven.Shade</mainClass>\n                  <manifestEntries>\n                    <Test-Entry>PASSED</Test-Entry>\n                  </manifestEntries>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/manifest-transformed/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\n// NOTE: We deliberately use JarInputStream and not JarFile here!\nJarInputStream jarStream = new JarInputStream( new FileInputStream( new File( basedir, \"target/test-1.0.jar\" ) ) );\nManifest mf = jarStream.getManifest();\njarStream.close();\n\nif ( mf == null )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF is missing\" );\n}\n\nif ( !\"PASSED\".equals( mf.getMainAttributes().getValue( \"Test-Entry\" ) ) )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF is incomplete\" );\n}\n\nif ( !\"PASSED\".equals( mf.getMainAttributes().getValue( \"Original-Entry\" ) ) )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF is incomplete\" );\n}\n\nif ( !\"org.apache.maven.Shade\".equals( mf.getMainAttributes().getValue( \"Main-Class\" ) ) )\n{\n    throw new IllegalStateException( \"META-INF/MANIFEST.MF is incomplete\" );\n}\n"
  },
  {
    "path": "src/it/projects/mini-jar/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/mini-jar/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-84</name>\n  <description>\n    Test that artifact contents can be filtered automatically to produce a mini jar that only\n    contains the referenced classes.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <minimizeJar>true</minimizeJar>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/mini-jar/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Main\n    extends junit.framework.TestCase\n{\n}\n"
  },
  {
    "path": "src/it/projects/mini-jar/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"Main.class\",\n    \"junit/framework/TestCase.class\",\n    \"junit/swingui/icons/error.gif\",\n};\n\nString[] unwanted =\n{\n    \"junit/swingui/TestRunner.class\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/mini-jar-jdk11+/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 11+\n"
  },
  {
    "path": "src/it/projects/mini-jar-jdk11+/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>testmini</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-302</name>\n  <description>\n    Test that artifact contents can be filtered automatically to produce a mini jar compiled with jdk11 that only\n    contains the referenced classes.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n        <configuration>\n          <release>${java.specification.version}</release>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <minimizeJar>true</minimizeJar>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-invoker-plugin</artifactId>\n        <version>@version.maven-invoker-plugin@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/mini-jar-jdk11+/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Main extends junit.framework.TestCase\n{\n    static class Nested { // Trigger MSHADE-302\n    }\n}\n"
  },
  {
    "path": "src/it/projects/mini-jar-jdk11+/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"Main.class\",\n    \"Main$Nested.class\",\n    \"junit/framework/TestCase.class\",\n    \"junit/swingui/icons/error.gif\",\n};\n\nString[] unwanted =\n{\n    \"junit/swingui/TestRunner.class\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/testmini-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/mini-jar-malformed-dependencies/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/mini-jar-malformed-dependencies/pom.xml",
    "content": "<?xml version='1.0'?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade</groupId>\n  <artifactId>mini-jar-malformed-dependencies-MSHADE-107</artifactId>\n  <version>1</version>\n  <name>mini-jar-malformed-dependencies-MSHADE-107</name>\n\n  <dependencies>  \n    <!-- dependencies with \"malformed classes\" that break asm's ClassReader -->\n    <!-- see also https://issues.apache.org/jira/browse/MANIMALSNIFFER-9 -->\n    <dependency>\n        <groupId>jaxen</groupId>\n        <artifactId>jaxen</artifactId>\n        <version>1.1.1</version>\n    </dependency>\n    <dependency>\n        <groupId>com.ibm.icu</groupId>\n        <artifactId>icu4j</artifactId>\n        <version>2.6.1</version>\n    </dependency>  \n  </dependencies>\n\n    <build> \n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>                        \n                        <configuration>\n                            <minimizeJar>true</minimizeJar>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>    \n</project>\n"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/jar-with-package-info/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <parent>\n    <groupId>org.apache.maven.its.shade.mjpi</groupId>\n    <artifactId>test-package-info</artifactId>\n    <version>1</version>\n  </parent>\n  <modelVersion>4.0.0</modelVersion>\n  <artifactId>dep</artifactId>\n\n  <name>jar-with-package-info</name>\n  <description>\n    Jar file with a package-info in it.\n  </description>\n</project>\n"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/jar-with-package-info/src/main/java/org/apache/maven/it/pi/HaveOneClass.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.it.pi;\n\npublic class HaveOneClass\n{\n    public static final String CONSTANT = \"variable\";  \n\n}\n"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/jar-with-package-info/src/main/java/org/apache/maven/it/pi/TestPackageAnnotation.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.it.pi;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n@Retention(RetentionPolicy.CLASS)\npublic @interface TestPackageAnnotation\n{\n\n}\n"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/jar-with-package-info/src/main/java/org/apache/maven/it/pi/package-info.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * This is some javadoc for the package org.apache.maven.it.pi.\n * \n * @since 100\n */\n@TestPackageAnnotation\npackage org.apache.maven.it.pi;"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project>\n    <modelVersion>4.0.0</modelVersion>\n    \n    <parent>\n      <groupId>org.apache.maven.plugins.shade.its</groupId>\n      <artifactId>shade-parent</artifactId>\n      <version>1.0</version>\n      <relativePath>../setup-parent</relativePath>\n    </parent>\n    \n    <groupId>org.apache.maven.its.shade.mjpi</groupId>\n    <artifactId>test-package-info</artifactId>\n    <version>1</version>\n    <packaging>pom</packaging>\n    <name>mini-jar-with-package-info</name>\n    <description>Test for minimizeJar keeping package-info around.</description>\n\n    <modules>\n        <module>jar-with-package-info</module>\n        <module>test</module>\n    </modules>\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-compiler-plugin</artifactId>\n                    <version>@version.maven-compiler-plugin@</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-shade-plugin</artifactId>\n                    <version>@project.version@</version>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/test/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.its.shade.mjpi</groupId>\n    <artifactId>test-package-info</artifactId>\n    <version>1</version>\n  </parent>\n\n  <artifactId>test</artifactId>\n\n  <name>test-shade-with-package-info</name>\n  <description>\n    Test that artifact contents can be filtered automatically to produce a mini jar that only\n    contains the referenced classes including package-info.java.\n  </description>\n\n  <dependencies>\n    <dependency>\n    <groupId>org.apache.maven.its.shade.mjpi</groupId>\n    <artifactId>dep</artifactId>\n    <version>1</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      \n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <minimizeJar>true</minimizeJar>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/test/src/main/java/org/apache/maven/it/pi/Main.java",
    "content": "package org.apache.maven.it.pi;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Main extends HaveOneClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/mini-jar-package-info/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"org/apache/maven/it/pi/Main.class\",\n    \"org/apache/maven/it/pi/HaveOneClass.class\",\n    \"org/apache/maven/it/pi/package-info.class\",\n};\n\nString[] unwanted =\n{\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"test/target/test-1.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/mini-jar-respect-includes/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/mini-jar-respect-includes/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.mj</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-111</name>\n  <description>\n    Prevent minimizeJar from excluding classes that were specifically included with filters.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.2</version>\n    </dependency>\n\n    <dependency>\n      <groupId>org.jdom</groupId>\n      <artifactId>jdom2</artifactId>\n      <version>2.0.6.1</version>\n    </dependency>\n    \n    <dependency>\n      <groupId>org.ow2.asm</groupId>\n      <artifactId>asm</artifactId>\n      <version>@asmVersion@</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <minimizeJar>true</minimizeJar>\n              <filters>\n                <filter>\n                  <artifact>junit:junit</artifact>\n                  <includes>\n                    <include>junit/framework/**</include>\n                    <include>junit/awtui/**</include>\n                    <include>junit/runner/**/*.properties</include>\n                    <include>junit/runner/**/*.gif</include>\n                    <include>junit/swingui/icons/*.gif</include>\n                  </includes>                \n                </filter>\n                <!-- make sure that include patterns only affect their specified artifacts -->\n                <filter>\n                  <artifact>org.jdom:jdom2</artifact>\n                  <includes>\n                    <include>**</include>\n                  </includes>\n                </filter>\n              </filters>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/mini-jar-respect-includes/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Main\n    extends junit.framework.TestCase\n{\n}\n"
  },
  {
    "path": "src/it/projects/mini-jar-respect-includes/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"Main.class\",\n    \"junit/framework/TestCase.class\",\n    \"junit/runner/logo.gif\",\n    \"junit/framework/Assert.class\",\n    \"org/jdom2/Document.class\"\n};\n\nString[] unwanted =\n{\n    \"junit/textui/TestRunner.class\",\n    \"org/objectweb/asm/Type.class\"\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/mshade-123/assembly.xml",
    "content": "<?xml version=\"1.0\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<assembly>\n    <id>zip</id>\n    <formats>\n        <format>zip</format>\n    </formats>\n\n    <includeBaseDirectory>true</includeBaseDirectory>\n\n    <files>\n        <file>\n            <source>sample.txt</source>\n            <outputDirectory>/</outputDirectory>\n        </file>\n    </files>\n</assembly>\n"
  },
  {
    "path": "src/it/projects/mshade-123/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/mshade-123/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <name>test</name>\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.test</groupId>\n  <artifactId>test</artifactId>\n  <version>0.0.1-SNAPSHOT</version>\n  <packaging>jar</packaging>\n\n  <parent>\n    <groupId>org.sonatype.oss</groupId>\n    <artifactId>oss-parent</artifactId>\n    <version>7</version>\n  </parent>\n\n  <dependencies>\n\n    <dependency>\n      <groupId>commons-lang</groupId>\n      <artifactId>commons-lang</artifactId>\n      <version>2.6</version>\n      <scope>compile</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n        <configuration>\n          <source>1.8</source>\n          <target>1.8</target>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-source-plugin</artifactId>\n        <version>2.1.2</version>\n        <executions>\n          <execution>\n            <id>attach-sources</id>\n            <goals>\n              <goal>jar</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n          </execution>\n        </executions>\n        <configuration>\n          <minimizeJar>true</minimizeJar>\n          <artifactSet>\n            <includes>\n              <include>commons-lang:commons-lang</include>\n            </includes>\n          </artifactSet>\n          <relocations>\n            <relocation>\n              <pattern>com.apache.commons.lang</pattern>\n              <shadedPattern>org.test.common.lang</shadedPattern>\n            </relocation>\n          </relocations>\n        </configuration>\n      </plugin>\n      <plugin>\n        <artifactId>maven-assembly-plugin</artifactId>\n        <version>@version.maven-assembly-plugin@</version>\n        <configuration>\n          <appendAssemblyId>false</appendAssemblyId>\n          <outputDirectory>${project.build.directory}/releases/</outputDirectory>\n          <descriptors>\n            <descriptor>${basedir}/assembly.xml</descriptor>\n          </descriptors>\n        </configuration>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>single</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/mshade-123/sample.txt",
    "content": "SAMPLE FILE"
  },
  {
    "path": "src/it/projects/non-runtime-scope-excluded/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.nrse</groupId>\n  <artifactId>it</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE</name>\n  <description>\n    Test that dependencies not matching runtime scope are automatically excluded.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.nrse</groupId>\n      <artifactId>system</artifactId>\n      <version>1.0</version>\n      <scope>system</scope>\n      <systemPath>${basedir}/system.jar</systemPath>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.nrse</groupId>\n      <artifactId>provided</artifactId>\n      <version>1.0</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.nrse</groupId>\n      <artifactId>compile</artifactId>\n      <version>1.0</version>\n      <scope>compile</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.nrse</groupId>\n      <artifactId>runtime</artifactId>\n      <version>1.0</version>\n      <scope>runtime</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.nrse</groupId>\n      <artifactId>test</artifactId>\n      <version>1.0</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/non-runtime-scope-excluded/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"compile.properties\",\n    \"runtime.properties\",\n};\n\nString[] unwanted =\n{\n    \"system.properties\",\n    \"provided.properties\",\n    \"test.properties\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/it-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/app/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.cdr</groupId>\n  <artifactId>mshade-135</artifactId>\n  <version>1.0</version>\n  <packaging>maven-plugin</packaging>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.cdr</groupId>\n      <artifactId>comp</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-plugin-api</artifactId>\n      <version>3.0</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.plugin-tools</groupId>\n      <artifactId>maven-plugin-annotations</artifactId>\n      <version>3.2</version>\n      <scope>provided</scope>\n     </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-plugin-plugin</artifactId>\n        <version>3.2</version>\n        <configuration>\n          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>\n        </configuration>\n        <executions>\n          <execution>\n            <id>mojo-descriptor</id>\n            <goals>\n              <goal>descriptor</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.maven.component.api</pattern>\n                  <shadedPattern>hidden.api</shadedPattern>\n                </relocation>\n                <relocation>\n                  <pattern>org.apache.maven.component.impl</pattern>\n                  <shadedPattern>hidden.impl</shadedPattern>\n                </relocation>\n                <relocation>\n                  <pattern>org.apache.maven.test</pattern>\n                  <shadedPattern>hidden.impl</shadedPattern>\n                </relocation>\n              </relocations>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer\"/>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/app/src/main/java/org/apache/maven/test/Entry.java",
    "content": "package org.apache.maven.test;\r\n\r\n/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements.  See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership.  The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License.  You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied.  See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\n\r\npublic class Entry \r\n{\r\n    \r\n}"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/app/src/main/java/org/apache/maven/test/TestMojo.java",
    "content": "package org.apache.maven.test;\r\n\r\n/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements.  See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership.  The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License.  You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied.  See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\n\r\nimport java.util.List;\r\n\r\nimport org.apache.maven.plugin.AbstractMojo;\r\nimport org.apache.maven.plugin.MojoExecutionException;\r\nimport org.apache.maven.plugin.MojoFailureException;\r\nimport org.apache.maven.plugins.annotations.Component;\r\nimport org.apache.maven.plugins.annotations.Mojo;\r\nimport org.apache.maven.plugins.annotations.Parameter;\r\n\r\n@Mojo( name = \"test\"  )\r\npublic class TestMojo extends AbstractMojo\r\n{\r\n    @Component\r\n    private org.apache.maven.component.api.Component component;\r\n    \r\n    @Parameter\r\n    private Entry entry;\r\n    \r\n    public void execute()\r\n        throws MojoExecutionException, MojoFailureException\r\n    {\r\n        \r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/lib/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.cdr</groupId>\n  <artifactId>comp</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <distributionManagement>\n    <repository>\n      <id>maven-core-it</id>\n      <url>file:///${basedir}/repo</url>\n    </repository>\n  </distributionManagement>\n\n  <build>\n    <resources>\n      <resource>\n        <directory>.</directory>\n        <includes>\n          <include>pom.xml</include>\n          <include>src/**</include>\n        </includes>\n      </resource>\n      <resource>\n        <directory>src/main/resources</directory>\n      </resource>\n    </resources>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/lib/src/main/java/org/apache/maven/component/api/Component.java",
    "content": "package org.apache.maven.component.api;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic interface Component\n{\n\n    String getId();\n\n}\n"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/lib/src/main/java/org/apache/maven/component/impl/DefaultComponent.java",
    "content": "package org.apache.maven.component.impl;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport org.apache.maven.component.api.*;\n\npublic class DefaultComponent implements Component\n{\n\n    public String getId()\n    {\n        return \"default\";\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/lib/src/main/resources/META-INF/plexus/components.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\n\n<component-set>\n  <components>\n    <component>\n      <role>org.apache.maven.component.api.Component</role>\n      <role-hint>default</role-hint>\n      <implementation>org.apache.maven.component.impl.DefaultComponent</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n    </component>\n  </components>\n</component-set>\n"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.its.shade.cdr</groupId>\r\n  <artifactId>aggregator</artifactId>\r\n  <version>1.0</version>\r\n  <packaging>pom</packaging>\r\n\r\n  <name>MSHADE-135</name>\r\n  <description>\r\n    Test that plugin descriptors get adjusted to account for relocation of role/impl classes.\r\n  </description>\r\n\r\n  <modules>\r\n    <module>lib</module>\r\n    <module>app</module>\r\n  </modules>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/plugin-descriptor-relocation/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport groovy.xml.XmlSlurper\n\ndef shadedJar = new File( basedir, \"app/target/mshade-135-1.0.jar\")\ndef pluginXml = new URL( \"jar:\" + shadedJar.toURL() + \"!/META-INF/maven/plugin.xml\" )\ndef plugin = new XmlSlurper().parse( pluginXml.openStream() );\nassert plugin.mojos.mojo[0].implementation == \"hidden.impl.TestMojo\";\nassert plugin.mojos.mojo[0].parameters.parameter[0].type == \"hidden.impl.Entry\";\nassert plugin.mojos.mojo[0].requirements.requirement[0].role == \"hidden.api.Component\"; "
  },
  {
    "path": "src/it/projects/pom-packaging/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.pp</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n  <name>MSHADE-52</name>\n  <description>\n    Test that usage of the plugin within a POM project is supported. Think about Shade being used to create some\n    archive that is not meant to be deployed on its own but to be included in some final/bigger assembly.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>create-shaded-bundle-of-some-artifacts-for-inclusion-in-assembly</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <outputFile>${project.build.directory}/shaded.jar</outputFile>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/pom-packaging/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"junit/framework/TestCase.class\",\n};\n\nString[] unwanted =\n{\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/shaded.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals=clean package\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/one/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <parent>\r\n    <groupId>org.apache.maven.its.shade.pp</groupId>\r\n    <artifactId>reactors-included</artifactId>\r\n    <version>1.0-SNAPSHOT</version>\r\n  </parent>\r\n\r\n  <artifactId>one</artifactId>\r\n\r\n  <name>one</name>\r\n\r\n  <dependencies>\r\n    <dependency>\r\n      <groupId>org.junit.jupiter</groupId>\r\n      <artifactId>junit-jupiter-api</artifactId>\r\n      <scope>test</scope>\r\n    </dependency>\r\n  </dependencies>\r\n\r\n\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/one/src/main/java/org/apache/maven/plugins/shade/its/one/App.java",
    "content": "package org.apache.maven.plugins.shade.its.one;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/**\n * Hello world!\n *\n */\npublic class App \n{\n    public static void main( String[] args )\n    {\n        System.out.println( \"Hello World!\" );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/one/src/main/java/org/apache/maven/plugins/shade/its/one/AppOne.java",
    "content": "package org.apache.maven.plugins.shade.its.one;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/**\n * Hello world!\n *\n */\npublic class AppOne\n{\n    public static void main( String[] args )\n    {\n        System.out.println( \"Hello World!\" );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/one/src/test/java/org/apache/maven/plugins/shade/its/one/AppTest.java",
    "content": "package org.apache.maven.plugins.shade.its.one;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\nimport org.junit.jupiter.api.Test;\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n/**\n * Unit test for simple App.\n */\npublic class AppTest {\n\n\n    /**\n     * Rigourous Test :-)\n     */\n    @Test\n    public void testApp() {\n        assertTrue(true);\n    }\n}\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n  \n  <groupId>org.apache.maven.its.shade.pp</groupId>\n  <artifactId>reactors-included</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <name>MSHADE-75</name>\n  <description/>\n\n  <dependencyManagement>\n    <dependencies>\n        <dependency>\n            <groupId>org.junit.jupiter</groupId>\n            <artifactId>junit-jupiter-api</artifactId>\n            <version>5.14.0</version>\n            <scope>test</scope>\n        </dependency>\n      <dependency>\n        <groupId>org.apache.maven.its.shade.pp</groupId>\n        <artifactId>one</artifactId>\n        <version>${project.version}</version>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <modules>\n    <module>one</module>\n    <module>two</module>\n  </modules>\n\n</project>\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/two/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <parent>\r\n    <groupId>org.apache.maven.its.shade.pp</groupId>\r\n    <artifactId>reactors-included</artifactId>\r\n    <version>1.0-SNAPSHOT</version>\r\n  </parent>\r\n\r\n  <artifactId>two</artifactId>\r\n\r\n  <name>two</name>\r\n\r\n  <dependencies>\r\n    <dependency>\r\n      <groupId>org.apache.maven.its.shade.pp</groupId>\r\n      <artifactId>one</artifactId>\r\n    </dependency>\r\n      <dependency>\r\n          <groupId>org.junit.jupiter</groupId>\r\n          <artifactId>junit-jupiter-api</artifactId>\r\n          <scope>test</scope>\r\n      </dependency>\r\n  </dependencies>\r\n\r\n  <build>\r\n    <plugins>\r\n      <plugin>\r\n        <groupId>org.apache.maven.plugins</groupId>\r\n        <artifactId>maven-shade-plugin</artifactId>\r\n        <version>@project.version@</version>\r\n        <executions>\r\n          <execution>\r\n            <id>attach-shade</id>\r\n            <phase>package</phase>\r\n            <goals>\r\n              <goal>shade</goal>\r\n            </goals>\r\n            <configuration>\r\n              <shadedArtifactAttached>false</shadedArtifactAttached>\r\n              <artifactSet>\r\n                <includes>\r\n                  <include>org.apache.maven.its.shade.pp:one</include>\r\n                </includes>\r\n              </artifactSet>\r\n            </configuration>\r\n          </execution>\r\n        </executions>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/two/src/main/java/org/apache/maven/plugins/shade/its/two/App.java",
    "content": "package org.apache.maven.plugins.shade.its.two;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/**\n * Hello world!\n *\n */\npublic class App \n{\n    public static void main( String[] args )\n    {\n        System.out.println( \"Hello World!\" );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/two/src/test/java/org/apache/maven/plugins/shade/its/two/AppTest.java",
    "content": "package org.apache.maven.plugins.shade.its.two;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\nimport org.junit.jupiter.api.Test;\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n/**\n * Unit test for simple App.\n */\npublic class AppTest {\n    /**\n     * Rigourous Test :-)\n     */\n    @Test\n    public void testApp() {\n        assertTrue(true);\n    }\n}\n"
  },
  {
    "path": "src/it/projects/project-with-reactors-included/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.jar.*;\n\nimport org.codehaus.plexus.util.*;\n\nString[] wanted =\n{\n    \"org/apache/maven/plugins/shade/its/one/AppOne.class\",\n    \"org/apache/maven/plugins/shade/its/one/App.class\",\n    \"org/apache/maven/plugins/shade/its/two/App.class\"\n};\n\n\nJarFile jarFile = new JarFile( new File( basedir, \"two/target/two-1.0-SNAPSHOT.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\njarFile.close();\n\n// MSHADE-225 Writing output only once\nFile logFile = new File( basedir, \"build.log\" );\nString log = FileUtils.fileRead( logFile );\n\nint index = log.indexOf( \"[INFO] Dependency-reduced POM written at: \" );\nif ( log.indexOf( \"[INFO] Dependency-reduced POM written at: \", index+1 ) >= 0 )\n{\n  throw new IllegalStateException( \"'[INFO] Dependency-reduced POM written at: ' written more than once\" + path );\n}\n"
  },
  {
    "path": "src/it/projects/reloc-abs-resource-path/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n  \n  <groupId>org.apache.maven.its.shade</groupId>\n  <artifactId>reloc-abs-resource-path</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-119</name>\n  <description>\n    Test that classes in strings like \"/org/apache/velocity/my.properties\" get properly relocated\n    in calls to Class.getResource().\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.maven.from</pattern>\n                  <shadedPattern>org.apache.maven.to</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>exec-maven-plugin</artifactId>\n        <version>1.1.1</version>\n        <executions>\n          <execution>\n            <id>run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>${JAVA_HOME}/bin/java</executable>\n              <arguments>\n                <argument>-classpath</argument>\n                <argument>${project.build.directory}/reloc-abs-resource-path-1.0.jar</argument>\n                <argument>Main</argument>\n              </arguments>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/reloc-abs-resource-path/src/main/java/Main.java",
    "content": "import java.net.URL;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Main\n{\n\n    public static void main( String[] args )\n        throws Exception\n    {\n        new Main().testAbsResource();\n       \n    }\n\n    private void testAbsResource() throws Exception\n    {\n        URL r = getClass().getResource(\"/org/apache/maven/from/test.properties\");\n        // expect NPE if MSHADE-119 is not fixed.\n        System.out.println( r.toString() );\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/reloc-abs-resource-path/src/main/resources/org/apache/maven/from/test.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ntestprop=proptest\n"
  },
  {
    "path": "src/it/projects/reloc-abs-resource-path-exclude/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n\n  <groupId>org.apache.maven.its.shade</groupId>\n  <artifactId>reloc-abs-resource-path-exclude</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-119</name>\n  <description>\n    Test that classes in strings like \"/org/apache/velocity/my.properties\" get properly relocated\n    in calls to Class.getResource(), taking into account excluded patterns.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.maven.from</pattern>\n                  <shadedPattern>org.apache.maven.to</shadedPattern>\n                  <excludes>\n                    <exclude>org.apache.maven.from.a.*</exclude>\n                  </excludes>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>exec-maven-plugin</artifactId>\n        <version>1.1.1</version>\n        <executions>\n          <execution>\n            <id>run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>${JAVA_HOME}/bin/java</executable>\n              <arguments>\n                <argument>-classpath</argument>\n                <argument>${project.build.directory}/reloc-abs-resource-path-exclude-1.0.jar</argument>\n                <argument>Main</argument>\n              </arguments>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/reloc-abs-resource-path-exclude/src/main/java/Main.java",
    "content": "import java.net.URL;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Main\n{\n\n    public static void main( String[] args )\n        throws Exception\n    {\n        new Main().testAbsResource();\n    }\n\n    private void testAbsResource() throws Exception\n    {\n        URL r = getClass().getResource(\"/org/apache/maven/from/a/test.properties\");\n        // expect NPE if from/a was shaded even though it was excluded\n        System.out.println( r.toString() );\n\n        r = getClass().getResource(\"/org/apache/maven/to/b/test.properties\");\n        // expect NPE if from/b was not shaded\n        System.out.println( r.toString() );\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/reloc-abs-resource-path-exclude/src/main/resources/org/apache/maven/from/a/test.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ntestprop=proptest\n"
  },
  {
    "path": "src/it/projects/reloc-abs-resource-path-exclude/src/main/resources/org/apache/maven/from/b/test.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ntestprop2=proptest2\n"
  },
  {
    "path": "src/it/projects/reloc-and-mini/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.8+\n"
  },
  {
    "path": "src/it/projects/reloc-and-mini/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n\n  <groupId>org.apache.maven.its.shade.mini</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-327</name>\n  <description>\n    Test handling of relocations and minification.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <minimizeJar>true</minimizeJar>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <relocations>\n                <relocation>\n                  <pattern>junit.framework</pattern>\n                  <shadedPattern>a.junit.framework</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/reloc-and-mini/src/main/java/org/apache/maven/plugins/shade/its/App.java",
    "content": "package org.apache.maven.plugins.shade.its;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport junit.framework.TestResult;\n\npublic class App\n{\n    public static void main( String[] args )\n    {\n        TestResult result = new TestResult();\n        System.out.println(\"Failures: \" + result.failureCount());\n    }\n}\n"
  },
  {
    "path": "src/it/projects/reloc-and-mini/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"a/junit/framework/TestResult.class\",\n};\n\nString[] unwanted =\n{\n    \"junit/framework/TestResult.class\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/reloc-anno/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.5+\n"
  },
  {
    "path": "src/it/projects/reloc-anno/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n  \n  <groupId>org.apache.maven.its.shade.ra</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-79</name>\n  <description>\n    Test that annotations are properly relocated.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>relocated</pattern>\n                  <shadedPattern>hidden</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>exec-maven-plugin</artifactId>\n        <version>1.1.1</version>\n        <executions>\n          <execution>\n            <id>run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>${JAVA_HOME}/bin/java</executable>\n              <arguments>\n                <argument>-classpath</argument>\n                <argument>${project.build.directory}/test-1.0.jar</argument>\n                <argument>Main</argument>\n              </arguments>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/reloc-anno/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.lang.reflect.*;\n\nimport relocated.*;\n\n@MyAnno\npublic class Main\n{\n\n    @MyAnno\n    public String field = \"\";\n\n    @MyAnno\n    public Main()\n    {\n    }\n\n    @MyAnno\n    public void method()\n    {\n    }\n\n    public static void main( String[] args )\n        throws Exception\n    {\n        Class<?> type = Main.class;\n        Field field = type.getField( \"field\" );\n        Method method = type.getMethod( \"method\" );\n        Constructor constructor = type.getConstructor();\n\n        AnnotatedElement[] elements = { type, method, constructor, field };\n        for ( AnnotatedElement element : elements )\n        {\n            if ( !element.isAnnotationPresent( MyAnno.class ) )\n            {\n                throw new IllegalStateException( \"annotation missing on \" + element );\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/reloc-anno/src/main/java/relocated/MyAnno.java",
    "content": "package relocated;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n@java.lang.annotation.Retention( java.lang.annotation.RetentionPolicy.RUNTIME )\npublic @interface MyAnno\n{\n}\n"
  },
  {
    "path": "src/it/projects/reloc-class-from-string-pool/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.rcfsp</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-47</name>\n  <description>\n    Test that classes in strings like \"[Lnet/sf/cglib/proxy/Callback\" get properly relocated.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>relocated</pattern>\n                  <shadedPattern>hidden</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>exec-maven-plugin</artifactId>\n        <version>1.1.1</version>\n        <executions>\n          <execution>\n            <id>run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>${JAVA_HOME}/bin/java</executable>\n              <arguments>\n                <argument>-classpath</argument>\n                <argument>${project.build.directory}/test-1.0.jar</argument>\n                <argument>Main</argument>\n              </arguments>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/reloc-class-from-string-pool/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class Main\n{\n\n    public static void main( String[] args )\n        throws Exception\n    {\n        testClassWithSlashes();\n        testClassWithDots();\n        testArrayClassWithDots();\n        testArrayClassWithDots();\n    }\n\n    private static void testClassWithSlashes()\n        throws Exception\n    {\n        String typeName = \"Lrelocated/RelocatedClass;\";\n        typeName = typeName.substring( 1, typeName.length() - 1 );\n        typeName = typeName.replace( '/', '.' );\n        Class type = Class.forName( typeName );\n        System.out.println( type.getName() );\n    }\n\n    private static void testClassWithDots()\n        throws Exception\n    {\n        String typeName = \"Lrelocated.RelocatedClass;\";\n        typeName = typeName.substring( 1, typeName.length() - 1 );\n        typeName = typeName.replace( '/', '.' );\n        Class type = Class.forName( typeName );\n        System.out.println( type.getName() );\n    }\n\n    private static void testArrayClassWithSlashes()\n        throws Exception\n    {\n        String typeName = \"[[[Lrelocated/RelocatedClass;\";\n        typeName = typeName.substring( 4, typeName.length() - 1 );\n        typeName = typeName.replace( '/', '.' );\n        Class type = Class.forName( typeName );\n        System.out.println( type.getName() );\n    }\n\n    private static void testArrayClassWithDots()\n        throws Exception\n    {\n        String typeName = \"[[[[Lrelocated.RelocatedClass;\";\n        typeName = typeName.substring( 5, typeName.length() - 1 );\n        typeName = typeName.replace( '/', '.' );\n        Class type = Class.forName( typeName );\n        System.out.println( type.getName() );\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/reloc-class-from-string-pool/src/main/java/relocated/RelocatedClass.java",
    "content": "package relocated;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class RelocatedClass\n{\n}\n"
  },
  {
    "path": "src/it/projects/reloc-enum-ref-from-anno/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.5+\n"
  },
  {
    "path": "src/it/projects/reloc-enum-ref-from-anno/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n\n  <groupId>org.apache.maven.its.shade.rerfa</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-64</name>\n  <description>\n    Test that enum references in annotations are properly relocated.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>relocated</pattern>\n                  <shadedPattern>hidden</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>exec-maven-plugin</artifactId>\n        <version>1.1.1</version>\n        <executions>\n          <execution>\n            <id>run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>${JAVA_HOME}/bin/java</executable>\n              <arguments>\n                <argument>-classpath</argument>\n                <argument>${project.build.directory}/test-1.0.jar</argument>\n                <argument>Main</argument>\n              </arguments>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/reloc-enum-ref-from-anno/src/main/java/Main.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n@MyAnno( relocated.MyEnum.YES )\npublic class Main\n{\n\n    public static void main( String[] args )\n        throws Exception\n    {\n        MyAnno anno = Main.class.getAnnotation( MyAnno.class );\n        System.out.println( \"ANNO: \" + anno.value() );\n        if ( !relocated.MyEnum.YES.equals( anno.value() ) )\n        {\n            throw new IllegalStateException( \"unexpected value: \" + anno.value() );\n        }\n    }\n\n}\n"
  },
  {
    "path": "src/it/projects/reloc-enum-ref-from-anno/src/main/java/MyAnno.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n@java.lang.annotation.Retention( java.lang.annotation.RetentionPolicy.RUNTIME )\npublic @interface MyAnno\n{\n\n    relocated.MyEnum value();\n\n}\n"
  },
  {
    "path": "src/it/projects/reloc-enum-ref-from-anno/src/main/java/relocated/MyEnum.java",
    "content": "package relocated;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic enum MyEnum\n{\n\n    YES, NO\n\n}\n"
  },
  {
    "path": "src/it/projects/reloc-includes-excludes/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.rie</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-74</name>\n  <description>\n    Test handling of inclusions/exclusions for relocations.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.2</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <relocations>\n                <relocation>\n                  <pattern>junit.textui</pattern>\n                  <shadedPattern>a</shadedPattern>\n                  <excludes>\n                    <exclude>junit.textui.TestRunner</exclude>\n                  </excludes>\n                </relocation>\n                <relocation>\n                  <pattern>junit.framework</pattern>\n                  <shadedPattern>b</shadedPattern>\n                  <includes>\n                    <include>junit.framework.Test*</include>\n                  </includes>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/reloc-includes-excludes/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"a/ResultPrinter.class\",\n    \"junit/textui/TestRunner.class\",\n    \"b/Test.class\",\n    \"b/TestCase.class\",\n    \"junit/framework/Assert.class\",\n};\n\nString[] unwanted =\n{\n    \"junit/textui/ResultPrinter.class\",\n    \"junit/framework/Test.class\",\n    \"junit/framework/TestCase.class\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\nfor ( String path : unwanted )\n{\n    if ( jarFile.getEntry( path ) != null )\n    {\n        throw new IllegalStateException( \"unwanted path is present: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/it/projects/rerun-with-reloc/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# NOTE: It's the essential part of the test to re-run the package phase\ninvoker.goals = clean package package\n"
  },
  {
    "path": "src/it/projects/rerun-with-reloc/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.rrwr</groupId>\n  <artifactId>test</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-30</name>\n  <description>\n    Test that re-running the package phase without any code changes in between doesn't cause shading to crash. The\n    potential issue was that the first run produced the shaded artifact and that this artifact survived unchanged\n    until shading got executed the second time, thereby re-shading all classes that were included during the first\n    run.\n  </description>\n\n  <!-- NOTE: The test requires a dependency to include during shading, doesn't matter what classes though -->\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins</groupId>\n      <artifactId>maven-compiler-plugin</artifactId>\n      <version>@version.maven-compiler-plugin@</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n        <configuration>\n          <staleMillis>5000</staleMillis>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-install-plugin</artifactId>\n          <version>@version.maven-install-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n        <configuration>\n          <archive>\n            <!-- NOTE: This test requires MJAR-7 which in turn requires this config to actually work. -->\n            <addMavenDescriptor>false</addMavenDescriptor>\n          </archive>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <!-- NOTE: This test checks the code path using relocation -->\n              <relocations>\n                <relocation>\n                  <pattern>org.apache</pattern>\n                  <shadedPattern>hidden</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/rerun-with-reloc/src/main/java/org/MyInterface.java",
    "content": "package org;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/*\n * NOTE: The project's main artifact must not be empty!\n */\npublic interface MyInterface\n{\n}\n"
  },
  {
    "path": "src/it/projects/rerun-with-reloc/src/main/resources/some-ordinary-resource.txt",
    "content": ""
  },
  {
    "path": "src/it/projects/rerun-without-reloc/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# NOTE: It's the essential part of the test to re-run the package phase\ninvoker.goals = clean package package\n"
  },
  {
    "path": "src/it/projects/rerun-without-reloc/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.rrwor</groupId>\n  <artifactId>test</artifactId>\n  <version>0.1</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-30</name>\n  <description>\n    Test that re-running the package phase without any code changes in between doesn't cause shading to crash. The\n    potential issue was that the first run produced the shaded artifact and that this artifact survived unchanged\n    until shading got executed the second time, thereby re-shading all classes that were included during the first\n    run.\n  </description>\n\n  <!-- NOTE: The test requires a dependency to include during shading, doesn't matter what classes though -->\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@version.maven-compiler-plugin@</version>\n        <configuration>\n          <staleMillis>5000</staleMillis>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-install-plugin</artifactId>\n          <version>@version.maven-install-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <version>@version.maven-jar-plugin@</version>\n        <configuration>\n          <archive>\n            <!-- NOTE: This test requires MJAR-7 which in turn requires this config to actually work. -->\n            <addMavenDescriptor>false</addMavenDescriptor>\n          </archive>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>@version.maven-resources-plugin@</version>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <!-- NOTE: This test checks the code path not using relocation -->\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/rerun-without-reloc/src/main/java/org/MyInterface.java",
    "content": "package org;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/*\n * NOTE: The project's main artifact must not be empty!\n */\npublic interface MyInterface\n{\n}\n"
  },
  {
    "path": "src/it/projects/rerun-without-reloc/src/main/resources/some-ordinary-resource.txt",
    "content": ""
  },
  {
    "path": "src/it/projects/services-resource-transformer/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.srt</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-76</name>\n  <description>\n    Test the merging of META-INF/services/** entries.\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.srt</groupId>\n      <artifactId>one</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.srt</groupId>\n      <artifactId>two</artifactId>\n      <version>0.1</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\">\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/services-resource-transformer/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\nimport org.codehaus.plexus.util.*;\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\nJarEntry jarEntry = jarFile.getEntry( \"META-INF/services/org.apache.maven.Shade\" );\nString service = IOUtil.toString( jarFile.getInputStream( jarEntry ), \"UTF-8\" );\njarFile.close();\n\nString[] providers = service.split( \"(\\r\\n)|(\\r)|(\\n)\" );\nif ( providers.length != 2 )\n{\n    throw new IllegalStateException( \"Broken provider list: \" + service );\n}\n"
  },
  {
    "path": "src/it/projects/services-resource-transformer-with-reloc-includes-excludes/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.srt</groupId>\n  <artifactId>mshade-237</artifactId>\n  <version>1.0</version>\n  <name>MSHADE-237</name>\n  <description>\n    Test the merging of META-INF/services/** entries, when relocation includes/excludes patterns are specified\n  </description>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.srt</groupId>\n      <artifactId>mshade-237-one</artifactId>\n      <version>0.1</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.its.shade.srt</groupId>\n      <artifactId>mshade-237-two</artifactId>\n      <version>0.1</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.maven.its.shade</pattern>\n                  <shadedPattern>shaded.org.apache.maven.its.shade</shadedPattern>\n                  <excludes>\n                    <exclude>org.apache.maven.its.shade.One</exclude>\n                  </excludes>\n                </relocation>\n              </relocations>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\" />\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/services-resource-transformer-with-reloc-includes-excludes/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.io.*;\nimport java.util.Arrays;\nimport java.util.jar.*;\nimport org.codehaus.plexus.util.*;\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/mshade-237-1.0.jar\" ) );\nJarEntry jarEntry = jarFile.getEntry( \"META-INF/services/org.apache.maven.shade\" );\nString service = IOUtil.toString( jarFile.getInputStream( jarEntry ), \"UTF-8\" );\njarFile.close();\n\nString[] services = service.split( \"(\\r\\n)|(\\r)|(\\n)\" );\nString[] expected = { \"org.apache.maven.its.shade.One\", \"shaded.org.apache.maven.its.shade.Two\" };\n\nArrays.sort(services);\nArrays.sort(expected);\nif ( !Arrays.equals( services, expected ) )\n{\n    throw new IllegalStateException( \"Different services than expected: \" + service );\n}\n"
  },
  {
    "path": "src/it/projects/setup-parent/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<!--\r\nLicensed to the Apache Software Foundation (ASF) under one\r\nor more contributor license agreements.  See the NOTICE file\r\ndistributed with this work for additional information\r\nregarding copyright ownership.  The ASF licenses this file\r\nto you under the Apache License, Version 2.0 (the\r\n\"License\"); you may not use this file except in compliance\r\nwith the License.  You may obtain a copy of the License at\r\n\r\n  http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing,\r\nsoftware distributed under the License is distributed on an\r\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, either express or implied.  See the License for the\r\nspecific language governing permissions and limitations\r\nunder the License.\r\n-->\r\n\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n\r\n  <groupId>org.apache.maven.plugins.shade.its</groupId>\r\n  <artifactId>shade-parent</artifactId>\r\n  <version>1.0</version>\r\n  <packaging>pom</packaging>\r\n\r\n  <profiles>\r\n    <profile>\r\n      <id>jdk9</id>\r\n      <activation>\r\n        <jdk>9</jdk>\r\n      </activation>\r\n    </profile>\r\n  </profiles>\r\n\r\n</project>\r\n"
  },
  {
    "path": "src/it/projects/shadePomDependency/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.spom</groupId>\n  <artifactId>shadePomDependency</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n\n  <name>MSHADE-60 :: dependency to a type=pom artifact</name>\n  <description>\n    Test creating an uberwar containing an artifact which may not \n    be handled by the JarFile like e.g. a depending pom.\n    The artifact with packaging=pom we depend on has several other  \n    artifacts as dependencies. Those artifacts should be contained \n    in the shade-artifact finally.\n  </description>\n\n  <modules>\n    <module>pomDependency</module>\n    <module>shadingModule</module>\n    <module>testModule</module>\n  </modules>\n  \n</project>\n"
  },
  {
    "path": "src/it/projects/shadePomDependency/pomDependency/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.spom</groupId>\n  <artifactId>pomDependency</artifactId>\n  <version>1.0</version>\n  <packaging>pom</packaging>\n\n\n  <name>MSHADE-60 :: dependency to a packaging=pom artifact</name>\n  <description>\n    This is an artifact with packaging=pom.\n    It only declares further dependencies which should be shaded\n    into the final uberwar.\n  </description>\n\n  <dependencies>\n    <!-- NOTE: The test requires a dependency to include during shading, doesn't matter what classes though -->\n    <dependency>\n      <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n    </dependency>\n  </dependencies>\n  \n</project>\n"
  },
  {
    "path": "src/it/projects/shadePomDependency/shadingModule/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.spom</groupId>\n  <artifactId>shadingModule</artifactId>\n  <version>1.0</version>\n\n\n  <name>MSHADE-60 :: dependency to a type=pom artifact</name>\n  <description>\n    This module creates the uberwar containing an artifact which may not \n    be handled by the JarFile like e.g. a depending pom.\n    The artifact with packaging=pom we depend on has several other  \n    artifacts as dependencies. Those artifacts should be contained \n    in the shade-artifact finally.\n  </description>\n\n  <dependencies>\n    <dependency>\n\t  <groupId>org.apache.maven.its.shade.spom</groupId>\n\t  <artifactId>pomDependency</artifactId>\n\t  <version>1.0</version>\n\t  <type>pom</type>\n    </dependency>\n  </dependencies>\n  \n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>create-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/shadePomDependency/testModule/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.spom</groupId>\n  <artifactId>testModule</artifactId>\n  <version>1.0</version>\n\n  <name>MSHADE-60 :: dependency to a type=pom artifact</name>\n  <description>\n    This module uses the shaded artifact and tries to import a package from\n    the shaded module\n  </description>\n\n  <dependencies>\n    <dependency>\n\t  <groupId>org.apache.maven.its.shade.spom</groupId>\n\t  <artifactId>shadingModule</artifactId>\n\t  <version>1.0</version>\n\t  <classifier>shaded</classifier>\n    </dependency>\n  </dependencies>\n  \n  \n</project>\n"
  },
  {
    "path": "src/it/projects/shadePomDependency/testModule/src/main/java/ShadedClassUsage.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npublic class ShadedClassUsage\n{\n    public static void main() throws Exception\n    {\n        Class cmClass = Class.forName( \"org.apache.maven.plugin.CompilerMojo\", true, \n                                       Thread.currentThread().getContextClassLoader() );\n    }\n}"
  },
  {
    "path": "src/it/projects/shading-with-java-8-sources/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 1.8+\ninvoker.goals=clean verify\n"
  },
  {
    "path": "src/it/projects/shading-with-java-8-sources/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.shade.its</groupId>\n  <artifactId>shading-with-java-8-sources</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>users-shader-impl</name>\n\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.2</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <configuration>\n            <source>1.8</source>\n            <target>1.8</target>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <dependencies>\n          <dependency>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-shade-plugin</artifactId>\n            <version>@project.version@</version>\n            <classifier>tests</classifier>\n          </dependency>\n        </dependencies>\n        <executions>\n          <execution>\n            <id>create-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.maven.plugins.shade.its</pattern>\n                  <shadedPattern>hidden</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>exec-maven-plugin</artifactId>\n        <version>1.1.1</version>\n        <executions>\n          <execution>\n            <id>run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>${java.home}/bin/java</executable>\n              <arguments>\n                <argument>-classpath</argument>\n                <argument>${project.build.directory}/shading-with-java-8-sources-1.0-SNAPSHOT-shaded.jar</argument>\n                <argument>hidden.App</argument>\n              </arguments>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java",
    "content": "package org.apache.maven.plugins.shade.its;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/**\n * Hello world!\n */\npublic class App\n{\n    public static void main( String[] args )\n    {\n        System.out.println( \"=== RunnableTest ===\" );\n\n        // Anonymous Runnable\n        Runnable r1 = new Runnable()\n        {\n\n            @Override\n            public void run()\n            {\n                System.out.println( \"Hello world one!\" );\n            }\n        };\n\n        // Lambda Runnable\n        Runnable r2 = () -> System.out.println( \"Hello world two!\" );\n\n        // Run em!\n        r1.run();\n        r2.run();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/shading-with-java-8-sources/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nassert new File(basedir, 'build.log').exists();\n\ncontent = new File(basedir, 'build.log').text;\nassert content.contains( '=== RunnableTest ===');\nassert content.contains( 'Hello world one!');\nassert content.contains( 'Hello world two!');\n"
  },
  {
    "path": "src/it/projects/shading-with-release-sources/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.java.version = 9+\ninvoker.goals=clean verify\n"
  },
  {
    "path": "src/it/projects/shading-with-release-sources/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.shade.its</groupId>\n  <artifactId>shading-with-java-11-sources</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>users-shader-impl</name>\n\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.2</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@version.maven-compiler-plugin@</version>\n          <configuration>\n            <release>${java.specification.version}</release>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <dependencies>\n          <dependency>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-shade-plugin</artifactId>\n            <version>@project.version@</version>\n            <classifier>tests</classifier>\n          </dependency>\n        </dependencies>\n        <executions>\n          <execution>\n            <id>create-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n              <relocations>\n                <relocation>\n                  <pattern>org.apache.maven.plugins.shade.its</pattern>\n                  <shadedPattern>hidden</shadedPattern>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>exec-maven-plugin</artifactId>\n        <version>1.6.0</version>\n        <executions>\n          <execution>\n            <id>run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>${java.home}/bin/java</executable>\n              <arguments>\n                <argument>-classpath</argument>\n                <argument>${project.build.directory}/shading-with-java-11-sources-1.0-SNAPSHOT-shaded.jar</argument>\n                <argument>hidden.App</argument>\n              </arguments>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/shading-with-release-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java",
    "content": "package org.apache.maven.plugins.shade.its;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/**\n * Hello world!\n */\npublic class App\n{\n    public static void main( String[] args )\n    {\n        System.out.println( \"=== RunnableTest ===\" );\n\n        // Anonymous Runnable\n        Runnable r1 = new Runnable()\n        {\n\n            @Override\n            public void run()\n            {\n                System.out.println( \"Hello world one!\" );\n            }\n        };\n\n        // Lambda Runnable\n        Runnable r2 = () -> System.out.println( \"Hello world two!\" );\n\n        // Run em!\n        r1.run();\n        r2.run();\n    }\n}\n"
  },
  {
    "path": "src/it/projects/shading-with-release-sources/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nassert new File(basedir, 'build.log').exists();\n\ncontent = new File(basedir, 'build.log').text;\nassert content.contains( '=== RunnableTest ===');\nassert content.contains( 'Hello world one!');\nassert content.contains( 'Hello world two!');\n"
  },
  {
    "path": "src/it/projects/users-shader-impl/invoker.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n# \n#   http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\ninvoker.goals=clean package\n"
  },
  {
    "path": "src/it/projects/users-shader-impl/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.shade.its</groupId>\n    <artifactId>shade-parent</artifactId>\n    <version>1.0</version>\n    <relativePath>../setup-parent</relativePath>\n  </parent>\n\n  <groupId>org.apache.maven.plugins.shade.its</groupId>\n  <artifactId>users-shader-impl</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>users-shader-impl</name>\n\n  <dependencies>\n      <dependency>\n          <groupId>org.junit.jupiter</groupId>\n          <artifactId>junit-jupiter-api</artifactId>\n          <version>5.14.0</version>\n          <scope>test</scope>\n      </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <dependencies>\n          <dependency>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-shade-plugin</artifactId>\n            <version>@project.version@</version>\n            <classifier>tests</classifier>\n          </dependency>\n        </dependencies>\n        <executions>\n          <execution>\n            <id>create-shaded-artifact</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shaderHint>mock</shaderHint>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>shaded</shadedClassifierName>\n              <createDependencyReducedPom>false</createDependencyReducedPom>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/users-shader-impl/src/main/java/org/apache/maven/plugins/shade/its/App.java",
    "content": "package org.apache.maven.plugins.shade.its;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/**\n * Hello world!\n *\n */\npublic class App \n{\n    public static void main( String[] args )\n    {\n        System.out.println( \"Hello World!\" );\n    }\n}\n"
  },
  {
    "path": "src/it/projects/users-shader-impl/src/test/java/org/apache/maven/plugins/shade/its/AppTest.java",
    "content": "package org.apache.maven.plugins.shade.its;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\nimport org.junit.jupiter.api.Test;\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n/**\n * Unit test for simple App.\n */\npublic class AppTest {\n    /**\n     * Create the test case\n     *\n     * @param testName name of the test case\n     */\n\n    /**\n     * Rigourous Test :-)\n     */\n    @Test\n    public void testApp() {\n        assertTrue(true);\n    }\n}\n\n"
  },
  {
    "path": "src/it/projects/users-shader-impl/verify.groovy",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nassert new File(basedir, 'build.log').exists();\n\ncontent = new File(basedir, 'build.log').text;\nassert content.contains( 'Executing MockShader#shade');\n\nreturn true;"
  },
  {
    "path": "src/it/projects/xml-transformer-ignores-dtd/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<project>\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.its.shade.xartid</groupId>\n  <artifactId>test</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <name>MSHADE-59</name>\n  <description>\n    Test that XmlAppendingResourceTransformer ignores DTD by default to avoid potential problematic network access.\n  </description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>attach-shade</id>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>false</shadedArtifactAttached>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.XmlAppendingTransformer\">\n                  <resource>test.xml</resource>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/projects/xml-transformer-ignores-dtd/src/main/resources/test.xml",
    "content": "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-invalid.missing\">\n<html>\n  <!-- The doctype references an invalid URI which would fail the parsing if the DTD would be resolved -->\n</html>\n"
  },
  {
    "path": "src/it/projects/xml-transformer-ignores-dtd/verify.bsh",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport java.io.*;\nimport java.util.jar.*;\n\nString[] wanted =\n{\n    \"test.xml\",\n};\n\nJarFile jarFile = new JarFile( new File( basedir, \"target/test-1.0.jar\" ) );\n\nfor ( String path : wanted )\n{\n    if ( jarFile.getEntry( path ) == null )\n    {\n        throw new IllegalStateException( \"wanted path is missing: \" + path );\n    }\n}\n\njarFile.close();\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/DefaultShader.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade;\n\nimport javax.inject.Named;\nimport javax.inject.Singleton;\n\nimport java.io.BufferedOutputStream;\nimport java.io.ByteArrayInputStream;\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.io.PushbackInputStream;\nimport java.io.Writer;\nimport java.nio.ByteBuffer;\nimport java.nio.ByteOrder;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Calendar;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.Enumeration;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.Set;\nimport java.util.concurrent.Callable;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarFile;\nimport java.util.jar.JarOutputStream;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\nimport java.util.zip.CRC32;\nimport java.util.zip.ZipEntry;\nimport java.util.zip.ZipException;\n\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugins.shade.filter.Filter;\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.resource.ManifestResourceTransformer;\nimport org.apache.maven.plugins.shade.resource.ReproducibleResourceTransformer;\nimport org.apache.maven.plugins.shade.resource.ResourceTransformer;\nimport org.codehaus.plexus.util.IOUtil;\nimport org.codehaus.plexus.util.io.CachingOutputStream;\nimport org.objectweb.asm.ClassReader;\nimport org.objectweb.asm.ClassVisitor;\nimport org.objectweb.asm.ClassWriter;\nimport org.objectweb.asm.commons.ClassRemapper;\nimport org.objectweb.asm.commons.Remapper;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * @author Jason van Zyl\n */\n@Singleton\n@Named\npublic class DefaultShader implements Shader {\n    private static final int BUFFER_SIZE = 32 * 1024;\n\n    private final Logger logger;\n\n    public DefaultShader() {\n        this(LoggerFactory.getLogger(DefaultShader.class));\n    }\n\n    public DefaultShader(final Logger logger) {\n        this.logger = Objects.requireNonNull(logger);\n    }\n\n    // workaround for MSHADE-420\n    private long getTime(ZipEntry entry) {\n        if (entry.getLastModifiedTime() == null) {\n            return -1;\n        }\n        long mtime = entry.getLastModifiedTime().toMillis();\n        if (hasX5455ExtendedTimestamp(entry)) {\n            Calendar cal = Calendar.getInstance();\n            cal.setTimeInMillis(mtime);\n            mtime = mtime - (cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET));\n        }\n        return mtime;\n    }\n\n    /**\n     * Returns {@code true} if passed in {@link ZipEntry} has extra data that contains the extended timestamp (0x5455).\n     *\n     * @see <a href=\"https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.html\">X5455_ExtendedTimestamp</a>\n     */\n    private static boolean hasX5455ExtendedTimestamp(ZipEntry zipEntry) {\n        if (zipEntry.getExtra() != null) {\n            ByteBuffer extraData = ByteBuffer.wrap(zipEntry.getExtra());\n            extraData.order(ByteOrder.LITTLE_ENDIAN);\n            while (extraData.hasRemaining()) {\n                int id = extraData.getShort() & 0xffff;\n                int length = extraData.getShort() & 0xffff;\n\n                if (id == 0x5455) {\n                    // Extended TS is present\n                    return true;\n                } else {\n                    // skip to next\n                    extraData.position(extraData.position() + length);\n                }\n            }\n        }\n        return false;\n    }\n\n    public void shade(ShadeRequest shadeRequest) throws IOException, MojoExecutionException {\n        Set<String> resources = new HashSet<>();\n\n        ManifestResourceTransformer manifestTransformer = null;\n        List<ResourceTransformer> transformers = new ArrayList<>(shadeRequest.getResourceTransformers());\n        for (Iterator<ResourceTransformer> it = transformers.iterator(); it.hasNext(); ) {\n            ResourceTransformer transformer = it.next();\n            if (transformer instanceof ManifestResourceTransformer) {\n                manifestTransformer = (ManifestResourceTransformer) transformer;\n                it.remove();\n            }\n        }\n\n        final DefaultPackageMapper packageMapper = new DefaultPackageMapper(shadeRequest.getRelocators());\n\n        // noinspection ResultOfMethodCallIgnored\n        shadeRequest.getUberJar().getParentFile().mkdirs();\n\n        try (JarOutputStream out =\n                new JarOutputStream(new BufferedOutputStream(new CachingOutputStream(shadeRequest.getUberJar())))) {\n            goThroughAllJarEntriesForManifestTransformer(shadeRequest, resources, manifestTransformer, out);\n\n            // CHECKSTYLE_OFF: MagicNumber\n            Map<String, HashSet<File>> duplicates = new HashMap<>();\n            // CHECKSTYLE_ON: MagicNumber\n\n            shadeJars(shadeRequest, resources, transformers, out, duplicates, packageMapper);\n\n            // CHECKSTYLE_OFF: MagicNumber\n            Map<Collection<File>, HashSet<String>> overlapping = new HashMap<>();\n            // CHECKSTYLE_ON: MagicNumber\n\n            for (String clazz : duplicates.keySet()) {\n                Collection<File> jarz = duplicates.get(clazz);\n                if (jarz.size() > 1) {\n                    overlapping.computeIfAbsent(jarz, k -> new HashSet<>()).add(clazz);\n                }\n            }\n\n            // Log a summary of duplicates\n            logSummaryOfDuplicates(overlapping);\n\n            if (!overlapping.keySet().isEmpty()) {\n                showOverlappingWarning();\n            }\n\n            for (ResourceTransformer transformer : transformers) {\n                if (transformer.hasTransformedResource()) {\n                    transformer.modifyOutputStream(out);\n                }\n            }\n        }\n\n        for (Filter filter : shadeRequest.getFilters()) {\n            filter.finished();\n        }\n    }\n\n    /**\n     * {@link InputStream} that can peek ahead at zip header bytes.\n     */\n    private static class ZipHeaderPeekInputStream extends PushbackInputStream {\n\n        private static final byte[] ZIP_HEADER = new byte[] {0x50, 0x4b, 0x03, 0x04};\n\n        private static final int HEADER_LEN = 4;\n\n        protected ZipHeaderPeekInputStream(InputStream in) {\n            super(in, HEADER_LEN);\n        }\n\n        public boolean hasZipHeader() throws IOException {\n            final byte[] header = new byte[HEADER_LEN];\n            int len = super.read(header, 0, HEADER_LEN);\n            if (len != -1) {\n                super.unread(header, 0, len);\n            }\n            return Arrays.equals(header, ZIP_HEADER);\n        }\n    }\n\n    /**\n     * Data holder for CRC and Size.\n     */\n    private static class CrcAndSize {\n\n        private final CRC32 crc = new CRC32();\n\n        private long size;\n\n        CrcAndSize(InputStream inputStream) throws IOException {\n            load(inputStream);\n        }\n\n        private void load(InputStream inputStream) throws IOException {\n            byte[] buffer = new byte[BUFFER_SIZE];\n            int bytesRead;\n            while ((bytesRead = inputStream.read(buffer)) != -1) {\n                this.crc.update(buffer, 0, bytesRead);\n                this.size += bytesRead;\n            }\n        }\n\n        public void setupStoredEntry(JarEntry entry) {\n            entry.setSize(this.size);\n            entry.setCompressedSize(this.size);\n            entry.setCrc(this.crc.getValue());\n            entry.setMethod(ZipEntry.STORED);\n        }\n    }\n\n    private void shadeJars(\n            ShadeRequest shadeRequest,\n            Set<String> resources,\n            List<ResourceTransformer> transformers,\n            JarOutputStream jos,\n            Map<String, HashSet<File>> duplicates,\n            DefaultPackageMapper packageMapper)\n            throws IOException {\n        for (File jar : shadeRequest.getJars()) {\n\n            logger.debug(\"Processing JAR \" + jar);\n\n            List<Filter> jarFilters = getFilters(jar, shadeRequest.getFilters());\n            if (jar.isDirectory()) {\n                shadeDir(\n                        shadeRequest,\n                        resources,\n                        transformers,\n                        packageMapper,\n                        jos,\n                        duplicates,\n                        jar,\n                        jar,\n                        \"\",\n                        jarFilters);\n            } else {\n                shadeJar(shadeRequest, resources, transformers, packageMapper, jos, duplicates, jar, jarFilters);\n            }\n        }\n    }\n\n    @SuppressWarnings(\"checkstyle:ParameterNumber\")\n    private void shadeDir(\n            ShadeRequest shadeRequest,\n            Set<String> resources,\n            List<ResourceTransformer> transformers,\n            DefaultPackageMapper packageMapper,\n            JarOutputStream jos,\n            Map<String, HashSet<File>> duplicates,\n            File jar,\n            File current,\n            String prefix,\n            List<Filter> jarFilters)\n            throws IOException {\n        final File[] children = current.listFiles();\n        if (children == null) {\n            return;\n        }\n        for (final File file : children) {\n            final String name = prefix + file.getName();\n            if (file.isDirectory()) {\n                try {\n                    shadeDir(\n                            shadeRequest,\n                            resources,\n                            transformers,\n                            packageMapper,\n                            jos,\n                            duplicates,\n                            jar,\n                            file,\n                            prefix + file.getName() + '/',\n                            jarFilters);\n                    continue;\n                } catch (Exception e) {\n                    throw new IOException(String.format(\"Problem shading JAR %s entry %s: %s\", current, name, e), e);\n                }\n            }\n            if (isFiltered(jarFilters, name) || isExcludedEntry(name)) {\n                continue;\n            }\n\n            try {\n                shadeJarEntry(\n                        shadeRequest,\n                        resources,\n                        transformers,\n                        packageMapper,\n                        jos,\n                        duplicates,\n                        jar,\n                        new Callable<InputStream>() {\n                            @Override\n                            public InputStream call() throws Exception {\n                                return Files.newInputStream(file.toPath());\n                            }\n                        },\n                        name,\n                        file.lastModified(),\n                        -1 /*ignore*/);\n            } catch (Exception e) {\n                throw new IOException(String.format(\"Problem shading JAR %s entry %s: %s\", current, name, e), e);\n            }\n        }\n    }\n\n    @SuppressWarnings(\"checkstyle:ParameterNumber\")\n    private void shadeJar(\n            ShadeRequest shadeRequest,\n            Set<String> resources,\n            List<ResourceTransformer> transformers,\n            DefaultPackageMapper packageMapper,\n            JarOutputStream jos,\n            Map<String, HashSet<File>> duplicates,\n            File jar,\n            List<Filter> jarFilters)\n            throws IOException {\n        try (JarFile jarFile = newJarFile(jar)) {\n\n            for (Enumeration<JarEntry> j = jarFile.entries(); j.hasMoreElements(); ) {\n                final JarEntry entry = j.nextElement();\n\n                String name = entry.getName();\n\n                if (entry.isDirectory() || isFiltered(jarFilters, name) || isExcludedEntry(name)) {\n                    continue;\n                }\n\n                try {\n                    shadeJarEntry(\n                            shadeRequest,\n                            resources,\n                            transformers,\n                            packageMapper,\n                            jos,\n                            duplicates,\n                            jar,\n                            new Callable<InputStream>() {\n                                @Override\n                                public InputStream call() throws Exception {\n                                    return jarFile.getInputStream(entry);\n                                }\n                            },\n                            name,\n                            getTime(entry),\n                            entry.getMethod());\n                } catch (Exception e) {\n                    throw new IOException(String.format(\"Problem shading JAR %s entry %s: %s\", jar, name, e), e);\n                }\n            }\n        }\n    }\n\n    private boolean isExcludedEntry(final String name) {\n        if (\"META-INF/INDEX.LIST\".equals(name)) {\n            // we cannot allow the jar indexes to be copied over or the\n            // jar is useless. Ideally, we could create a new one\n            // later\n            return true;\n        }\n\n        if (\"module-info.class\".equals(name)) {\n            logger.warn(\"Discovered module-info.class. \" + \"Shading will break its strong encapsulation.\");\n            return true;\n        }\n        return false;\n    }\n\n    @SuppressWarnings(\"checkstyle:ParameterNumber\")\n    private void shadeJarEntry(\n            ShadeRequest shadeRequest,\n            Set<String> resources,\n            List<ResourceTransformer> transformers,\n            DefaultPackageMapper packageMapper,\n            JarOutputStream jos,\n            Map<String, HashSet<File>> duplicates,\n            File jar,\n            Callable<InputStream> inputProvider,\n            String name,\n            long time,\n            int method)\n            throws Exception {\n        try (InputStream in = inputProvider.call()) {\n            String mappedName = packageMapper.map(name, true, false);\n\n            int idx = mappedName.lastIndexOf('/');\n            if (idx != -1) {\n                // make sure dirs are created\n                String dir = mappedName.substring(0, idx);\n                if (!resources.contains(dir)) {\n                    addDirectory(resources, jos, dir, time);\n                }\n            }\n\n            duplicates.computeIfAbsent(name, k -> new HashSet<>()).add(jar);\n            if (name.endsWith(\".class\")) {\n                addRemappedClass(jos, jar, name, time, in, packageMapper);\n            } else if (shadeRequest.isShadeSourcesContent() && name.endsWith(\".java\")) {\n                // Avoid duplicates\n                if (resources.contains(mappedName)) {\n                    return;\n                }\n\n                addJavaSource(resources, jos, mappedName, time, in, shadeRequest.getRelocators());\n            } else {\n                if (!resourceTransformed(transformers, mappedName, in, shadeRequest.getRelocators(), time)) {\n                    // Avoid duplicates that aren't accounted for by the resource transformers\n                    if (resources.contains(mappedName)) {\n                        logger.debug(\"We have a duplicate \" + name + \" in \" + jar);\n                        return;\n                    }\n\n                    addResource(resources, jos, mappedName, inputProvider, time, method);\n                } else {\n                    duplicates.computeIfAbsent(name, k -> new HashSet<>()).remove(jar);\n                }\n            }\n        }\n    }\n\n    private void goThroughAllJarEntriesForManifestTransformer(\n            ShadeRequest shadeRequest,\n            Set<String> resources,\n            ManifestResourceTransformer manifestTransformer,\n            JarOutputStream jos)\n            throws IOException {\n        if (manifestTransformer != null) {\n            for (File jar : shadeRequest.getJars()) {\n                try (JarFile jarFile = newJarFile(jar)) {\n                    for (Enumeration<JarEntry> en = jarFile.entries(); en.hasMoreElements(); ) {\n                        JarEntry entry = en.nextElement();\n                        String resource = entry.getName();\n                        if (manifestTransformer.canTransformResource(resource)) {\n                            resources.add(resource);\n                            try (InputStream inputStream = jarFile.getInputStream(entry)) {\n                                manifestTransformer.processResource(\n                                        resource, inputStream, shadeRequest.getRelocators(), getTime(entry));\n                            }\n                            break;\n                        }\n                    }\n                }\n            }\n            if (manifestTransformer.hasTransformedResource()) {\n                manifestTransformer.modifyOutputStream(jos);\n            }\n        }\n    }\n\n    private void showOverlappingWarning() {\n        logger.warn(\"maven-shade-plugin has detected that some files are\");\n        logger.warn(\"present in two or more JARs. When this happens, only one\");\n        logger.warn(\"single version of the file is copied to the uber jar.\");\n        logger.warn(\"Usually this is not harmful and you can skip these warnings,\");\n        logger.warn(\"otherwise try to manually exclude artifacts based on\");\n        logger.warn(\"mvn dependency:tree -Ddetail=true and the above output.\");\n        logger.warn(\"See https://maven.apache.org/plugins/maven-shade-plugin/\");\n    }\n\n    private void logSummaryOfDuplicates(Map<Collection<File>, HashSet<String>> overlapping) {\n        for (Collection<File> jarz : overlapping.keySet()) {\n            List<String> jarzS = new ArrayList<>();\n\n            for (File jjar : jarz) {\n                jarzS.add(jjar.getName());\n            }\n\n            Collections.sort(jarzS); // deterministic messages to be able to compare outputs (useful on CI)\n\n            List<String> classes = new LinkedList<>();\n            List<String> resources = new LinkedList<>();\n\n            for (String name : overlapping.get(jarz)) {\n                if (name.endsWith(\".class\")) {\n                    classes.add(name.replace(\".class\", \"\").replace(\"/\", \".\"));\n                } else {\n                    resources.add(name);\n                }\n            }\n\n            // CHECKSTYLE_OFF: LineLength\n            final Collection<String> overlaps = new ArrayList<>();\n            if (!classes.isEmpty()) {\n                if (resources.size() == 1) {\n                    overlaps.add(\"class\");\n                } else {\n                    overlaps.add(\"classes\");\n                }\n            }\n            if (!resources.isEmpty()) {\n                if (resources.size() == 1) {\n                    overlaps.add(\"resource\");\n                } else {\n                    overlaps.add(\"resources\");\n                }\n            }\n\n            final List<String> all = new ArrayList<>(classes.size() + resources.size());\n            all.addAll(classes);\n            all.addAll(resources);\n\n            logger.warn(String.join(\", \", jarzS) + \" define \" + all.size() + \" overlapping \"\n                    + String.join(\" and \", overlaps) + \": \");\n            // CHECKSTYLE_ON: LineLength\n\n            Collections.sort(all);\n\n            int max = 10;\n\n            for (int i = 0; i < Math.min(max, all.size()); i++) {\n                logger.warn(\"  - \" + all.get(i));\n            }\n\n            if (all.size() > max) {\n                logger.warn(\"  - \" + (all.size() - max) + \" more...\");\n            }\n        }\n    }\n\n    private JarFile newJarFile(File jar) throws IOException {\n        try {\n            return new JarFile(jar);\n        } catch (ZipException zex) {\n            // JarFile is not very verbose and doesn't tell the user which file it was\n            // so we will create a new Exception instead\n            throw new ZipException(\"error in opening zip file \" + jar);\n        }\n    }\n\n    private List<Filter> getFilters(File jar, List<Filter> filters) {\n        List<Filter> list = new ArrayList<>();\n\n        for (Filter filter : filters) {\n            if (filter.canFilter(jar)) {\n                list.add(filter);\n            }\n        }\n\n        return list;\n    }\n\n    private void addDirectory(Set<String> resources, JarOutputStream jos, String name, long time) throws IOException {\n        if (name.lastIndexOf('/') > 0) {\n            String parent = name.substring(0, name.lastIndexOf('/'));\n            if (!resources.contains(parent)) {\n                addDirectory(resources, jos, parent, time);\n            }\n        }\n\n        // directory entries must end in \"/\"\n        JarEntry entry = new JarEntry(name + \"/\");\n        entry.setTime(time);\n        jos.putNextEntry(entry);\n\n        resources.add(name);\n    }\n\n    private void addRemappedClass(\n            JarOutputStream jos, File jar, String name, long time, InputStream is, DefaultPackageMapper packageMapper)\n            throws IOException, MojoExecutionException {\n        if (packageMapper.relocators.isEmpty()) {\n            try {\n                JarEntry entry = new JarEntry(name);\n                entry.setTime(time);\n                jos.putNextEntry(entry);\n                IOUtil.copy(is, jos);\n            } catch (ZipException e) {\n                logger.debug(\"We have a duplicate \" + name + \" in \" + jar);\n            }\n\n            return;\n        }\n\n        // Keep the original class, in case nothing was relocated by ShadeClassRemapper. This avoids binary\n        // differences between classes, simply because they were rewritten and only details like constant pool or\n        // stack map frames are slightly different.\n        byte[] originalClass = IOUtil.toByteArray(is);\n\n        ClassReader cr = new ClassReader(new ByteArrayInputStream(originalClass));\n\n        // We don't pass the ClassReader here. This forces the ClassWriter to rebuild the constant pool.\n        // Copying the original constant pool should be avoided because it would keep references\n        // to the original class names. This is not a problem at runtime (because these entries in the\n        // constant pool are never used), but confuses some tools such as Felix' maven-bundle-plugin\n        // that use the constant pool to determine the dependencies of a class.\n        ClassWriter cw = new ClassWriter(0);\n\n        final String pkg = name.substring(0, name.lastIndexOf('/') + 1);\n        final ShadeClassRemapper cv = new ShadeClassRemapper(cw, pkg, packageMapper);\n\n        try {\n            cr.accept(cv, ClassReader.EXPAND_FRAMES);\n        } catch (Throwable ise) {\n            throw new MojoExecutionException(\"Error in ASM processing class \" + name, ise);\n        }\n\n        // If nothing was relocated by ShadeClassRemapper, write the original class, otherwise the transformed one\n        final byte[] renamedClass;\n        if (cv.remapped) {\n            logger.debug(\"Rewrote class bytecode: \" + name);\n            renamedClass = cw.toByteArray();\n        } else {\n            logger.debug(\"Keeping original class bytecode: \" + name);\n            renamedClass = originalClass;\n        }\n\n        // Need to take the .class off for remapping evaluation\n        String mappedName = packageMapper.map(name.substring(0, name.indexOf('.')), true, false);\n\n        try {\n            // Now we put it back on so the class file is written out with the right extension.\n            JarEntry entry = new JarEntry(mappedName + \".class\");\n            entry.setTime(time);\n            jos.putNextEntry(entry);\n\n            jos.write(renamedClass);\n        } catch (ZipException e) {\n            logger.debug(\"We have a duplicate \" + mappedName + \" in \" + jar);\n        }\n    }\n\n    private boolean isFiltered(List<Filter> filters, String name) {\n        for (Filter filter : filters) {\n            if (filter.isFiltered(name)) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    private boolean resourceTransformed(\n            List<ResourceTransformer> resourceTransformers,\n            String name,\n            InputStream is,\n            List<Relocator> relocators,\n            long time)\n            throws IOException {\n        boolean resourceTransformed = false;\n\n        for (ResourceTransformer transformer : resourceTransformers) {\n            if (transformer.canTransformResource(name)) {\n                logger.debug(\"Transforming \" + name + \" using \"\n                        + transformer.getClass().getName());\n\n                if (transformer instanceof ReproducibleResourceTransformer) {\n                    ((ReproducibleResourceTransformer) transformer).processResource(name, is, relocators, time);\n                } else {\n                    transformer.processResource(name, is, relocators);\n                }\n\n                resourceTransformed = true;\n\n                break;\n            }\n        }\n        return resourceTransformed;\n    }\n\n    private void addJavaSource(\n            Set<String> resources,\n            JarOutputStream jos,\n            String name,\n            long time,\n            InputStream is,\n            List<Relocator> relocators)\n            throws IOException {\n        JarEntry entry = new JarEntry(name);\n        entry.setTime(time);\n        jos.putNextEntry(entry);\n\n        String sourceContent = IOUtil.toString(new InputStreamReader(is, StandardCharsets.UTF_8));\n\n        for (Relocator relocator : relocators) {\n            sourceContent = relocator.applyToSourceContent(sourceContent);\n        }\n\n        final Writer writer = new OutputStreamWriter(jos, StandardCharsets.UTF_8);\n        writer.write(sourceContent);\n        writer.flush();\n\n        resources.add(name);\n    }\n\n    private void addResource(\n            Set<String> resources, JarOutputStream jos, String name, Callable<InputStream> input, long time, int method)\n            throws Exception {\n        ZipHeaderPeekInputStream inputStream = new ZipHeaderPeekInputStream(input.call());\n        try {\n            final JarEntry entry = new JarEntry(name);\n\n            // We should not change compressed level of uncompressed entries, otherwise JVM can't load these nested jars\n            if (inputStream.hasZipHeader() && method == ZipEntry.STORED) {\n                new CrcAndSize(inputStream).setupStoredEntry(entry);\n                inputStream.close();\n                inputStream = new ZipHeaderPeekInputStream(input.call());\n            }\n\n            entry.setTime(time);\n\n            jos.putNextEntry(entry);\n\n            IOUtil.copy(inputStream, jos);\n\n            resources.add(name);\n        } finally {\n            inputStream.close();\n        }\n    }\n\n    private interface PackageMapper {\n        /**\n         * Map an entity name according to the mapping rules known to this package mapper\n         *\n         * @param entityName entity name to be mapped\n         * @param mapPaths map \"slashy\" names like paths or internal Java class names, e.g. {@code com/acme/Foo}?\n         * @param mapPackages  map \"dotty\" names like qualified Java class or package names, e.g. {@code com.acme.Foo}?\n         * @return mapped entity name, e.g. {@code org/apache/acme/Foo} or {@code org.apache.acme.Foo}\n         */\n        String map(String entityName, boolean mapPaths, boolean mapPackages);\n    }\n\n    /**\n     * A package mapper based on a list of {@link Relocator}s\n     */\n    private static class DefaultPackageMapper implements PackageMapper {\n        private static final Pattern CLASS_PATTERN = Pattern.compile(\"(\\\\[*)?L(.+);\");\n\n        private final List<Relocator> relocators;\n\n        private DefaultPackageMapper(final List<Relocator> relocators) {\n            this.relocators = relocators;\n        }\n\n        @Override\n        public String map(String entityName, boolean mapPaths, final boolean mapPackages) {\n            String value = entityName;\n\n            String prefix = \"\";\n            String suffix = \"\";\n\n            Matcher m = CLASS_PATTERN.matcher(entityName);\n            if (m.matches()) {\n                prefix = m.group(1) + \"L\";\n                suffix = \";\";\n                entityName = m.group(2);\n            }\n\n            for (Relocator r : relocators) {\n                if (mapPackages && r.canRelocateClass(entityName)) {\n                    value = prefix + r.relocateClass(entityName) + suffix;\n                    break;\n                } else if (mapPaths && r.canRelocatePath(entityName)) {\n                    value = prefix + r.relocatePath(entityName) + suffix;\n                    break;\n                }\n            }\n            return value;\n        }\n    }\n\n    private static class LazyInitRemapper extends Remapper {\n        private PackageMapper relocators;\n\n        @Override\n        public Object mapValue(Object object) {\n            return object instanceof String ? relocators.map((String) object, true, true) : super.mapValue(object);\n        }\n\n        @Override\n        public String map(String name) {\n            // NOTE: Before the factoring out duplicate code from 'private String map(String, boolean)', this method did\n            // the same as 'mapValue', except for not trying to replace \"dotty\" package-like patterns (only \"slashy\"\n            // path-like ones). The refactoring retains this difference. But actually, all unit and integration tests\n            // still pass, if both variants are unified into one which always tries to replace both pattern types.\n            //\n            //  TODO: Analyse if this case is really necessary and has any special meaning or avoids any known problems.\n            //   If not, then simplify DefaultShader.PackageMapper.map to only have the String parameter and assume\n            //   both boolean ones to always be true.\n            return relocators.map(name, true, false);\n        }\n    }\n\n    // TODO: we can avoid LazyInitRemapper N instantiations (and use a singleton)\n    //       reimplementing ClassRemapper there.\n    //       It looks a bad idea but actually enables us to respect our relocation API which has no\n    //       consistency with ASM one which can lead to multiple issues for short relocation patterns\n    //       plus overcome ClassRemapper limitations we can care about (see its javadoc for details).\n    //\n    // NOTE: very short term we can just reuse the same LazyInitRemapper and let the constructor set it.\n    //       since multithreading is not faster in this processing it would be more than sufficient if\n    //       caring of this 2 objects per class allocation (but keep in mind the visitor will allocate way more ;)).\n    //       Last point which makes it done this way as of now is that perf seems not impacted at all.\n    private static class ShadeClassRemapper extends ClassRemapper implements PackageMapper {\n        private final String pkg;\n        private final PackageMapper packageMapper;\n        private boolean remapped;\n\n        ShadeClassRemapper(\n                final ClassVisitor classVisitor, final String pkg, final DefaultPackageMapper packageMapper) {\n            super(classVisitor, new LazyInitRemapper() /* can't be init in the constructor with \"this\" */);\n            this.pkg = pkg;\n            this.packageMapper = packageMapper;\n\n            // use this to enrich relocators impl with \"remapped\" logic\n            LazyInitRemapper.class.cast(remapper).relocators = this;\n        }\n\n        @Override\n        public void visitSource(final String source, final String debug) {\n            if (source == null) {\n                super.visitSource(null, debug);\n                return;\n            }\n\n            final String fqSource = pkg + source;\n            final String mappedSource = map(fqSource, true, false);\n            final String filename = mappedSource.substring(mappedSource.lastIndexOf('/') + 1);\n            super.visitSource(filename, debug);\n        }\n\n        @Override\n        public String map(final String entityName, boolean mapPaths, final boolean mapPackages) {\n            final String mapped = packageMapper.map(entityName, true, mapPackages);\n            if (!remapped) {\n                remapped = !mapped.equals(entityName);\n            }\n            return mapped;\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/ShadeRequest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade;\n\nimport java.io.File;\nimport java.util.List;\nimport java.util.Set;\n\nimport org.apache.maven.plugins.shade.filter.Filter;\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.resource.ResourceTransformer;\n\n/**\n * Parameter object used to pass multitude of args to Shader.shade()\n * @since 2.0\n */\npublic class ShadeRequest {\n\n    private Set<File> jars;\n\n    private File uberJar;\n\n    private List<Filter> filters;\n\n    private List<Relocator> relocators;\n\n    private List<ResourceTransformer> resourceTransformers;\n\n    private boolean shadeSourcesContent;\n\n    public Set<File> getJars() {\n        return jars;\n    }\n\n    /**\n     * Which jars to shade.\n     *\n     * @param jars The jars.\n     */\n    public void setJars(Set<File> jars) {\n        this.jars = jars;\n    }\n\n    public File getUberJar() {\n        return uberJar;\n    }\n\n    /**\n     * Output jar.\n     *\n     * @param uberJar The ueberJar file.\n     */\n    public void setUberJar(File uberJar) {\n        this.uberJar = uberJar;\n    }\n\n    public List<Filter> getFilters() {\n        return filters;\n    }\n\n    /**\n     * The filters.\n     *\n     * @param filters The filters\n     */\n    public void setFilters(List<Filter> filters) {\n        this.filters = filters;\n    }\n\n    public List<Relocator> getRelocators() {\n        return relocators;\n    }\n\n    /**\n     * The relocators.\n     *\n     * @param relocators The relocators.\n     */\n    public void setRelocators(List<Relocator> relocators) {\n        this.relocators = relocators;\n    }\n\n    public List<ResourceTransformer> getResourceTransformers() {\n        return resourceTransformers;\n    }\n\n    /**\n     * The transformers.\n     *\n     * @param resourceTransformers List of resourceTransformers.\n     */\n    public void setResourceTransformers(List<ResourceTransformer> resourceTransformers) {\n        this.resourceTransformers = resourceTransformers;\n    }\n\n    public boolean isShadeSourcesContent() {\n        return shadeSourcesContent;\n    }\n\n    /**\n     * When true, it will attempt to shade the contents of the java source files when creating the sources jar.\n     * When false, it will just relocate the java source files to the shaded paths, but will not modify the\n     * actual contents of the java source files.\n     *\n     * @param shadeSourcesContent {@code true} or {@code false}.\n     */\n    public void setShadeSourcesContent(boolean shadeSourcesContent) {\n        this.shadeSourcesContent = shadeSourcesContent;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/Shader.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade;\n\nimport java.io.IOException;\n\nimport org.apache.maven.plugin.MojoExecutionException;\n\n/**\n * Interface that defines the process of shading.\n */\npublic interface Shader {\n    /**\n     * Perform a shading operation.\n     *\n     * @param shadeRequest            holds the many parameters to this method\n     * @throws IOException            for IO errors reading the thing\n     * @throws MojoExecutionException for anything else that goes wrong.\n     */\n    void shade(ShadeRequest shadeRequest) throws IOException, MojoExecutionException;\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/ShadingResult.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade;\n\n/**\n * @author Jason van Zyl\n */\npublic class ShadingResult {\n    // no op\n    // olamy: what this class ??\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/filter/Filter.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.filter;\n\nimport java.io.File;\n\n/**\n * @author David Blevins\n */\npublic interface Filter {\n    /**\n     * @param jar The jar file.\n     * @return true if we can filter false otherwise.\n     */\n    boolean canFilter(File jar);\n\n    /**\n     * @param classFile The classFile.\n     * @return true if the file has been filtered false otherwise.\n     */\n    boolean isFiltered(String classFile);\n\n    /**\n     * If we are finished.\n     */\n    void finished();\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.filter;\n\nimport java.io.BufferedReader;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.nio.file.Files;\nimport java.util.Collections;\nimport java.util.Enumeration;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarFile;\nimport java.util.zip.ZipException;\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.artifact.DependencyResolutionRequiredException;\nimport org.apache.maven.plugin.logging.Log;\nimport org.apache.maven.project.MavenProject;\nimport org.vafer.jdependency.Clazz;\nimport org.vafer.jdependency.Clazzpath;\nimport org.vafer.jdependency.ClazzpathUnit;\n\nimport static java.nio.charset.StandardCharsets.UTF_8;\n\n/**\n * A filter that prevents the inclusion of classes not required in the final jar.\n */\npublic class MinijarFilter implements Filter {\n\n    private Log log;\n\n    private Set<Clazz> removable;\n\n    private int classesKept;\n\n    private int classesRemoved;\n\n    // [MSHADE-209] This is introduced only for testing purposes which shows\n    // there is something wrong with the design of this class. (SoC?)\n    // unfortunately i don't have a better idea at the moment.\n    MinijarFilter(int classesKept, int classesRemoved, Log log) {\n        this.classesKept = classesKept;\n        this.classesRemoved = classesRemoved;\n        this.log = log;\n    }\n\n    /**\n     * @param project {@link MavenProject}\n     * @param log {@link Log}\n     * @throws IOException in case of error.\n     */\n    public MinijarFilter(MavenProject project, Log log) throws IOException {\n        this(project, log, Collections.<SimpleFilter>emptyList(), Collections.<String>emptySet());\n    }\n\n    /**\n     * @param project {@link MavenProject}\n     * @param log {@link Log}\n     * @param entryPoints\n     * @throws IOException in case of error.\n     */\n    public MinijarFilter(MavenProject project, Log log, Set<String> entryPoints) throws IOException {\n        this(project, log, Collections.<SimpleFilter>emptyList(), entryPoints);\n    }\n\n    /**\n     * @param project {@link MavenProject}\n     * @param log {@link Log}\n     * @param simpleFilters {@link SimpleFilter}\n     * @param entryPoints\n     * @throws IOException in case of errors.\n     * @since 1.6\n     */\n    public MinijarFilter(MavenProject project, Log log, List<SimpleFilter> simpleFilters, Set<String> entryPoints)\n            throws IOException {\n        this.log = log;\n\n        File artifactFile = project.getArtifact().getFile();\n\n        if (artifactFile != null) {\n            Clazzpath cp = new Clazzpath();\n\n            ClazzpathUnit artifactUnit =\n                    cp.addClazzpathUnit(Files.newInputStream(artifactFile.toPath()), project.toString());\n\n            for (Artifact dependency : project.getArtifacts()) {\n                addDependencyToClasspath(cp, dependency);\n            }\n\n            removable = cp.getClazzes();\n            if (removable.remove(new Clazz(\"module-info\"))) {\n                log.warn(\"Removing module-info from \" + artifactFile.getName());\n            }\n            removePackages(artifactUnit);\n            if (entryPoints.isEmpty()) {\n                removable.removeAll(artifactUnit.getClazzes());\n                removable.removeAll(artifactUnit.getTransitiveDependencies());\n            } else {\n                Set<Clazz> artifactUnitClazzes = artifactUnit.getClazzes();\n                Set<Clazz> entryPointsToKeep = new HashSet<>();\n                for (String entryPoint : entryPoints) {\n                    Clazz entryPointFound = null;\n                    for (Clazz clazz : artifactUnitClazzes) {\n                        if (clazz.getName().equals(entryPoint)) {\n                            entryPointFound = clazz;\n                            break;\n                        }\n                    }\n                    if (entryPointFound != null) {\n                        entryPointsToKeep.add(entryPointFound);\n                    }\n                }\n                removable.removeAll(entryPointsToKeep);\n                if (entryPointsToKeep.isEmpty()) {\n                    removable.removeAll(artifactUnit.getTransitiveDependencies());\n                } else {\n                    for (Clazz entryPoint : entryPointsToKeep) {\n                        removable.removeAll(entryPoint.getTransitiveDependencies());\n                    }\n                }\n            }\n            removeSpecificallyIncludedClasses(\n                    project, simpleFilters == null ? Collections.<SimpleFilter>emptyList() : simpleFilters);\n            removeServices(project, cp);\n        }\n    }\n\n    private void removeServices(final MavenProject project, final Clazzpath cp) {\n        boolean repeatScan;\n        do {\n            repeatScan = false;\n            final Set<Clazz> neededClasses = cp.getClazzes();\n            neededClasses.removeAll(removable);\n            try {\n                // getRuntimeClasspathElements returns a list of\n                //  - the build output directory\n                //  - all the paths to the dependencies' jars\n                // We thereby need to ignore the build directory because we don't want\n                // to remove anything from it, as it's the starting point of the\n                // minification process.\n                for (final String fileName : project.getRuntimeClasspathElements()) {\n                    if (new File(fileName).isDirectory()) {\n                        repeatScan |= removeServicesFromDir(cp, neededClasses, fileName);\n                    } else {\n                        repeatScan |= removeServicesFromJar(cp, neededClasses, fileName);\n                    }\n                }\n            } catch (final DependencyResolutionRequiredException e) {\n                log.warn(e.getMessage());\n            }\n        } while (repeatScan);\n    }\n\n    private boolean removeServicesFromDir(Clazzpath cp, Set<Clazz> neededClasses, String fileName) {\n        final File servicesDir = new File(fileName, \"META-INF/services/\");\n        if (!servicesDir.isDirectory()) {\n            return false;\n        }\n        final File[] serviceProviderConfigFiles = servicesDir.listFiles();\n        if (serviceProviderConfigFiles == null || serviceProviderConfigFiles.length == 0) {\n            return false;\n        }\n\n        boolean repeatScan = false;\n        for (File serviceProviderConfigFile : serviceProviderConfigFiles) {\n            final String serviceClassName = serviceProviderConfigFile.getName();\n            final boolean isNeededClass = neededClasses.contains(cp.getClazz(serviceClassName));\n            if (!isNeededClass) {\n                continue;\n            }\n\n            try (BufferedReader configFileReader =\n                    new BufferedReader(new InputStreamReader(new FileInputStream(serviceProviderConfigFile), UTF_8))) {\n                // check whether the found classes use services in turn\n                repeatScan |= scanServiceProviderConfigFile(cp, configFileReader);\n            } catch (final IOException e) {\n                log.warn(e.getMessage());\n            }\n        }\n        return repeatScan;\n    }\n\n    private boolean removeServicesFromJar(Clazzpath cp, Set<Clazz> neededClasses, String fileName) {\n        boolean repeatScan = false;\n        try (JarFile jar = new JarFile(fileName)) {\n            for (final Enumeration<JarEntry> entries = jar.entries(); entries.hasMoreElements(); ) {\n                final JarEntry jarEntry = entries.nextElement();\n                if (jarEntry.isDirectory() || !jarEntry.getName().startsWith(\"META-INF/services/\")) {\n                    continue;\n                }\n\n                final String serviceClassName = jarEntry.getName().substring(\"META-INF/services/\".length());\n                final boolean isNeededClass = neededClasses.contains(cp.getClazz(serviceClassName));\n                if (!isNeededClass) {\n                    continue;\n                }\n\n                try (BufferedReader configFileReader =\n                        new BufferedReader(new InputStreamReader(jar.getInputStream(jarEntry), UTF_8))) {\n                    // check whether the found classes use services in turn\n                    repeatScan = scanServiceProviderConfigFile(cp, configFileReader);\n                } catch (final IOException e) {\n                    log.warn(e.getMessage());\n                }\n            }\n        } catch (final IOException e) {\n            log.warn(\"Not a JAR file candidate. Ignoring classpath element '\" + fileName + \"' (\" + e + \").\");\n        }\n        return repeatScan;\n    }\n\n    private boolean scanServiceProviderConfigFile(Clazzpath cp, BufferedReader configFileReader) throws IOException {\n        boolean serviceClassFound = false;\n        for (String line = configFileReader.readLine(); line != null; line = configFileReader.readLine()) {\n            final String className = line.split(\"#\", 2)[0].trim();\n            if (className.isEmpty()) {\n                continue;\n            }\n\n            final Clazz clazz = cp.getClazz(className);\n            if (clazz == null || !removable.contains(clazz)) {\n                continue;\n            }\n\n            log.debug(className + \" was not removed because it is a service\");\n            removeClass(clazz);\n            serviceClassFound = true;\n        }\n        return serviceClassFound;\n    }\n\n    private void removeClass(final Clazz clazz) {\n        removable.remove(clazz);\n        removable.removeAll(clazz.getTransitiveDependencies());\n    }\n\n    private ClazzpathUnit addDependencyToClasspath(Clazzpath cp, Artifact dependency) throws IOException {\n        ClazzpathUnit clazzpathUnit = null;\n        try (InputStream is = new FileInputStream(dependency.getFile())) {\n            clazzpathUnit = cp.addClazzpathUnit(is, dependency.toString());\n        } catch (ZipException e) {\n            log.warn(dependency.getFile()\n                    + \" could not be unpacked/read for minimization; dependency is probably malformed.\");\n            IOException ioe = new IOException(\n                    \"Dependency \" + dependency + \" in file \" + dependency.getFile()\n                            + \" could not be unpacked. File is probably corrupt\",\n                    e);\n            throw ioe;\n        } catch (ArrayIndexOutOfBoundsException | IllegalArgumentException e) {\n            // trap ArrayIndexOutOfBoundsExceptions caused by malformed dependency classes (MSHADE-107)\n            log.warn(dependency + \" could not be analyzed for minimization; dependency is probably malformed.\");\n        }\n\n        return clazzpathUnit;\n    }\n\n    private void removePackages(ClazzpathUnit artifactUnit) {\n        Set<String> packageNames = new HashSet<>();\n        removePackages(artifactUnit.getClazzes(), packageNames);\n        removePackages(artifactUnit.getTransitiveDependencies(), packageNames);\n    }\n\n    private void removePackages(Set<Clazz> clazzes, Set<String> packageNames) {\n        for (Clazz clazz : clazzes) {\n            String name = clazz.getName();\n            while (name.contains(\".\")) {\n                name = name.substring(0, name.lastIndexOf('.'));\n                if (packageNames.add(name)) {\n                    removable.remove(new Clazz(name + \".package-info\"));\n                }\n            }\n        }\n    }\n\n    private void removeSpecificallyIncludedClasses(MavenProject project, List<SimpleFilter> simpleFilters)\n            throws IOException {\n        // remove classes specifically included in filters\n        Clazzpath checkCp = new Clazzpath();\n        for (Artifact dependency : project.getArtifacts()) {\n            File jar = dependency.getFile();\n\n            for (SimpleFilter simpleFilter : simpleFilters) {\n                if (simpleFilter.canFilter(jar)) {\n                    ClazzpathUnit depClazzpathUnit = addDependencyToClasspath(checkCp, dependency);\n                    if (depClazzpathUnit != null) {\n                        Set<Clazz> clazzes = depClazzpathUnit.getClazzes();\n                        for (final Clazz clazz : new HashSet<>(removable)) {\n                            if (clazzes.contains(clazz) //\n                                    && simpleFilter.isSpecificallyIncluded(\n                                            clazz.getName().replace('.', '/'))) {\n                                log.debug(clazz.getName() + \" not removed because it was specifically included\");\n                                removeClass(clazz);\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    @Override\n    public boolean canFilter(File jar) {\n        return true;\n    }\n\n    @Override\n    public boolean isFiltered(String classFile) {\n        String className = classFile.replace('/', '.').replaceFirst(\"\\\\.class$\", \"\");\n        Clazz clazz = new Clazz(className);\n\n        if (removable != null && removable.contains(clazz)) {\n            log.debug(\"Removing \" + className);\n            classesRemoved += 1;\n            return true;\n        }\n\n        classesKept += 1;\n        return false;\n    }\n\n    @Override\n    public void finished() {\n        int classesTotal = classesRemoved + classesKept;\n        if (classesTotal != 0) {\n            log.info(\"Minimized \" + classesTotal + \" -> \" + classesKept + \" (\" + 100 * classesKept / classesTotal\n                    + \"%)\");\n        } else {\n            log.info(\"Minimized \" + classesTotal + \" -> \" + classesKept);\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/filter/SimpleFilter.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.filter;\n\nimport java.io.File;\nimport java.util.Collections;\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport org.apache.maven.plugins.shade.mojo.ArchiveFilter;\nimport org.codehaus.plexus.util.SelectorUtils;\n\n/**\n * @author David Blevins\n */\n/**\n * @author kama\n *\n */\npublic class SimpleFilter implements Filter {\n\n    private Set<File> jars;\n\n    private Set<String> includes;\n\n    private Set<String> excludes;\n\n    private boolean excludeDefaults = true;\n\n    /**\n     * @deprecated As of release 3.2.2, replaced by {@link #SimpleFilter(Set, ArchiveFilter)}}\n     * @param jars set of {@link File}s.\n     * @param includes set of includes.\n     * @param excludes set of excludes.\n     */\n    @Deprecated\n    public SimpleFilter(Set<File> jars, Set<String> includes, Set<String> excludes) {\n        this(jars, includes, excludes, true);\n    }\n\n    /**\n     * @param jars set of {@link File}s.\n     * @param archiveFilter set of {@link ArchiveFilter}s.\n     */\n    public SimpleFilter(final Set<File> jars, final ArchiveFilter archiveFilter) {\n        this(jars, archiveFilter.getIncludes(), archiveFilter.getExcludes(), archiveFilter.getExcludeDefaults());\n    }\n\n    /**\n     * @param jars set of {@link File}s.\n     * @param includes set of includes.\n     * @param excludes set of excludes.\n     * @param excludeDefaults whether to exclude default includes once includes are provided explicitly.\n     */\n    private SimpleFilter(\n            final Set<File> jars,\n            final Set<String> includes,\n            final Set<String> excludes,\n            final boolean excludeDefaults) {\n        this.jars = (jars != null) ? Collections.<File>unmodifiableSet(jars) : Collections.<File>emptySet();\n        this.includes = normalizePatterns(includes);\n        this.excludes = normalizePatterns(excludes);\n        this.excludeDefaults = excludeDefaults;\n    }\n\n    /** {@inheritDoc} */\n    @Override\n    public boolean canFilter(File jar) {\n        return jars.contains(jar);\n    }\n\n    /** {@inheritDoc} */\n    @Override\n    public boolean isFiltered(String classFile) {\n        String path = normalizePath(classFile);\n\n        return !((!excludeDefaults || isIncluded(path)) && !isExcluded(path));\n    }\n\n    /**\n     * @param classFile The class file.\n     * @return true if included false otherwise.\n     */\n    public boolean isSpecificallyIncluded(String classFile) {\n        if (includes == null || includes.isEmpty()) {\n            return false;\n        }\n\n        String path = normalizePath(classFile);\n\n        return isIncluded(path);\n    }\n\n    private boolean isIncluded(String classFile) {\n        if (includes == null || includes.isEmpty()) {\n            return true;\n        }\n\n        return matchPaths(includes, classFile);\n    }\n\n    private boolean isExcluded(String classFile) {\n        if (excludes == null || excludes.isEmpty()) {\n            return false;\n        }\n\n        return matchPaths(excludes, classFile);\n    }\n\n    private boolean matchPaths(Set<String> patterns, String classFile) {\n        for (String pattern : patterns) {\n\n            if (SelectorUtils.matchPath(pattern, classFile)) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    private String normalizePath(String path) {\n        return (path != null) ? path.replace(File.separatorChar == '/' ? '\\\\' : '/', File.separatorChar) : null;\n    }\n\n    private Set<String> normalizePatterns(Set<String> patterns) {\n        Set<String> result = new HashSet<>();\n\n        if (patterns != null) {\n            for (String pattern : patterns) {\n                pattern = normalizePath(pattern);\n\n                if (pattern.endsWith(File.separator)) {\n                    pattern += \"**\";\n                }\n\n                result.add(pattern);\n            }\n        }\n\n        return result;\n    }\n\n    /** {@inheritDoc} */\n    @Override\n    public void finished() {}\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/mojo/ArchiveFilter.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport java.util.Set;\n\n/**\n * @author David Blevins\n */\npublic class ArchiveFilter {\n    private String artifact;\n\n    private Set<String> includes;\n\n    private Set<String> excludes;\n\n    private boolean excludeDefaults = true;\n\n    public String getArtifact() {\n        return artifact;\n    }\n\n    public Set<String> getIncludes() {\n        return includes;\n    }\n\n    public Set<String> getExcludes() {\n        return excludes;\n    }\n\n    public boolean getExcludeDefaults() {\n        return excludeDefaults;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactId.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.model.Dependency;\nimport org.codehaus.plexus.util.SelectorUtils;\n\n/**\n * @author Benjamin Bentmann\n */\nclass ArtifactId {\n\n    private final String groupId;\n\n    private final String artifactId;\n\n    private final String type;\n\n    private final String classifier;\n\n    ArtifactId(Dependency dependency) {\n        this(dependency.getGroupId(), dependency.getArtifactId(), dependency.getType(), dependency.getClassifier());\n    }\n\n    ArtifactId(Artifact artifact) {\n        this(artifact.getGroupId(), artifact.getArtifactId(), artifact.getType(), artifact.getClassifier());\n    }\n\n    ArtifactId(String groupId, String artifactId, String type, String classifier) {\n        this.groupId = (groupId != null) ? groupId : \"\";\n        this.artifactId = (artifactId != null) ? artifactId : \"\";\n        this.type = (type != null) ? type : \"\";\n        this.classifier = (classifier != null) ? classifier : \"\";\n    }\n\n    ArtifactId(String id) {\n        String[] tokens = new String[0];\n        if (id != null && id.length() > 0) {\n            tokens = id.split(\":\", -1);\n        }\n        groupId = (tokens.length > 0) ? tokens[0] : \"\";\n        artifactId = (tokens.length > 1) ? tokens[1] : \"*\";\n        type = (tokens.length > 3) ? tokens[2] : \"*\";\n        classifier = (tokens.length > 3) ? tokens[3] : ((tokens.length > 2) ? tokens[2] : \"*\");\n    }\n\n    public String getGroupId() {\n        return groupId;\n    }\n\n    public String getArtifactId() {\n        return artifactId;\n    }\n\n    public String getType() {\n        return type;\n    }\n\n    public String getClassifier() {\n        return classifier;\n    }\n\n    public boolean matches(ArtifactId pattern) {\n        if (pattern == null) {\n            return false;\n        }\n        if (!match(getGroupId(), pattern.getGroupId())) {\n            return false;\n        }\n        if (!match(getArtifactId(), pattern.getArtifactId())) {\n            return false;\n        }\n        if (!match(getType(), pattern.getType())) {\n            return false;\n        }\n        return match(getClassifier(), pattern.getClassifier());\n    }\n\n    private boolean match(String str, String pattern) {\n        return SelectorUtils.match(pattern, str);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactSelector.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport java.util.Collection;\nimport java.util.HashSet;\n\nimport org.apache.maven.artifact.Artifact;\n\n/**\n * @author Benjamin Bentmann\n */\nclass ArtifactSelector {\n\n    private Collection<ArtifactId> includes;\n\n    private Collection<ArtifactId> excludes;\n\n    ArtifactSelector(Artifact projectArtifact, ArtifactSet artifactSet, String groupPrefix) {\n        this(\n                (artifactSet != null) ? artifactSet.getIncludes() : null,\n                (artifactSet != null) ? artifactSet.getExcludes() : null,\n                groupPrefix);\n\n        if (projectArtifact != null && !this.includes.isEmpty()) {\n            this.includes.add(new ArtifactId(projectArtifact));\n        }\n    }\n\n    ArtifactSelector(Collection<String> includes, Collection<String> excludes, String groupPrefix) {\n        this.includes = toIds(includes);\n        this.excludes = toIds(excludes);\n\n        if (groupPrefix != null && groupPrefix.length() > 0) {\n            this.includes.add(new ArtifactId(groupPrefix + \"*\", \"*\", \"*\", \"*\"));\n        }\n    }\n\n    private static Collection<ArtifactId> toIds(Collection<String> patterns) {\n        Collection<ArtifactId> result = new HashSet<>();\n\n        if (patterns != null) {\n            for (String pattern : patterns) {\n                result.add(new ArtifactId(pattern));\n            }\n        }\n\n        return result;\n    }\n\n    public boolean isSelected(Artifact artifact) {\n        return artifact != null && isSelected(new ArtifactId(artifact));\n    }\n\n    boolean isSelected(ArtifactId id) {\n        return (includes.isEmpty() || matches(includes, id)) && !matches(excludes, id);\n    }\n\n    private boolean matches(Collection<ArtifactId> patterns, ArtifactId id) {\n        for (ArtifactId pattern : patterns) {\n            if (id.matches(pattern)) {\n                return true;\n            }\n        }\n        return false;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactSet.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport java.util.Set;\n\n/**\n * @author Jason van Zyl\n */\npublic class ArtifactSet {\n    private Set<String> includes;\n\n    private Set<String> excludes;\n\n    public Set<String> getIncludes() {\n        return includes;\n    }\n\n    public Set<String> getExcludes() {\n        return excludes;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/mojo/PackageRelocation.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport java.util.List;\n\n/**\n * @author Jason van Zyl\n * @author Mauro Talevi\n */\npublic class PackageRelocation {\n    private String pattern;\n\n    private String shadedPattern;\n\n    private List<String> includes;\n\n    private List<String> excludes;\n\n    private boolean rawString;\n\n    private boolean shadeSerializedLambda;\n\n    public String getPattern() {\n        return pattern;\n    }\n\n    public String getShadedPattern() {\n        return shadedPattern;\n    }\n\n    public List<String> getIncludes() {\n        return includes;\n    }\n\n    public List<String> getExcludes() {\n        return excludes;\n    }\n\n    public boolean isRawString() {\n        return rawString;\n    }\n\n    public boolean isShadeSerializedLambda() {\n        return shadeSerializedLambda;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/mojo/RelativizePath.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport java.io.File;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\n/**\n *\n */\npublic final class RelativizePath {\n    private RelativizePath() {\n        //\n    }\n\n    /**\n     * relativize a pathname.\n     * @param thing Absolute File of something. (e.g., a parent pom)\n     * @param relativeTo base to relativize it do. (e.g., a pom into which a relative pathname to the 'thing' is to be\n     *        installed).\n     * @return\n     */\n    static String convertToRelativePath(File thing, File relativeTo) {\n        StringBuilder relativePath;\n\n        if (thing.getParentFile().equals(relativeTo.getParentFile())) {\n            return thing.getName(); // a very simple relative path.\n        }\n\n        List<String> thingDirectories = RelativizePath.parentDirs(thing);\n        List<String> relativeToDirectories = RelativizePath.parentDirs(relativeTo);\n\n        // Get the shortest of the two paths\n        int length = Math.min(thingDirectories.size(), relativeToDirectories.size());\n\n        int lastCommonRoot = -1; // index of the lowest directory down from the root that the two have in common.\n        int index;\n\n        // Find common root\n        for (index = 0; index < length; index++) {\n            if (thingDirectories.get(index).equals(relativeToDirectories.get(index))) {\n                lastCommonRoot = index;\n            } else {\n                break;\n            }\n        }\n        if (lastCommonRoot != -1) { // possible on Windows or other multi-root cases.\n            // Build up the relative path\n            relativePath = new StringBuilder();\n            // add ..'s to get from the base up to the common point\n            for (index = lastCommonRoot + 1; index < relativeToDirectories.size(); index++) {\n                relativePath.append(\"../\");\n            }\n\n            // now add down from the common point to the actual 'thing' item.\n            for (index = lastCommonRoot + 1; index < thingDirectories.size(); index++) {\n                relativePath.append(thingDirectories.get(index)).append('/');\n            }\n            relativePath.append(thing.getName());\n            return relativePath.toString();\n        }\n        return null;\n    }\n\n    static List<String> parentDirs(File of) {\n        List<String> results = new ArrayList<>();\n        for (File p = of.getParentFile(); p != null; p = p.getParentFile()) {\n            if (!\"\".equals(p.getName())) {\n                results.add(p.getName());\n            }\n        }\n\n        Collections.reverse(results);\n        return results;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport javax.inject.Inject;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.Writer;\nimport java.nio.file.Files;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.stream.Collectors;\n\nimport org.apache.maven.RepositoryUtils;\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.artifact.DefaultArtifact;\nimport org.apache.maven.artifact.versioning.VersionRange;\nimport org.apache.maven.execution.MavenSession;\nimport org.apache.maven.model.Dependency;\nimport org.apache.maven.model.Exclusion;\nimport org.apache.maven.model.Model;\nimport org.apache.maven.plugin.AbstractMojo;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\nimport org.apache.maven.plugins.shade.ShadeRequest;\nimport org.apache.maven.plugins.shade.Shader;\nimport org.apache.maven.plugins.shade.filter.Filter;\nimport org.apache.maven.plugins.shade.filter.MinijarFilter;\nimport org.apache.maven.plugins.shade.filter.SimpleFilter;\nimport org.apache.maven.plugins.shade.pom.PomWriter;\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.relocation.SerializedLambdaRelocator;\nimport org.apache.maven.plugins.shade.relocation.SimpleRelocator;\nimport org.apache.maven.plugins.shade.resource.ManifestResourceTransformer;\nimport org.apache.maven.plugins.shade.resource.ResourceTransformer;\nimport org.apache.maven.project.DefaultProjectBuildingRequest;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.project.MavenProjectHelper;\nimport org.apache.maven.project.ProjectBuilder;\nimport org.apache.maven.project.ProjectBuildingException;\nimport org.apache.maven.project.ProjectBuildingRequest;\nimport org.apache.maven.project.ProjectBuildingResult;\nimport org.codehaus.plexus.util.IOUtil;\nimport org.codehaus.plexus.util.WriterFactory;\nimport org.eclipse.aether.RepositorySystem;\nimport org.eclipse.aether.collection.CollectRequest;\nimport org.eclipse.aether.collection.CollectResult;\nimport org.eclipse.aether.collection.DependencyCollectionException;\nimport org.eclipse.aether.graph.DependencyNode;\nimport org.eclipse.aether.resolution.ArtifactRequest;\nimport org.eclipse.aether.resolution.ArtifactResolutionException;\n\nimport static org.apache.maven.plugins.shade.resource.UseDependencyReducedPom.createPomReplaceTransformers;\n\n/**\n * Creates a shaded JAR artifact (i.e. embeds additional artifacts and optionally relocates their packages).\n * The generated shaded JAR becomes either the primary artifact or a secondary artifact of the current project.\n * The actual shading process is delegated to a {@link Shader} component.\n * It supports relocating references in binary classes and optionally also in Java source files, as well as resource transformations.\n * @see org.apache.maven.plugins.shade.DefaultShader DefaultShader (the default implementation of the Shader component).\n * @see <a href=\"https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html\">Resource Transformers</a>\n *\n * @author Jason van Zyl\n * @author Mauro Talevi\n * @author David Blevins\n * @author Hiram Chirino\n */\n// CHECKSTYLE_OFF: LineLength\n@Mojo(\n        name = \"shade\",\n        defaultPhase = LifecyclePhase.PACKAGE,\n        threadSafe = true,\n        requiresDependencyResolution = ResolutionScope.RUNTIME)\n// CHECKSTYLE_ON: LineLength\npublic class ShadeMojo extends AbstractMojo {\n    /**\n     * The current Maven session.\n     */\n    @Parameter(defaultValue = \"${session}\", readonly = true, required = true)\n    private MavenSession session;\n\n    /**\n     * The current Maven project.\n     */\n    @Parameter(defaultValue = \"${project}\", readonly = true, required = true)\n    private MavenProject project;\n\n    /**\n     * Artifacts to include/exclude from the final artifact. Artifacts are denoted by composite identifiers of the\n     * general form <code>groupId:artifactId:type:classifier</code>. Since version 1.3, the wildcard characters '*' and\n     * '?' can be used within the sub parts of those composite identifiers to do pattern matching. For convenience, the\n     * syntax <code>groupId</code> is equivalent to <code>groupId:*:*:*</code>, <code>groupId:artifactId</code> is\n     * equivalent to <code>groupId:artifactId:*:*</code> and <code>groupId:artifactId:classifier</code> is equivalent to\n     * <code>groupId:artifactId:*:classifier</code>. For example:\n     *\n     * <pre>\n     * &lt;artifactSet&gt;\n     *   &lt;includes&gt;\n     *     &lt;include&gt;org.apache.maven:*&lt;/include&gt;\n     *   &lt;/includes&gt;\n     *   &lt;excludes&gt;\n     *     &lt;exclude&gt;*:maven-core&lt;/exclude&gt;\n     *   &lt;/excludes&gt;\n     * &lt;/artifactSet&gt;\n     * </pre>\n     */\n    @Parameter\n    private ArtifactSet artifactSet;\n\n    /**\n     * Packages to be relocated. For example:\n     *\n     * <pre>\n     * &lt;relocations&gt;\n     *   &lt;relocation&gt;\n     *     &lt;pattern&gt;org.apache&lt;/pattern&gt;\n     *     &lt;shadedPattern&gt;hidden.org.apache&lt;/shadedPattern&gt;\n     *     &lt;includes&gt;\n     *       &lt;include&gt;org.apache.maven.*&lt;/include&gt;\n     *     &lt;/includes&gt;\n     *     &lt;excludes&gt;\n     *       &lt;exclude&gt;org.apache.maven.Public*&lt;/exclude&gt;\n     *     &lt;/excludes&gt;\n     *   &lt;/relocation&gt;\n     *   &lt;relocation&gt;\n     *     &lt;pattern&gt;Lorg/aspectj/&lt;/pattern&gt;\n     *     &lt;shadedPattern&gt;Lorg/example/shaded/aspectj/&lt;/shadedPattern&gt;\n     *     &lt;rawString&gt;true&lt;/rawString&gt;\n     *   &lt;/relocation&gt;\n     * &lt;/relocations&gt;\n     * </pre>\n     *\n     * Each {@code relocation} item must contain a non-empty {@code pattern} element. Its value may use either {@code /} or {@code .} as separator. It will be normalized accordingly depending on the relocation context (filesystem or fully qualified class/package name).\n     * The {@code shadedPattern} element is optional, if not given or empty the shaded pattern will be the same as the pattern prefixed by {@code hidden.}. Its value may use either {@code /} or {@code .} as separator. It will be normalized accordingly depending on the relocation context (filesystem or fully qualified class/package name).\n     * When {@code rawString} is set to {@code true} the given pattern is treated as regular expression {@link Pattern} otherwise is treated as plain String (not supporting any wildcards).\n     * The {@code includes} and {@code excludes} elements are optional and can be used to further fine-tune the set of classes to be relocated.\n     * Both are <a href=\"https://ant.apache.org/manual/dirtasks.html#patterns\">Ant-based patterns</a>, i.e. support wildcards {@code *}, {@code **} and {@code ?}.\n     * If both {@code includes} and {@code excludes} are given both conditions need to be fulfilled for a relocation to happen (i.e. both included and not excluded).\n     * @see <a href=\"https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html\">Class Relocation</a>\n     */\n    @SuppressWarnings(\"MismatchedReadAndWriteOfArray\")\n    @Parameter\n    private PackageRelocation[] relocations;\n\n    /**\n     * Resource transformers to be used.\n     * @see <a href=\"https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html\">Resource Transformers</a>\n     */\n    @Parameter\n    private ResourceTransformer[] transformers;\n\n    /**\n     * Archive Filters to be used. Allows you to specify an artifact in the form of a composite identifier as used by\n     * {@link #artifactSet} and a set of include/exclude file patterns for filtering which contents of the archive are\n     * added to the shaded jar. From a logical perspective, includes are processed before excludes, thus it's possible\n     * to use an include to collect a set of files from the archive then use excludes to further reduce the set. By\n     * default, all files are included and no files are excluded. If multiple filters apply to an artifact, the\n     * intersection of the matched files will be included in the final JAR. For example:\n     *\n     * <pre>\n     * &lt;filters&gt;\n     *   &lt;filter&gt;\n     *     &lt;artifact&gt;junit:junit&lt;/artifact&gt;\n     *     &lt;includes&gt;\n     *       &lt;include&gt;org/junit/**&lt;/include&gt;\n     *     &lt;/includes&gt;\n     *     &lt;excludes&gt;\n     *       &lt;exclude&gt;org/junit/experimental/**&lt;/exclude&gt;\n     *     &lt;/excludes&gt;\n     *   &lt;/filter&gt;\n     * &lt;/filters&gt;\n     * </pre>\n     */\n    @SuppressWarnings(\"MismatchedReadAndWriteOfArray\")\n    @Parameter\n    private ArchiveFilter[] filters;\n\n    /**\n     * The destination directory for the shaded artifact.\n     */\n    @Parameter(defaultValue = \"${project.build.directory}\")\n    private File outputDirectory;\n\n    /**\n     * The name of the shaded artifactId.\n     * <p/>\n     * If you like to change the name of the native artifact, you may use the &lt;build>&lt;finalName> setting. If this\n     * is set to something different than &lt;build>&lt;finalName>, no file replacement will be performed, even if\n     * shadedArtifactAttached is being used.\n     */\n    @Parameter\n    private String finalName;\n\n    /**\n     * The name of the shaded artifactId. So you may want to use a different artifactId and keep the standard version.\n     * If the original artifactId was \"foo\" then the final artifact would be something like foo-1.0.jar. So if you\n     * change the artifactId you might have something like foo-special-1.0.jar.\n     */\n    @Parameter(defaultValue = \"${project.artifactId}\")\n    private String shadedArtifactId;\n\n    /**\n     * If specified, this will include only artifacts which have groupIds which start with this.\n     */\n    @Parameter\n    private String shadedGroupFilter;\n\n    /**\n     * Defines whether the shaded artifact should be attached as classifier to the original artifact. If false, the\n     * shaded jar will be the main artifact of the project\n     */\n    @Parameter\n    private boolean shadedArtifactAttached;\n\n    /**\n     * Flag whether to generate a simplified POM for the shaded artifact. If set to <code>true</code>, dependencies that\n     * have been included into the uber JAR will be removed from the <code>&lt;dependencies&gt;</code> section of the\n     * generated POM. The reduced POM will be named <code>dependency-reduced-pom.xml</code> and is stored into the same\n     * directory as the shaded artifact. Unless you also specify dependencyReducedPomLocation, the plugin will create a\n     * temporary file named <code>dependency-reduced-pom.xml</code> in the project basedir.\n     */\n    @Parameter(defaultValue = \"true\")\n    private boolean createDependencyReducedPom;\n\n    /**\n     * Where to put the dependency reduced pom. Note: setting a value for this parameter with a directory other than\n     * ${basedir} will change the value of ${basedir} for all executions that come after the shade execution. This is\n     * often not what you want. This is considered an open issue with this plugin.\n     *\n     * @since 1.7\n     */\n    @Parameter(defaultValue = \"${basedir}/dependency-reduced-pom.xml\")\n    private File dependencyReducedPomLocation;\n\n    /**\n     * Create a dependency-reduced POM in ${basedir}/drp-UNIQUE.pom. This avoids build collisions of parallel builds\n     * without moving the dependency-reduced POM to a different directory. The property\n     * maven.shade.dependency-reduced-pom is set to the generated filename.\n     *\n     * @since 1.7.2\n     */\n    @Parameter(defaultValue = \"false\")\n    private boolean generateUniqueDependencyReducedPom;\n\n    /**\n     * Add dependency reduced POM to the JAR instead of the original one provided by the project.\n     * If {@code createDependencyReducedPom} is {@code false} this parameter will be ignored.\n     *\n     * @since 3.3.0\n     */\n    @Parameter(defaultValue = \"false\")\n    private boolean useDependencyReducedPomInJar;\n\n    /**\n     * When true, dependencies are kept in the pom but with scope 'provided'; when false, the dependency is removed.\n     */\n    @Parameter\n    private boolean keepDependenciesWithProvidedScope;\n\n    /**\n     * When true, transitive deps of removed dependencies are promoted to direct dependencies. This should allow the\n     * drop in replacement of the removed deps with the new shaded jar and everything should still work.\n     */\n    @Parameter\n    private boolean promoteTransitiveDependencies;\n\n    /**\n     * The name of the classifier used in case the shaded artifact is attached.\n     */\n    @Parameter(defaultValue = \"shaded\")\n    private String shadedClassifierName;\n\n    /**\n     * When true, it will attempt to create a sources jar as well\n     */\n    @Parameter\n    private boolean createSourcesJar;\n\n    /**\n     * When true, it will attempt to create a test sources jar.\n     */\n    @Parameter\n    private boolean createTestSourcesJar;\n\n    /**\n     * When true, it will attempt to shade the contents of Java source files when creating the sources JAR. When false,\n     * it will just relocate the Java source files to the shaded paths, but will not modify the actual source file\n     * contents.\n     * <p>\n     * <b>Please note:</b> This feature uses a heuristic search & replace approach which covers many, but definitely not\n     * all possible cases of source code shading and its excludes. There is no full Java parser behind this\n     * functionality, which would be the only way to get this right for Java language elements. As for matching within\n     * Java string constants, this is next to impossible to get 100% right, trying to guess if they are used in\n     * reflection or not.\n     * <p>\n     * Please understand that the source shading feature is not meant as a source code generator anyway, merely as a\n     * tool creating reasonably plausible source code when navigating to a relocated library class from an IDE,\n     * hopefully displaying source code which makes 95% sense - no more, no less.\n     */\n    @Parameter(property = \"shadeSourcesContent\", defaultValue = \"false\")\n    private boolean shadeSourcesContent;\n\n    /**\n     * When true, dependencies will be stripped down on the class level to only the transitive hull required for the\n     * artifact. See also {@link #entryPoints}, if you wish to further optimize JAR minimization.\n     * <p>\n     * <em>Note:</em> This feature uses\n     * <a href=\"https://github.com/tcurdt/jdependency\">jdependency</a>. Its accuracy therefore depends on\n     * jdependency's limitations.\n     *\n     * @since 1.4\n     */\n    @Parameter\n    private boolean minimizeJar;\n\n    /**\n     * Use this option in order to fine-tune {@link #minimizeJar}: By default, all of the target module's classes are\n     * kept and used as entry points for JAR minimization. By explicitly limiting the set of entry points, you can\n     * further minimize the set of classes kept in the shaded JAR. This affects both classes in the module itself and\n     * dependency classes. If {@link #minimizeJar} is inactive, this option has no effect either.\n     * <p>\n     * <em>Note:</em> This feature requires Java 1.8 or higher due to its use of\n     * <a href=\"https://github.com/tcurdt/jdependency\">jdependency</a>. Its accuracy therefore also depends on\n     * jdependency's limitations.\n     * <p>\n     * Configuration example:\n     * <pre>{@code\n     * <minimizeJar>true</minimizeJar>\n     * <entryPoints>\n     *   <entryPoint>org.acme.Application</entryPoint>\n     *   <entryPoint>org.acme.OtherEntryPoint</entryPoint>\n     * </entryPoints>\n     * }</pre>\n     *\n     * @since 3.5.0\n     */\n    @Parameter\n    private Set<String> entryPoints;\n\n    /**\n     * The path to the output file for the shaded artifact. When this parameter is set, the created archive will neither\n     * replace the project's main artifact nor will it be attached. Hence, this parameter causes the parameters\n     * {@link #finalName}, {@link #shadedArtifactAttached}, {@link #shadedClassifierName} and\n     * {@link #createDependencyReducedPom} to be ignored when used.\n     *\n     * @since 1.3\n     */\n    @Parameter\n    private File outputFile;\n\n    /**\n     * You can pass here the roleHint about your own Shader implementation plexus component.\n     *\n     * @since 1.6\n     */\n    @Parameter\n    private String shaderHint;\n\n    /**\n     * When true, the version of each dependency of the reduced pom will be based on the baseVersion of the original\n     * dependency instead of its resolved version. For example, if the original pom (transitively) depends on\n     * a:a:2.7-SNAPSHOT, if useBaseVersion is set to false, the reduced pom will depend on a:a:2.7-20130312.222222-12\n     * whereas if useBaseVersion is set to true, the reduced pom will depend on a:a:2.7-SNAPSHOT\n     *\n     * @since 3.0\n     */\n    @Parameter(defaultValue = \"false\")\n    private boolean useBaseVersion;\n\n    /**\n     * When true, creates a shaded test-jar artifact as well.\n     */\n    @Parameter(defaultValue = \"false\")\n    private boolean shadeTestJar;\n\n    /**\n     * When true, skips the execution of this MOJO.\n     * @since 3.3.0\n     */\n    @Parameter(defaultValue = \"false\")\n    private boolean skip;\n\n    /**\n     * Extra JAR files to infuse into shaded result. Accepts list of files that must exists. If any of specified\n     * files does not exist (or is not a file), Mojo will fail.\n     * <p>\n     * Extra JARs will be processed in same way as main JAR (if any) is: applied relocation, resource transformers\n     * but <em>not filtering</em>.\n     * <p>\n     * Note: this feature should be used lightly, is not meant as ability to replace dependency hull! It is more\n     * just a feature to be able to slightly \"differentiate\" shaded JAR from main only.\n     *\n     * @since 3.6.0\n     */\n    @Parameter\n    private List<File> extraJars;\n\n    /**\n     * Extra Artifacts to infuse into shaded result. Accepts list of GAVs in form of\n     * {@code <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>} that will be resolved. If any of them\n     * cannot be resolved, Mojo will fail.\n     * <p>\n     * The artifacts will be resolved (not transitively), and will be processed in same way as dependency JARs\n     * are (if any): applied relocation, resource transformers and filtering.\n     * <p>\n     * Note: this feature should be used lightly, is not meant as ability to replace dependency hull! It is more\n     * just a feature to be able to slightly \"differentiate\" shaded JAR from main only.\n     *\n     * @since 3.6.0\n     */\n    @Parameter\n    private List<String> extraArtifacts;\n\n    @Inject\n    private MavenProjectHelper projectHelper;\n\n    @Inject\n    private Shader shader;\n\n    @Inject\n    private RepositorySystem repositorySystem;\n\n    /**\n     * ProjectBuilder, needed to create projects from the artifacts.\n     */\n    @Inject\n    private ProjectBuilder projectBuilder;\n\n    /**\n     * All the present Shaders.\n     */\n    @Inject\n    private Map<String, Shader> shaders;\n\n    /**\n     * @throws MojoExecutionException in case of an error.\n     */\n    @SuppressWarnings(\"checkstyle:methodlength\")\n    @Override\n    public void execute() throws MojoExecutionException {\n        if (skip) {\n            getLog().info(\"Shading has been skipped.\");\n            return;\n        }\n\n        setupHintedShader();\n\n        Set<File> artifacts = new LinkedHashSet<>();\n        Set<String> artifactIds = new LinkedHashSet<>();\n        Set<File> sourceArtifacts = new LinkedHashSet<>();\n        Set<File> testArtifacts = new LinkedHashSet<>();\n        Set<File> testSourceArtifacts = new LinkedHashSet<>();\n\n        ArtifactSelector artifactSelector = new ArtifactSelector(project.getArtifact(), artifactSet, shadedGroupFilter);\n\n        if (artifactSelector.isSelected(project.getArtifact())\n                && !\"pom\".equals(project.getArtifact().getType())) {\n            if (invalidMainArtifact()) {\n                createErrorOutput();\n                throw new MojoExecutionException(\n                        \"Failed to create shaded artifact, \" + \"project main artifact does not exist.\");\n            }\n\n            artifacts.add(project.getArtifact().getFile());\n\n            if (extraJars != null && !extraJars.isEmpty()) {\n                for (File extraJar : extraJars) {\n                    if (!Files.isRegularFile(extraJar.toPath())) {\n                        throw new MojoExecutionException(\n                                \"Failed to create shaded artifact: parameter extraJars contains path \" + extraJar\n                                        + \" that is not a file (does not exist or is not a file)\");\n                    }\n                    artifacts.add(extraJar);\n                }\n            }\n\n            if (createSourcesJar) {\n                File file = shadedSourcesArtifactFile();\n                if (file.isFile()) {\n                    sourceArtifacts.add(file);\n                }\n            }\n\n            if (shadeTestJar) {\n                File file = shadedTestArtifactFile();\n                if (file.isFile()) {\n                    testArtifacts.add(file);\n                }\n            }\n\n            if (createTestSourcesJar) {\n                File file = shadedTestSourcesArtifactFile();\n                if (file.isFile()) {\n                    testSourceArtifacts.add(file);\n                }\n            }\n        }\n\n        List<Artifact> processedArtifacts = processArtifactSelectors(\n                artifacts, artifactIds, sourceArtifacts, testArtifacts, testSourceArtifacts, artifactSelector);\n\n        File outputJar = (outputFile != null) ? outputFile : shadedArtifactFileWithClassifier();\n        File sourcesJar = shadedSourceArtifactFileWithClassifier();\n        File testJar = shadedTestArtifactFileWithClassifier();\n        File testSourcesJar = shadedTestSourceArtifactFileWithClassifier();\n\n        // Now add our extra resources\n        try {\n            List<Filter> filters = getFilters(processedArtifacts);\n\n            List<Relocator> relocators = getRelocators();\n\n            List<ResourceTransformer> resourceTransformers = getResourceTransformers();\n\n            if (createDependencyReducedPom) {\n                createDependencyReducedPom(artifactIds);\n\n                if (useDependencyReducedPomInJar) {\n                    // In some cases the used implementation of the resourceTransformers is immutable.\n                    resourceTransformers = new ArrayList<>(resourceTransformers);\n                    resourceTransformers.addAll(createPomReplaceTransformers(project, dependencyReducedPomLocation));\n                }\n            }\n\n            ShadeRequest shadeRequest =\n                    shadeRequest(\"jar\", artifacts, outputJar, filters, relocators, resourceTransformers);\n\n            shader.shade(shadeRequest);\n\n            if (createSourcesJar) {\n                ShadeRequest shadeSourcesRequest = createShadeSourcesRequest(\n                        \"sources-jar\", sourceArtifacts, sourcesJar, filters, relocators, resourceTransformers);\n\n                shader.shade(shadeSourcesRequest);\n            }\n\n            if (shadeTestJar) {\n                ShadeRequest shadeTestRequest =\n                        shadeRequest(\"test-jar\", testArtifacts, testJar, filters, relocators, resourceTransformers);\n\n                shader.shade(shadeTestRequest);\n            }\n\n            if (createTestSourcesJar) {\n                ShadeRequest shadeTestSourcesRequest = createShadeSourcesRequest(\n                        \"test-sources-jar\",\n                        testSourceArtifacts,\n                        testSourcesJar,\n                        filters,\n                        relocators,\n                        resourceTransformers);\n\n                shader.shade(shadeTestSourcesRequest);\n            }\n\n            if (outputFile == null) {\n                boolean renamed = false;\n\n                // rename the output file if a specific finalName is set\n                // but don't rename if the finalName is the <build><finalName>\n                // because this will be handled implicitly later\n                if (finalName != null\n                        && finalName.length() > 0 //\n                        && !finalName.equals(project.getBuild().getFinalName())) {\n                    String finalFileName = finalName + \".\"\n                            + project.getArtifact().getArtifactHandler().getExtension();\n                    File finalFile = new File(outputDirectory, finalFileName);\n                    replaceFile(finalFile, outputJar);\n                    outputJar = finalFile;\n\n                    // Also support the sources JAR\n                    if (createSourcesJar) {\n                        finalFileName = finalName + \"-sources.jar\";\n                        finalFile = new File(outputDirectory, finalFileName);\n                        replaceFile(finalFile, sourcesJar);\n                        sourcesJar = finalFile;\n                    }\n\n                    // Also support the test JAR\n                    if (shadeTestJar) {\n                        finalFileName = finalName + \"-tests.jar\";\n                        finalFile = new File(outputDirectory, finalFileName);\n                        replaceFile(finalFile, testJar);\n                        testJar = finalFile;\n                    }\n\n                    if (createTestSourcesJar) {\n                        finalFileName = finalName + \"-test-sources.jar\";\n                        finalFile = new File(outputDirectory, finalFileName);\n                        replaceFile(finalFile, testSourcesJar);\n                        testSourcesJar = finalFile;\n                    }\n\n                    renamed = true;\n                }\n\n                if (shadedArtifactAttached) {\n                    getLog().info(\"Attaching shaded artifact.\");\n                    projectHelper.attachArtifact(\n                            project, project.getArtifact().getType(), shadedClassifierName, outputJar);\n                    if (createSourcesJar) {\n                        projectHelper.attachArtifact(\n                                project, \"java-source\", shadedClassifierName + \"-sources\", sourcesJar);\n                    }\n\n                    if (shadeTestJar) {\n                        projectHelper.attachArtifact(project, \"test-jar\", shadedClassifierName + \"-tests\", testJar);\n                    }\n\n                    if (createTestSourcesJar) {\n                        projectHelper.attachArtifact(\n                                project, \"java-source\", shadedClassifierName + \"-test-sources\", testSourcesJar);\n                    }\n                } else if (!renamed) {\n                    getLog().info(\"Replacing original artifact with shaded artifact.\");\n                    File originalArtifact = project.getArtifact().getFile();\n                    if (originalArtifact != null) {\n                        replaceFile(originalArtifact, outputJar);\n\n                        if (createSourcesJar) {\n                            getLog().info(\"Replacing original source artifact with shaded source artifact.\");\n                            File shadedSources = shadedSourcesArtifactFile();\n\n                            replaceFile(shadedSources, sourcesJar);\n\n                            projectHelper.attachArtifact(project, \"java-source\", \"sources\", shadedSources);\n                        }\n\n                        if (shadeTestJar) {\n                            getLog().info(\"Replacing original test artifact with shaded test artifact.\");\n                            File shadedTests = shadedTestArtifactFile();\n\n                            replaceFile(shadedTests, testJar);\n\n                            projectHelper.attachArtifact(project, \"test-jar\", shadedTests);\n                        }\n\n                        if (createTestSourcesJar) {\n                            getLog().info(\"Replacing original test source artifact \"\n                                    + \"with shaded test source artifact.\");\n                            File shadedTestSources = shadedTestSourcesArtifactFile();\n\n                            replaceFile(shadedTestSources, testSourcesJar);\n\n                            projectHelper.attachArtifact(project, \"java-source\", \"test-sources\", shadedTestSources);\n                        }\n                    }\n                }\n            }\n        } catch (Exception e) {\n            throw new MojoExecutionException(\"Error creating shaded jar: \" + e.getMessage(), e);\n        }\n    }\n\n    private void createErrorOutput() {\n        getLog().error(\"The project main artifact does not exist. This could have the following\");\n        getLog().error(\"reasons:\");\n        getLog().error(\"- You have invoked the goal directly from the command line. This is not\");\n        getLog().error(\"  supported. Please add the goal to the default lifecycle via an\");\n        getLog().error(\"  <execution> element in your POM and use \\\"mvn package\\\" to have it run.\");\n        getLog().error(\"- You have bound the goal to a lifecycle phase before \\\"package\\\". Please\");\n        getLog().error(\"  remove this binding from your POM such that the goal will be run in\");\n        getLog().error(\"  the proper phase.\");\n        getLog().error(\"- You removed the configuration of the maven-jar-plugin that produces the main artifact.\");\n    }\n\n    private ShadeRequest shadeRequest(\n            String shade,\n            Set<File> artifacts,\n            File outputJar,\n            List<Filter> filters,\n            List<Relocator> relocators,\n            List<ResourceTransformer> resourceTransformers) {\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(artifacts);\n        shadeRequest.setUberJar(outputJar);\n        shadeRequest.setFilters(filters);\n        shadeRequest.setRelocators(relocators);\n        shadeRequest.setResourceTransformers(toResourceTransformers(shade, resourceTransformers));\n        return shadeRequest;\n    }\n\n    private ShadeRequest createShadeSourcesRequest(\n            String shade,\n            Set<File> testArtifacts,\n            File testJar,\n            List<Filter> filters,\n            List<Relocator> relocators,\n            List<ResourceTransformer> resourceTransformers) {\n        ShadeRequest shadeSourcesRequest =\n                shadeRequest(shade, testArtifacts, testJar, filters, relocators, resourceTransformers);\n        shadeSourcesRequest.setShadeSourcesContent(shadeSourcesContent);\n        return shadeSourcesRequest;\n    }\n\n    private void setupHintedShader() throws MojoExecutionException {\n        if (shaderHint != null) {\n            shader = shaders.get(shaderHint);\n\n            if (shader == null) {\n                throw new MojoExecutionException(\n                        \"unable to lookup own Shader implementation with hint: '\" + shaderHint + \"'\");\n            }\n        }\n    }\n\n    private List<Artifact> processArtifactSelectors(\n            Set<File> artifacts,\n            Set<String> artifactIds,\n            Set<File> sourceArtifacts,\n            Set<File> testArtifacts,\n            Set<File> testSourceArtifacts,\n            ArtifactSelector artifactSelector)\n            throws MojoExecutionException {\n\n        List<Artifact> excludedArtifacts = new ArrayList<>();\n        List<Artifact> pomArtifacts = new ArrayList<>();\n        List<Artifact> emptySourceArtifacts = new ArrayList<>();\n        List<Artifact> emptyTestArtifacts = new ArrayList<>();\n        List<Artifact> emptyTestSourceArtifacts = new ArrayList<>();\n\n        ArrayList<Artifact> processedArtifacts = new ArrayList<>();\n        if (extraArtifacts != null && !extraArtifacts.isEmpty()) {\n            processedArtifacts.addAll(extraArtifacts.stream()\n                    .map(org.eclipse.aether.artifact.DefaultArtifact::new)\n                    .map(RepositoryUtils::toArtifact)\n                    .collect(Collectors.toList()));\n\n            for (Artifact artifact : processedArtifacts) {\n                try {\n                    org.eclipse.aether.artifact.Artifact resolved =\n                            resolveArtifact(RepositoryUtils.toArtifact(artifact));\n                    if (resolved.getFile() != null) {\n                        artifact.setFile(resolved.getFile());\n                    }\n                } catch (ArtifactResolutionException e) {\n                    throw new MojoExecutionException(\n                            \"Failed to create shaded artifact: parameter extraArtifacts contains artifact \"\n                                    + artifact.getId() + \" that is not resolvable\",\n                            e);\n                }\n            }\n        }\n        processedArtifacts.addAll(project.getArtifacts());\n\n        // for loop over COPY; as we add to the list in this loop\n        for (Artifact artifact : new ArrayList<>(processedArtifacts)) {\n            if (!artifactSelector.isSelected(artifact)) {\n                excludedArtifacts.add(artifact);\n                continue;\n            }\n\n            if (\"pom\".equals(artifact.getType())) {\n                pomArtifacts.add(artifact);\n                continue;\n            }\n\n            getLog().debug(\"Including \" + artifact.getId() + \" in the shaded jar.\");\n\n            artifacts.add(artifact.getFile());\n            artifactIds.add(getId(artifact));\n\n            if (createSourcesJar) {\n                Artifact sources = resolveArtifactForClassifier(artifact, \"sources\");\n                if (sources != null) {\n                    if (sources.getFile().length() > 0) {\n                        sourceArtifacts.add(sources.getFile());\n                        processedArtifacts.add(sources);\n                    } else {\n                        emptySourceArtifacts.add(artifact);\n                    }\n                }\n            }\n\n            if (shadeTestJar) {\n                Artifact tests = resolveArtifactForClassifier(artifact, \"tests\");\n                if (tests != null) {\n                    if (tests.getFile().length() > 0) {\n                        testArtifacts.add(tests.getFile());\n                        processedArtifacts.add(tests);\n                    } else {\n                        emptyTestArtifacts.add(artifact);\n                    }\n                }\n            }\n\n            if (createTestSourcesJar) {\n                Artifact testSources = resolveArtifactForClassifier(artifact, \"test-sources\");\n                if (testSources != null) {\n                    testSourceArtifacts.add(testSources.getFile());\n                    processedArtifacts.add(testSources);\n                } else {\n                    emptyTestSourceArtifacts.add(artifact);\n                }\n            }\n        }\n\n        processedArtifacts.removeAll(excludedArtifacts);\n        processedArtifacts.removeAll(pomArtifacts);\n        processedArtifacts.removeAll(emptySourceArtifacts);\n        processedArtifacts.removeAll(emptyTestArtifacts);\n        processedArtifacts.removeAll(emptyTestSourceArtifacts);\n\n        for (Artifact artifact : excludedArtifacts) {\n            getLog().debug(\"Excluding \" + artifact.getId() + \" from the shaded jar.\");\n        }\n        for (Artifact artifact : pomArtifacts) {\n            getLog().debug(\"Skipping pom dependency \" + artifact.getId() + \" in the shaded jar.\");\n        }\n        for (Artifact artifact : emptySourceArtifacts) {\n            getLog().warn(\"Skipping empty source jar \" + artifact.getId() + \".\");\n        }\n        for (Artifact artifact : emptyTestArtifacts) {\n            getLog().warn(\"Skipping empty test jar \" + artifact.getId() + \".\");\n        }\n        for (Artifact artifact : emptyTestSourceArtifacts) {\n            getLog().warn(\"Skipping empty test source jar \" + artifact.getId() + \".\");\n        }\n        return processedArtifacts;\n    }\n\n    private boolean invalidMainArtifact() {\n        return project.getArtifact().getFile() == null\n                || !project.getArtifact().getFile().isFile();\n    }\n\n    private void replaceFile(File oldFile, File newFile) throws MojoExecutionException {\n        getLog().debug(\"Replacing \" + oldFile + \" with \" + newFile);\n\n        File origFile = new File(outputDirectory, \"original-\" + oldFile.getName());\n        if (oldFile.exists() && !oldFile.renameTo(origFile)) {\n            // try a gc to see if an unclosed stream needs garbage collecting\n            System.gc();\n            System.gc();\n\n            if (!oldFile.renameTo(origFile)) {\n                // Still didn't work. We'll do a copy\n                try {\n                    copyFiles(oldFile, origFile);\n                } catch (IOException ex) {\n                    // kind of ignorable here. We're just trying to save the original\n                    getLog().warn(ex);\n                }\n            }\n        }\n        if (!newFile.renameTo(oldFile)) {\n            // try a gc to see if an unclosed stream needs garbage collecting\n            System.gc();\n            System.gc();\n\n            if (!newFile.renameTo(oldFile)) {\n                // Still didn't work. We'll do a copy\n                try {\n                    copyFiles(newFile, oldFile);\n                } catch (IOException ex) {\n                    throw new MojoExecutionException(\"Could not replace original artifact with shaded artifact!\", ex);\n                }\n            }\n        }\n    }\n\n    private void copyFiles(File source, File target) throws IOException {\n        try (InputStream in = Files.newInputStream(source.toPath());\n                OutputStream out = Files.newOutputStream(target.toPath())) {\n            IOUtil.copy(in, out);\n        }\n    }\n\n    private Artifact resolveArtifactForClassifier(Artifact artifact, String classifier) {\n        Artifact toResolve = new DefaultArtifact(\n                artifact.getGroupId(),\n                artifact.getArtifactId(),\n                artifact.getVersionRange() == null\n                        ? VersionRange.createFromVersion(artifact.getVersion())\n                        : artifact.getVersionRange(),\n                artifact.getScope(),\n                artifact.getType(),\n                classifier,\n                artifact.getArtifactHandler(),\n                artifact.isOptional());\n        try {\n            org.eclipse.aether.artifact.Artifact resolved = resolveArtifact(RepositoryUtils.toArtifact(toResolve));\n            if (resolved.getFile() != null) {\n                toResolve.setFile(resolved.getFile());\n                return toResolve;\n            }\n            return null;\n        } catch (ArtifactResolutionException e) {\n            getLog().warn(\"Could not get \" + classifier + \" for \" + artifact);\n            return null;\n        }\n    }\n\n    private org.eclipse.aether.artifact.Artifact resolveArtifact(org.eclipse.aether.artifact.Artifact artifact)\n            throws ArtifactResolutionException {\n        return repositorySystem\n                .resolveArtifact(\n                        session.getRepositorySession(),\n                        new ArtifactRequest(artifact, project.getRemoteProjectRepositories(), \"shade\"))\n                .getArtifact();\n    }\n\n    private List<Relocator> getRelocators() {\n        List<Relocator> relocators = new ArrayList<>();\n\n        if (relocations == null) {\n            return relocators;\n        }\n\n        for (PackageRelocation r : relocations) {\n            relocators.add(new SimpleRelocator(\n                    r.getPattern(), r.getShadedPattern(), r.getIncludes(), r.getExcludes(), r.isRawString()));\n            if (r.isShadeSerializedLambda()) {\n                relocators.add(new SerializedLambdaRelocator(\n                        r.getPattern(), r.getShadedPattern(), r.getIncludes(), r.getExcludes(), r.isRawString()));\n            }\n        }\n\n        return relocators;\n    }\n\n    private List<ResourceTransformer> getResourceTransformers() throws MojoExecutionException {\n        if (transformers == null) {\n            return Collections.emptyList();\n        }\n        for (ResourceTransformer transformer : transformers) {\n            if (transformer == null) {\n                throw new MojoExecutionException(\n                        \"Failed to create shaded artifact: parameter transformers contains null (double-check XML attribute)\");\n            }\n        }\n        return Arrays.asList(transformers);\n    }\n\n    private List<Filter> getFilters(List<Artifact> artifactCollection) throws MojoExecutionException {\n        List<Filter> filters = new ArrayList<>();\n        List<SimpleFilter> simpleFilters = new ArrayList<>();\n\n        if (this.filters != null && this.filters.length > 0) {\n            Map<Artifact, ArtifactId> artifacts = new HashMap<>();\n\n            // artifactCollection does not contain project; that must also be subjected to filtering\n            artifacts.put(project.getArtifact(), new ArtifactId(project.getArtifact()));\n\n            for (Artifact artifact : artifactCollection) {\n                artifacts.put(artifact, new ArtifactId(artifact));\n            }\n\n            for (ArchiveFilter filter : this.filters) {\n                ArtifactId pattern = new ArtifactId(filter.getArtifact());\n\n                Set<File> jars = new HashSet<>();\n\n                for (Map.Entry<Artifact, ArtifactId> entry : artifacts.entrySet()) {\n                    if (entry.getValue().matches(pattern)) {\n                        Artifact artifact = entry.getKey();\n\n                        jars.add(artifact.getFile());\n\n                        if (createSourcesJar) {\n                            Artifact sources = resolveArtifactForClassifier(artifact, \"sources\");\n                            if (sources != null) {\n                                jars.add(sources.getFile());\n                            }\n                        }\n\n                        if (shadeTestJar) {\n                            Artifact tests = resolveArtifactForClassifier(artifact, \"tests\");\n                            if (tests != null) {\n                                jars.add(tests.getFile());\n                            }\n                        }\n                    }\n                }\n\n                if (jars.isEmpty()) {\n                    getLog().debug(\"No artifact matching filter \" + filter.getArtifact());\n\n                    continue;\n                }\n\n                simpleFilters.add(new SimpleFilter(jars, filter));\n            }\n        }\n\n        filters.addAll(simpleFilters);\n\n        if (minimizeJar) {\n            if (entryPoints == null) {\n                entryPoints = new HashSet<>();\n            }\n            getLog().info(\"Minimizing jar \" + project.getArtifact()\n                    + (entryPoints.isEmpty() ? \"\" : \" with entry points\"));\n\n            try {\n                filters.add(new MinijarFilter(project, getLog(), simpleFilters, entryPoints));\n            } catch (IOException e) {\n                throw new MojoExecutionException(\"Failed to analyze class dependencies\", e);\n            }\n        }\n\n        return filters;\n    }\n\n    private File shadedArtifactFileWithClassifier() {\n        Artifact artifact = project.getArtifact();\n        final String shadedName = shadedArtifactId + \"-\" + artifact.getVersion() + \"-\" + shadedClassifierName + \".\"\n                + artifact.getArtifactHandler().getExtension();\n        return new File(outputDirectory, shadedName);\n    }\n\n    private File shadedSourceArtifactFileWithClassifier() {\n        return shadedArtifactFileWithClassifier(\"sources\");\n    }\n\n    private File shadedTestSourceArtifactFileWithClassifier() {\n        return shadedArtifactFileWithClassifier(\"test-sources\");\n    }\n\n    private File shadedArtifactFileWithClassifier(String classifier) {\n        Artifact artifact = project.getArtifact();\n        final String shadedName = shadedArtifactId + \"-\" + artifact.getVersion() + \"-\" + shadedClassifierName + \"-\"\n                + classifier + \".\" + artifact.getArtifactHandler().getExtension();\n        return new File(outputDirectory, shadedName);\n    }\n\n    private File shadedTestArtifactFileWithClassifier() {\n        return shadedArtifactFileWithClassifier(\"tests\");\n    }\n\n    private File shadedSourcesArtifactFile() {\n        return shadedArtifactFile(\"sources\");\n    }\n\n    private File shadedTestSourcesArtifactFile() {\n        return shadedArtifactFile(\"test-sources\");\n    }\n\n    private File shadedArtifactFile(String classifier) {\n        Artifact artifact = project.getArtifact();\n\n        String shadedName;\n\n        if (project.getBuild().getFinalName() != null) {\n            shadedName = project.getBuild().getFinalName() + \"-\" + classifier + \".\"\n                    + artifact.getArtifactHandler().getExtension();\n        } else {\n            shadedName = shadedArtifactId + \"-\" + artifact.getVersion() + \"-\" + classifier + \".\"\n                    + artifact.getArtifactHandler().getExtension();\n        }\n\n        return new File(outputDirectory, shadedName);\n    }\n\n    private File shadedTestArtifactFile() {\n        return shadedArtifactFile(\"tests\");\n    }\n\n    // We need to find the direct dependencies that have been included in the uber JAR so that we can modify the\n    // POM accordingly.\n    private void createDependencyReducedPom(Set<String> artifactsToRemove)\n            throws IOException, ProjectBuildingException, DependencyCollectionException {\n        List<Dependency> transitiveDeps = new ArrayList<>();\n\n        // NOTE: By using the getArtifacts() we get the completely evaluated artifacts\n        // including the system scoped artifacts with expanded values of properties used.\n        for (Artifact artifact : project.getArtifacts()) {\n            if (\"pom\".equals(artifact.getType())) {\n                // don't include pom type dependencies in dependency reduced pom\n                continue;\n            }\n\n            // promote\n            Dependency dep = createDependency(artifact);\n\n            // we'll figure out the exclusions in a bit.\n            transitiveDeps.add(dep);\n        }\n\n        Model model = project.getOriginalModel();\n\n        // MSHADE-413: Must not use objects (for example `Model` or `Dependency`) that are \"owned\n        // by Maven\" and being used by other projects/plugins. Modifying those will break the\n        // correctness of the build - or cause an endless loop.\n        List<Dependency> origDeps = new ArrayList<>();\n        List<Dependency> source = promoteTransitiveDependencies ? transitiveDeps : project.getDependencies();\n        for (Dependency d : source) {\n            origDeps.add(d.clone());\n        }\n        model = model.clone();\n\n        // MSHADE-185: We will remove all system scoped dependencies which usually\n        // have some kind of property usage. At this time the properties within\n        // such things are already evaluated.\n        List<Dependency> originalDependencies = model.getDependencies();\n        removeSystemScopedDependencies(artifactsToRemove, originalDependencies);\n\n        List<Dependency> dependencies = new ArrayList<>();\n        boolean modified = false;\n        for (Dependency d : origDeps) {\n            if (artifactsToRemove.contains(getId(d))) {\n                if (keepDependenciesWithProvidedScope) {\n                    if (!\"provided\".equals(d.getScope())) {\n                        modified = true;\n                        d.setScope(\"provided\");\n                    }\n                } else {\n                    modified = true;\n                    continue;\n                }\n            }\n\n            dependencies.add(d);\n        }\n\n        // MSHADE-155\n        model.setArtifactId(shadedArtifactId);\n\n        // MSHADE-185: We will add those system scoped dependencies\n        // from the non interpolated original pom file. So we keep\n        // things like this: <systemPath>${tools.jar}</systemPath> intact.\n        addSystemScopedDependencyFromNonInterpolatedPom(dependencies, originalDependencies);\n\n        // Check to see if we have a reduction and if so rewrite the POM.\n        rewriteDependencyReducedPomIfWeHaveReduction(dependencies, modified, transitiveDeps, model);\n    }\n\n    private void rewriteDependencyReducedPomIfWeHaveReduction(\n            List<Dependency> dependencies, boolean modified, List<Dependency> transitiveDeps, Model model)\n            throws IOException, ProjectBuildingException, DependencyCollectionException {\n        if (modified) {\n            for (int loopCounter = 0; modified; loopCounter++) {\n\n                model.setDependencies(dependencies);\n\n                if (generateUniqueDependencyReducedPom) {\n                    dependencyReducedPomLocation = Files.createTempFile(\n                                    project.getBasedir().toPath(), \"dependency-reduced-pom-\", \".xml\")\n                            .toFile();\n                    project.getProperties()\n                            .setProperty(\n                                    \"maven.shade.dependency-reduced-pom\",\n                                    dependencyReducedPomLocation.getAbsolutePath());\n                } else {\n                    if (dependencyReducedPomLocation == null) {\n                        // MSHADE-123: We can't default to 'target' because it messes up uses of ${project.basedir}\n                        dependencyReducedPomLocation = new File(project.getBasedir(), \"dependency-reduced-pom.xml\");\n                    }\n                }\n\n                File f = dependencyReducedPomLocation;\n                // MSHADE-225\n                // Works for now, maybe there's a better algorithm where no for-loop is required\n                if (loopCounter == 0) {\n                    getLog().info(\"Dependency-reduced POM written at: \" + f.getAbsolutePath());\n                }\n\n                if (f.exists()) {\n                    // noinspection ResultOfMethodCallIgnored\n                    f.delete();\n                }\n\n                Writer w = WriterFactory.newXmlWriter(f);\n\n                String replaceRelativePath = null;\n                if (model.getParent() != null) {\n                    replaceRelativePath = model.getParent().getRelativePath();\n                }\n\n                if (model.getParent() != null) {\n                    File parentFile =\n                            new File(project.getBasedir(), model.getParent().getRelativePath()).getCanonicalFile();\n                    if (!parentFile.isFile()) {\n                        parentFile = new File(parentFile, \"pom.xml\");\n                    }\n\n                    parentFile = parentFile.getCanonicalFile();\n\n                    String relPath = RelativizePath.convertToRelativePath(parentFile, f);\n                    model.getParent().setRelativePath(relPath);\n                }\n\n                try {\n                    PomWriter.write(w, model, true);\n                } finally {\n                    if (model.getParent() != null) {\n                        model.getParent().setRelativePath(replaceRelativePath);\n                    }\n                    w.close();\n                }\n\n                synchronized (session.getProjectBuildingRequest()) { // Lock critical section to fix MSHADE-467\n                    ProjectBuildingRequest projectBuildingRequest =\n                            new DefaultProjectBuildingRequest(session.getProjectBuildingRequest());\n                    projectBuildingRequest.setLocalRepository(session.getLocalRepository());\n                    projectBuildingRequest.setRemoteRepositories(project.getRemoteArtifactRepositories());\n\n                    ProjectBuildingResult result = projectBuilder.build(f, projectBuildingRequest);\n\n                    getLog().debug(\"updateExcludesInDeps()\");\n                    modified = updateExcludesInDeps(result.getProject(), dependencies, transitiveDeps);\n                }\n            }\n\n            project.setFile(dependencyReducedPomLocation);\n        }\n    }\n\n    private void removeSystemScopedDependencies(Set<String> artifactsToRemove, List<Dependency> originalDependencies) {\n        for (Dependency dependency : originalDependencies) {\n            if (dependency.getScope() != null && dependency.getScope().equalsIgnoreCase(\"system\")) {\n                artifactsToRemove.add(getId(dependency));\n            }\n        }\n    }\n\n    private void addSystemScopedDependencyFromNonInterpolatedPom(\n            List<Dependency> dependencies, List<Dependency> originalDependencies) {\n        for (Dependency dependency : originalDependencies) {\n            if (dependency.getScope() != null && dependency.getScope().equalsIgnoreCase(\"system\")) {\n                dependencies.add(dependency);\n            }\n        }\n    }\n\n    private Dependency createDependency(Artifact artifact) {\n        Dependency dep = new Dependency();\n        dep.setArtifactId(artifact.getArtifactId());\n        if (artifact.hasClassifier()) {\n            dep.setClassifier(artifact.getClassifier());\n        }\n        dep.setGroupId(artifact.getGroupId());\n        dep.setOptional(artifact.isOptional());\n        dep.setScope(artifact.getScope());\n        dep.setType(artifact.getType());\n        if (useBaseVersion) {\n            dep.setVersion(artifact.getBaseVersion());\n        } else {\n            dep.setVersion(artifact.getVersion());\n        }\n        return dep;\n    }\n\n    private String getId(Artifact artifact) {\n        return getId(artifact.getGroupId(), artifact.getArtifactId(), artifact.getType(), artifact.getClassifier());\n    }\n\n    private String getId(Dependency dependency) {\n        return getId(\n                dependency.getGroupId(), dependency.getArtifactId(), dependency.getType(), dependency.getClassifier());\n    }\n\n    private String getId(String groupId, String artifactId, String type, String classifier) {\n        return groupId + \":\" + artifactId + \":\" + type + \":\" + ((classifier != null) ? classifier : \"\");\n    }\n\n    public boolean updateExcludesInDeps(\n            MavenProject project, List<Dependency> dependencies, List<Dependency> transitiveDeps)\n            throws DependencyCollectionException {\n        CollectRequest collectRequest = new CollectRequest();\n        collectRequest.setRootArtifact(RepositoryUtils.toArtifact(project.getArtifact()));\n        collectRequest.setRepositories(project.getRemoteProjectRepositories());\n        collectRequest.setDependencies(project.getDependencies().stream()\n                .map(d -> RepositoryUtils.toDependency(\n                        d, session.getRepositorySession().getArtifactTypeRegistry()))\n                .collect(Collectors.toList()));\n        if (project.getDependencyManagement() != null) {\n            collectRequest.setManagedDependencies(project.getDependencyManagement().getDependencies().stream()\n                    .map(d -> RepositoryUtils.toDependency(\n                            d, session.getRepositorySession().getArtifactTypeRegistry()))\n                    .collect(Collectors.toList()));\n        }\n        CollectResult result = repositorySystem.collectDependencies(session.getRepositorySession(), collectRequest);\n        boolean modified = false;\n        if (result.getRoot() != null) {\n            for (DependencyNode n2 : result.getRoot().getChildren()) {\n                String artifactId2 = getId(RepositoryUtils.toArtifact(n2.getArtifact()));\n\n                for (DependencyNode n3 : n2.getChildren()) {\n                    // stupid m-a Artifact that has no idea what it is: dependency or artifact?\n                    Artifact artifact3 = RepositoryUtils.toArtifact(n3.getArtifact());\n                    artifact3.setScope(n3.getDependency().getScope());\n                    String artifactId3 = getId(artifact3);\n\n                    // check if it really isn't in the list of original dependencies. Maven\n                    // prior to 2.0.8 may grab versions from transients instead of\n                    // from the direct deps in which case they would be marked included\n                    // instead of OMITTED_FOR_DUPLICATE\n\n                    // also, if not promoting the transitives, level 2's would be included\n                    boolean found = false;\n                    for (Dependency dep : transitiveDeps) {\n                        if (getId(dep).equals(artifactId3)) {\n                            found = true;\n                            break;\n                        }\n                    }\n\n                    // MSHADE-311: do not add exclusion for provided transitive dep\n                    //       note: MSHADE-31 introduced the exclusion logic for promoteTransitiveDependencies=true,\n                    //             but as of 3.2.1 promoteTransitiveDependencies has no effect for provided deps,\n                    //             which makes this fix even possible (see also MSHADE-181)\n                    if (!found && !\"provided\".equals(artifact3.getScope())) {\n                        getLog().debug(String.format(\n                                \"dependency %s (scope %s) not found in transitive dependencies\",\n                                artifactId3, artifact3.getScope()));\n                        for (Dependency dep : dependencies) {\n                            if (getId(dep).equals(artifactId2)) {\n                                // MSHADE-413: First check whether the exclusion has already been added,\n                                // because it's meaningless to add it more than once. Certain cases\n                                // can end up adding the exclusion \"forever\" and cause an endless loop\n                                // rewriting the whole dependency-reduced-pom.xml file.\n                                if (!dependencyHasExclusion(dep, artifact3)) {\n                                    getLog().debug(String.format(\n                                            \"Adding exclusion for dependency %s (scope %s) \" + \"to %s (scope %s)\",\n                                            artifactId3, artifact3.getScope(), getId(dep), dep.getScope()));\n                                    Exclusion exclusion = new Exclusion();\n                                    exclusion.setArtifactId(artifact3.getArtifactId());\n                                    exclusion.setGroupId(artifact3.getGroupId());\n                                    dep.addExclusion(exclusion);\n                                    modified = true;\n                                    break;\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        return modified;\n    }\n\n    private boolean dependencyHasExclusion(Dependency dep, Artifact exclusionToCheck) {\n        boolean containsExclusion = false;\n        for (Exclusion existingExclusion : dep.getExclusions()) {\n            if (existingExclusion.getGroupId().equals(exclusionToCheck.getGroupId())\n                    && existingExclusion.getArtifactId().equals(exclusionToCheck.getArtifactId())) {\n                containsExclusion = true;\n                break;\n            }\n        }\n        return containsExclusion;\n    }\n\n    private List<ResourceTransformer> toResourceTransformers(\n            String shade, List<ResourceTransformer> resourceTransformers) {\n        List<ResourceTransformer> forShade = new ArrayList<>();\n        ManifestResourceTransformer lastMt = null;\n        for (ResourceTransformer transformer : resourceTransformers) {\n            if (!(transformer instanceof ManifestResourceTransformer)) {\n                forShade.add(transformer);\n            } else if (((ManifestResourceTransformer) transformer).isForShade(shade)) {\n                final ManifestResourceTransformer mt = (ManifestResourceTransformer) transformer;\n                if (mt.isUsedForDefaultShading() && lastMt != null && !lastMt.isUsedForDefaultShading()) {\n                    continue; // skip, we already have a specific transformer\n                }\n                if (!mt.isUsedForDefaultShading() && lastMt != null && lastMt.isUsedForDefaultShading()) {\n                    forShade.remove(lastMt);\n                } else if (!mt.isUsedForDefaultShading() && lastMt != null) {\n                    getLog().warn(\"Ambiguous manifest transformer definition for '\" + shade + \"': \" + mt + \" / \"\n                            + lastMt);\n                }\n                if (lastMt == null || !mt.isUsedForDefaultShading()) {\n                    lastMt = mt;\n                }\n                forShade.add(transformer);\n            }\n        }\n        return forShade;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/pom/Counter.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.pom;\n\n/**\n * Separate class for counter.\n */\npublic class Counter {\n\n    // --------------------------/\n    // - Class/Member Variables -/\n    // --------------------------/\n\n    /**\n     * Field currentIndex\n     */\n    private int currentIndex = 0;\n\n    /**\n     * Field level\n     */\n    private int level;\n\n    // ----------------/\n    // - Constructors -/\n    // ----------------/\n\n    public Counter(int depthLevel) {\n        level = depthLevel;\n    } // -- org.apache.maven.model.io.jdom.Counter(int)\n\n    // -----------/\n    // - Methods -/\n    // -----------/\n\n    /**\n     * Method getCurrentIndex\n     */\n    public int getCurrentIndex() {\n        return currentIndex;\n    } // -- int getCurrentIndex()\n\n    /**\n     * Method getDepth\n     * @return {@link #level}\n     */\n    public int getDepth() {\n        return level;\n    } // -- int getDepth()\n\n    /**\n     * Method increaseCount\n     */\n    public void increaseCount() {\n        currentIndex = currentIndex + 1;\n    } // -- void increaseCount()\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.pom;\n\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.io.OutputStreamWriter;\nimport java.io.Writer;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\n\nimport org.apache.maven.model.ActivationFile;\nimport org.apache.maven.model.ActivationOS;\nimport org.apache.maven.model.ActivationProperty;\nimport org.apache.maven.model.Build;\nimport org.apache.maven.model.BuildBase;\nimport org.apache.maven.model.CiManagement;\nimport org.apache.maven.model.ConfigurationContainer;\nimport org.apache.maven.model.Contributor;\nimport org.apache.maven.model.Dependency;\nimport org.apache.maven.model.DependencyManagement;\nimport org.apache.maven.model.DeploymentRepository;\nimport org.apache.maven.model.Developer;\nimport org.apache.maven.model.DistributionManagement;\nimport org.apache.maven.model.Exclusion;\nimport org.apache.maven.model.Extension;\nimport org.apache.maven.model.FileSet;\nimport org.apache.maven.model.IssueManagement;\nimport org.apache.maven.model.License;\nimport org.apache.maven.model.MailingList;\nimport org.apache.maven.model.Model;\nimport org.apache.maven.model.ModelBase;\nimport org.apache.maven.model.Notifier;\nimport org.apache.maven.model.Organization;\nimport org.apache.maven.model.Parent;\nimport org.apache.maven.model.PatternSet;\nimport org.apache.maven.model.Plugin;\nimport org.apache.maven.model.PluginConfiguration;\nimport org.apache.maven.model.PluginContainer;\nimport org.apache.maven.model.PluginExecution;\nimport org.apache.maven.model.PluginManagement;\nimport org.apache.maven.model.Prerequisites;\nimport org.apache.maven.model.Profile;\nimport org.apache.maven.model.Relocation;\nimport org.apache.maven.model.ReportPlugin;\nimport org.apache.maven.model.ReportSet;\nimport org.apache.maven.model.Reporting;\nimport org.apache.maven.model.Repository;\nimport org.apache.maven.model.RepositoryBase;\nimport org.apache.maven.model.RepositoryPolicy;\nimport org.apache.maven.model.Resource;\nimport org.apache.maven.model.Scm;\nimport org.apache.maven.model.Site;\nimport org.codehaus.plexus.util.xml.Xpp3Dom;\nimport org.jdom2.Content;\nimport org.jdom2.DefaultJDOMFactory;\nimport org.jdom2.Document;\nimport org.jdom2.Element;\nimport org.jdom2.Text;\nimport org.jdom2.output.Format;\nimport org.jdom2.output.XMLOutputter;\n\n/**\n * Class MavenJDOMWriter.\n *\n */\npublic class MavenJDOMWriter {\n    /**\n     * Field factory\n     */\n    private final DefaultJDOMFactory factory;\n\n    /**\n     * Field lineSeparator\n     */\n    private final String lineSeparator;\n\n    public MavenJDOMWriter() {\n        this(\"\\n\");\n    }\n\n    public MavenJDOMWriter(final String lineSeparator) {\n        this.factory = new DefaultJDOMFactory();\n        this.lineSeparator = Objects.requireNonNull(lineSeparator);\n    }\n\n    /**\n     * Method findAndReplaceProperties\n     *\n     * @param counter {@link Counter}\n     * @param props {@link Map}\n     * @param name The name.\n     * @param parent {@link Element}\n     * @return {@link Element}\n     */\n    protected Element findAndReplaceProperties(Counter counter, Element parent, String name, Map props) {\n        Map<String, String> properties = props;\n        boolean shouldExist = properties != null && !properties.isEmpty();\n        Element element = updateElement(counter, parent, name, shouldExist);\n        if (shouldExist) {\n            Counter innerCounter = new Counter(counter.getDepth() + 1);\n            for (Map.Entry<String, String> entry : properties.entrySet()) {\n                String key = entry.getKey();\n                findAndReplaceSimpleElement(innerCounter, element, key, entry.getValue(), null);\n            }\n            List<String> lst = new ArrayList<>(properties.keySet());\n            Iterator<Element> it = element.getChildren().iterator();\n            while (it.hasNext()) {\n                Element elem = it.next();\n                String key = elem.getName();\n                if (!lst.contains(key)) {\n                    it.remove();\n                }\n            }\n        }\n        return element;\n    }\n\n    /**\n     * Method findAndReplaceSimpleElement\n     *\n     * @param counter {@link Counter}\n     * @param defaultValue The default value.\n     * @param text The text.\n     * @param name The name.\n     * @param parent The parent.\n     * @return {@link Element}\n     */\n    protected Element findAndReplaceSimpleElement(\n            Counter counter, Element parent, String name, String text, String defaultValue) {\n        if (defaultValue != null && text != null && defaultValue.equals(text)) {\n            Element element = parent.getChild(name, parent.getNamespace());\n            // if exist and is default value or if doesn't exist.. just keep the way it is..\n            if (element == null || defaultValue.equals(element.getText())) {\n                return element;\n            }\n        }\n        boolean shouldExist = text != null && text.trim().length() > 0;\n        Element element = updateElement(counter, parent, name, shouldExist);\n        if (shouldExist) {\n            element.setText(text);\n        }\n        return element;\n    }\n\n    /**\n     * Method findAndReplaceSimpleLists\n     *\n     * @param counter {@link Counter}\n     * @param childName The childName\n     * @param parentName The parentName\n     * @param list The list of elements.\n     * @param parent The parent.\n     * @return {@link Element}\n     */\n    protected Element findAndReplaceSimpleLists(\n            Counter counter, Element parent, Collection<String> list, String parentName, String childName) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentName, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childName, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (String value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childName, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                el.setText(value);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n        return element;\n    }\n\n    /**\n     * Method findAndReplaceXpp3DOM\n     *\n     * @param counter {@link Counter}\n     * @param dom {@link Xpp3Dom}\n     * @param name The name.\n     * @param parent The parent.\n     * @return {@link Element}\n     */\n    protected Element findAndReplaceXpp3DOM(Counter counter, Element parent, String name, Xpp3Dom dom) {\n        boolean shouldExist = dom != null && (dom.getChildCount() > 0 || dom.getValue() != null);\n        Element element = updateElement(counter, parent, name, shouldExist);\n        if (shouldExist) {\n            replaceXpp3DOM(element, dom, new Counter(counter.getDepth() + 1));\n        }\n        return element;\n    }\n\n    /**\n     * Method insertAtPreferredLocation\n     *\n     * @param parent The parent.\n     * @param counter {@link Counter}\n     * @param child {@link Element}\n     */\n    protected void insertAtPreferredLocation(Element parent, Element child, Counter counter) {\n        int contentIndex = 0;\n        int elementCounter = 0;\n        Iterator<Content> it = parent.getContent().iterator();\n        Text lastText = null;\n        int offset = 0;\n        while (it.hasNext() && elementCounter <= counter.getCurrentIndex()) {\n            Object next = it.next();\n            offset = offset + 1;\n            if (next instanceof Element) {\n                elementCounter = elementCounter + 1;\n                contentIndex = contentIndex + offset;\n                offset = 0;\n            }\n            if (next instanceof Text && it.hasNext()) {\n                lastText = (Text) next;\n            }\n        }\n        if (lastText != null && lastText.getTextTrim().length() == 0) {\n            lastText = lastText.clone();\n        } else {\n            StringBuilder starter = new StringBuilder(lineSeparator);\n            for (int i = 0; i < counter.getDepth(); i++) {\n                starter.append(\"    \"); // TODO make settable?\n            }\n            lastText = factory.text(starter.toString());\n        }\n        if (parent.getContentSize() == 0) {\n            Text finalText = lastText.clone();\n            finalText.setText(\n                    finalText.getText().substring(0, finalText.getText().length() - \"    \".length()));\n            parent.addContent(contentIndex, finalText);\n        }\n        parent.addContent(contentIndex, child);\n        parent.addContent(contentIndex, lastText);\n    }\n\n    /**\n     * Method iterateContributor\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateContributor(\n            Counter counter, Element parent, Collection<Contributor> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Contributor value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateContributor(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateDependency\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateDependency(\n            Counter counter, Element parent, Collection<Dependency> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Dependency value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateDependency(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateDeveloper\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateDeveloper(\n            Counter counter, Element parent, Collection<Developer> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Developer value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateDeveloper(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateExclusion\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateExclusion(\n            Counter counter, Element parent, Collection<Exclusion> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Exclusion value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateExclusion(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateExtension\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateExtension(\n            Counter counter, Element parent, Collection<Extension> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Extension value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateExtension(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateLicense\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateLicense(\n            Counter counter, Element parent, Collection<License> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (License value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateLicense(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateMailingList\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateMailingList(\n            Counter counter, Element parent, Collection<MailingList> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (MailingList value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateMailingList(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateNotifier\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateNotifier(\n            Counter counter, Element parent, Collection<Notifier> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Notifier value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateNotifier(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iteratePlugin\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iteratePlugin(\n            Counter counter, Element parent, Collection<Plugin> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Plugin value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updatePlugin(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iteratePluginExecution\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iteratePluginExecution(\n            Counter counter, Element parent, Collection<PluginExecution> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (PluginExecution value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updatePluginExecution(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateProfile\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateProfile(\n            Counter counter, Element parent, Collection<Profile> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Profile value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateProfile(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateReportPlugin\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateReportPlugin(\n            Counter counter, Element parent, Collection<ReportPlugin> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (ReportPlugin value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateReportPlugin(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateReportSet\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateReportSet(\n            Counter counter, Element parent, Collection<ReportSet> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (ReportSet value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateReportSet(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateRepository\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateRepository(\n            Counter counter, Element parent, Collection<Repository> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Repository value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateRepository(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method iterateResource\n     *\n     * @param counter {@link Counter}\n     * @param childTag The childTag\n     * @param parentTag The parentTag\n     * @param list The list of elements.\n     * @param parent The parent.\n     */\n    protected void iterateResource(\n            Counter counter, Element parent, Collection<Resource> list, String parentTag, String childTag) {\n        boolean shouldExist = list != null && list.size() > 0;\n        Element element = updateElement(counter, parent, parentTag, shouldExist);\n        if (shouldExist) {\n            Iterator<Element> elIt =\n                    element.getChildren(childTag, element.getNamespace()).iterator();\n            if (!elIt.hasNext()) {\n                elIt = null;\n            }\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            for (Resource value : list) {\n                Element el;\n                if (elIt != null && elIt.hasNext()) {\n                    el = elIt.next();\n                    if (!elIt.hasNext()) {\n                        elIt = null;\n                    }\n                } else {\n                    el = factory.element(childTag, element.getNamespace());\n                    insertAtPreferredLocation(element, el, innerCount);\n                }\n                updateResource(value, childTag, innerCount, el);\n                innerCount.increaseCount();\n            }\n            if (elIt != null) {\n                while (elIt.hasNext()) {\n                    elIt.next();\n                    elIt.remove();\n                }\n            }\n        }\n    }\n\n    /**\n     * Method replaceXpp3DOM\n     *\n     * @param parent The parent.\n     * @param counter {@link Counter}\n     * @param parentDom {@link Element}\n     */\n    protected void replaceXpp3DOM(Element parent, Xpp3Dom parentDom, Counter counter) {\n        if (parentDom.getChildCount() > 0) {\n            Xpp3Dom[] childs = parentDom.getChildren();\n            Collection<Xpp3Dom> domChilds = new ArrayList<>();\n            Collections.addAll(domChilds, childs);\n            // int domIndex = 0;\n            for (Element elem : parent.getChildren()) {\n                Xpp3Dom corrDom = null;\n                for (Xpp3Dom dm : domChilds) {\n                    if (dm.getName().equals(elem.getName())) {\n                        corrDom = dm;\n                        break;\n                    }\n                }\n                if (corrDom != null) {\n                    domChilds.remove(corrDom);\n                    replaceXpp3DOM(elem, corrDom, new Counter(counter.getDepth() + 1));\n                    counter.increaseCount();\n                } else {\n                    parent.removeContent(elem);\n                }\n            }\n            for (Xpp3Dom dm : domChilds) {\n                Element elem = factory.element(dm.getName(), parent.getNamespace());\n                insertAtPreferredLocation(parent, elem, counter);\n                counter.increaseCount();\n                replaceXpp3DOM(elem, dm, new Counter(counter.getDepth() + 1));\n            }\n        } else if (parentDom.getValue() != null) {\n            parent.setText(parentDom.getValue());\n        }\n    }\n\n    /**\n     * Method updateActivationFile\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateActivationFile(ActivationFile value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"missing\", value.getMissing(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"exists\", value.getExists(), null);\n        }\n    }\n\n    /**\n     * Method updateActivationOS\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateActivationOS(ActivationOS value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"family\", value.getFamily(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"arch\", value.getArch(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"version\", value.getVersion(), null);\n        }\n    }\n\n    /**\n     * Method updateActivationProperty\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateActivationProperty(ActivationProperty value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"value\", value.getValue(), null);\n        }\n    }\n\n    /**\n     * Method updateBuild\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    // CHECKSTYLE_OFF: LineLength\n    protected void updateBuild(Build value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"sourceDirectory\", value.getSourceDirectory(), null);\n            findAndReplaceSimpleElement(\n                    innerCount, root, \"scriptSourceDirectory\", value.getScriptSourceDirectory(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"testSourceDirectory\", value.getTestSourceDirectory(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"outputDirectory\", value.getOutputDirectory(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"testOutputDirectory\", value.getTestOutputDirectory(), null);\n            iterateExtension(innerCount, root, value.getExtensions(), \"extensions\", \"extension\");\n            findAndReplaceSimpleElement(innerCount, root, \"defaultGoal\", value.getDefaultGoal(), null);\n            iterateResource(innerCount, root, value.getResources(), \"resources\", \"resource\");\n            iterateResource(innerCount, root, value.getTestResources(), \"testResources\", \"testResource\");\n            findAndReplaceSimpleElement(innerCount, root, \"directory\", value.getDirectory(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"finalName\", value.getFinalName(), null);\n            findAndReplaceSimpleLists(innerCount, root, value.getFilters(), \"filters\", \"filter\");\n            updatePluginManagement(value.getPluginManagement(), \"pluginManagement\", innerCount, root);\n            iteratePlugin(innerCount, root, value.getPlugins(), \"plugins\", \"plugin\");\n        }\n    }\n    // CHECKSTYLE_ON: LineLength\n\n    /**\n     * Method updateBuildBase\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateBuildBase(BuildBase value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"defaultGoal\", value.getDefaultGoal(), null);\n            iterateResource(innerCount, root, value.getResources(), \"resources\", \"resource\");\n            iterateResource(innerCount, root, value.getTestResources(), \"testResources\", \"testResource\");\n            findAndReplaceSimpleElement(innerCount, root, \"directory\", value.getDirectory(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"finalName\", value.getFinalName(), null);\n            findAndReplaceSimpleLists(innerCount, root, value.getFilters(), \"filters\", \"filter\");\n            updatePluginManagement(value.getPluginManagement(), \"pluginManagement\", innerCount, root);\n            iteratePlugin(innerCount, root, value.getPlugins(), \"plugins\", \"plugin\");\n        }\n    }\n\n    /**\n     * Method updateCiManagement\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateCiManagement(CiManagement value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"system\", value.getSystem(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n            iterateNotifier(innerCount, root, value.getNotifiers(), \"notifiers\", \"notifier\");\n        }\n    }\n\n    /**\n     * Method updateConfigurationContainer\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateConfigurationContainer(\n            ConfigurationContainer value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"inherited\", value.getInherited(), null);\n            findAndReplaceXpp3DOM(innerCount, root, \"configuration\", (Xpp3Dom) value.getConfiguration());\n        }\n    }\n\n    /**\n     * Method updateContributor\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateContributor(Contributor value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"email\", value.getEmail(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"organization\", value.getOrganization(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"organizationUrl\", value.getOrganizationUrl(), null);\n        findAndReplaceSimpleLists(innerCount, root, value.getRoles(), \"roles\", \"role\");\n        findAndReplaceSimpleElement(innerCount, root, \"timezone\", value.getTimezone(), null);\n        findAndReplaceProperties(innerCount, root, \"properties\", value.getProperties());\n    }\n\n    /**\n     * Method updateDependency\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateDependency(Dependency value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"groupId\", value.getGroupId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"artifactId\", value.getArtifactId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"version\", value.getVersion(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"type\", value.getType(), \"jar\");\n        findAndReplaceSimpleElement(innerCount, root, \"classifier\", value.getClassifier(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"scope\", value.getScope(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"systemPath\", value.getSystemPath(), null);\n        iterateExclusion(innerCount, root, value.getExclusions(), \"exclusions\", \"exclusion\");\n        findAndReplaceSimpleElement(\n                innerCount, root, \"optional\", !value.isOptional() ? null : String.valueOf(value.isOptional()), \"false\");\n    }\n\n    /**\n     * Method updateDependencyManagement\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateDependencyManagement(\n            DependencyManagement value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            iterateDependency(innerCount, root, value.getDependencies(), \"dependencies\", \"dependency\");\n        }\n    }\n\n    /**\n     * Method updateDeploymentRepository\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateDeploymentRepository(\n            DeploymentRepository value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(\n                    innerCount,\n                    root,\n                    \"uniqueVersion\",\n                    value.isUniqueVersion() ? null : String.valueOf(value.isUniqueVersion()),\n                    \"true\");\n            findAndReplaceSimpleElement(innerCount, root, \"id\", value.getId(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"layout\", value.getLayout(), \"default\");\n        }\n    }\n\n    /**\n     * Method updateDeveloper\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateDeveloper(Developer value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"id\", value.getId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"email\", value.getEmail(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"organization\", value.getOrganization(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"organizationUrl\", value.getOrganizationUrl(), null);\n        findAndReplaceSimpleLists(innerCount, root, value.getRoles(), \"roles\", \"role\");\n        findAndReplaceSimpleElement(innerCount, root, \"timezone\", value.getTimezone(), null);\n        findAndReplaceProperties(innerCount, root, \"properties\", value.getProperties());\n    }\n\n    /**\n     * Method updateDistributionManagement\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateDistributionManagement(\n            DistributionManagement value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            updateDeploymentRepository(value.getRepository(), \"repository\", innerCount, root);\n            updateDeploymentRepository(value.getSnapshotRepository(), \"snapshotRepository\", innerCount, root);\n            updateSite(value.getSite(), \"site\", innerCount, root);\n            findAndReplaceSimpleElement(innerCount, root, \"downloadUrl\", value.getDownloadUrl(), null);\n            updateRelocation(value.getRelocation(), \"relocation\", innerCount, root);\n            findAndReplaceSimpleElement(innerCount, root, \"status\", value.getStatus(), null);\n        }\n    }\n\n    /**\n     * Method updateElement\n     *\n     * @param counter {@link Counter}\n     * @param shouldExist should exist.\n     * @param name The name.\n     * @param parent The parent.\n     * @return {@link Element}\n     */\n    protected Element updateElement(Counter counter, Element parent, String name, boolean shouldExist) {\n        Element element = parent.getChild(name, parent.getNamespace());\n        if (element != null && shouldExist) {\n            counter.increaseCount();\n        }\n        if (element == null && shouldExist) {\n            element = factory.element(name, parent.getNamespace());\n            insertAtPreferredLocation(parent, element, counter);\n            counter.increaseCount();\n        }\n        if (!shouldExist && element != null) {\n            int index = parent.indexOf(element);\n            if (index > 0) {\n                Content previous = parent.getContent(index - 1);\n                if (previous instanceof Text) {\n                    Text txt = (Text) previous;\n                    if (txt.getTextTrim().length() == 0) {\n                        parent.removeContent(txt);\n                    }\n                }\n            }\n            parent.removeContent(element);\n        }\n        return element;\n    }\n\n    /**\n     * Method updateExclusion\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateExclusion(Exclusion value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"artifactId\", value.getArtifactId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"groupId\", value.getGroupId(), null);\n    }\n\n    /**\n     * Method updateExtension\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateExtension(Extension value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"groupId\", value.getGroupId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"artifactId\", value.getArtifactId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"version\", value.getVersion(), null);\n    }\n\n    /**\n     * Method updateFileSet\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateFileSet(FileSet value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"directory\", value.getDirectory(), null);\n            findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), \"includes\", \"include\");\n            findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), \"excludes\", \"exclude\");\n        }\n    }\n\n    /**\n     * Method updateIssueManagement\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateIssueManagement(IssueManagement value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"system\", value.getSystem(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n        }\n    }\n\n    /**\n     * Method updateLicense\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateLicense(License value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"distribution\", value.getDistribution(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"comments\", value.getComments(), null);\n    }\n\n    /**\n     * Method updateMailingList\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateMailingList(MailingList value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"subscribe\", value.getSubscribe(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"unsubscribe\", value.getUnsubscribe(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"post\", value.getPost(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"archive\", value.getArchive(), null);\n        findAndReplaceSimpleLists(innerCount, root, value.getOtherArchives(), \"otherArchives\", \"otherArchive\");\n    }\n\n    /**\n     * Method updateModel\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateModel(Model value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        updateParent(value.getParent(), \"parent\", innerCount, root);\n        findAndReplaceSimpleElement(innerCount, root, \"modelVersion\", value.getModelVersion(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"groupId\", value.getGroupId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"artifactId\", value.getArtifactId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"packaging\", value.getPackaging(), \"jar\");\n        findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"version\", value.getVersion(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"description\", value.getDescription(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n        updatePrerequisites(value.getPrerequisites(), \"prerequisites\", innerCount, root);\n        updateIssueManagement(value.getIssueManagement(), \"issueManagement\", innerCount, root);\n        updateCiManagement(value.getCiManagement(), \"ciManagement\", innerCount, root);\n        findAndReplaceSimpleElement(innerCount, root, \"inceptionYear\", value.getInceptionYear(), null);\n        iterateMailingList(innerCount, root, value.getMailingLists(), \"mailingLists\", \"mailingList\");\n        iterateDeveloper(innerCount, root, value.getDevelopers(), \"developers\", \"developer\");\n        iterateContributor(innerCount, root, value.getContributors(), \"contributors\", \"contributor\");\n        iterateLicense(innerCount, root, value.getLicenses(), \"licenses\", \"license\");\n        updateScm(value.getScm(), \"scm\", innerCount, root);\n        updateOrganization(value.getOrganization(), \"organization\", innerCount, root);\n        updateBuild(value.getBuild(), \"build\", innerCount, root);\n        iterateProfile(innerCount, root, value.getProfiles(), \"profiles\", \"profile\");\n        findAndReplaceSimpleLists(innerCount, root, value.getModules(), \"modules\", \"module\");\n        iterateRepository(innerCount, root, value.getRepositories(), \"repositories\", \"repository\");\n        iterateRepository(innerCount, root, value.getPluginRepositories(), \"pluginRepositories\", \"pluginRepository\");\n        iterateDependency(innerCount, root, value.getDependencies(), \"dependencies\", \"dependency\");\n        updateReporting(value.getReporting(), \"reporting\", innerCount, root);\n        updateDependencyManagement(value.getDependencyManagement(), \"dependencyManagement\", innerCount, root);\n        updateDistributionManagement(value.getDistributionManagement(), \"distributionManagement\", innerCount, root);\n        findAndReplaceProperties(innerCount, root, \"properties\", value.getProperties());\n    }\n\n    /**\n     * Method updateModelBase\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    // CHECKSTYLE_OFF: LineLength\n    protected void updateModelBase(ModelBase value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleLists(innerCount, root, value.getModules(), \"modules\", \"module\");\n            iterateRepository(innerCount, root, value.getRepositories(), \"repositories\", \"repository\");\n            iterateRepository(\n                    innerCount, root, value.getPluginRepositories(), \"pluginRepositories\", \"pluginRepository\");\n            iterateDependency(innerCount, root, value.getDependencies(), \"dependencies\", \"dependency\");\n            updateReporting(value.getReporting(), \"reporting\", innerCount, root);\n            updateDependencyManagement(value.getDependencyManagement(), \"dependencyManagement\", innerCount, root);\n            updateDistributionManagement(value.getDistributionManagement(), \"distributionManagement\", innerCount, root);\n            findAndReplaceProperties(innerCount, root, \"properties\", value.getProperties());\n        }\n    }\n    // CHECKSTYLE_ON: LineLength\n\n    /**\n     * Method updateNotifier\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    // CHECKSTYLE_OFF: LineLength\n    protected void updateNotifier(Notifier value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"type\", value.getType(), \"mail\");\n        findAndReplaceSimpleElement(\n                innerCount,\n                root,\n                \"sendOnError\",\n                value.isSendOnError() ? null : String.valueOf(value.isSendOnError()),\n                \"true\");\n        findAndReplaceSimpleElement(\n                innerCount,\n                root,\n                \"sendOnFailure\",\n                value.isSendOnFailure() ? null : String.valueOf(value.isSendOnFailure()),\n                \"true\");\n        findAndReplaceSimpleElement(\n                innerCount,\n                root,\n                \"sendOnSuccess\",\n                value.isSendOnSuccess() ? null : String.valueOf(value.isSendOnSuccess()),\n                \"true\");\n        findAndReplaceSimpleElement(\n                innerCount,\n                root,\n                \"sendOnWarning\",\n                value.isSendOnWarning() ? null : String.valueOf(value.isSendOnWarning()),\n                \"true\");\n        findAndReplaceSimpleElement(innerCount, root, \"address\", value.getAddress(), null);\n        findAndReplaceProperties(innerCount, root, \"configuration\", value.getConfiguration());\n    }\n    // CHECKSTYLE_ON: LineLength\n\n    /**\n     * Method updateOrganization\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateOrganization(Organization value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n        }\n    }\n\n    /**\n     * Method updateParent\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateParent(Parent value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"artifactId\", value.getArtifactId(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"groupId\", value.getGroupId(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"version\", value.getVersion(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"relativePath\", value.getRelativePath(), \"../pom.xml\");\n        }\n    }\n\n    /**\n     * Method updatePatternSet\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updatePatternSet(PatternSet value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), \"includes\", \"include\");\n            findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), \"excludes\", \"exclude\");\n        }\n    }\n\n    /**\n     * Method updatePlugin\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updatePlugin(Plugin value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"groupId\", value.getGroupId(), \"org.apache.maven.plugins\");\n        findAndReplaceSimpleElement(innerCount, root, \"artifactId\", value.getArtifactId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"version\", value.getVersion(), null);\n        findAndReplaceSimpleElement(\n                innerCount,\n                root,\n                \"extensions\",\n                !value.isExtensions() ? null : String.valueOf(value.isExtensions()),\n                \"false\");\n        iteratePluginExecution(innerCount, root, value.getExecutions(), \"executions\", \"execution\");\n        iterateDependency(innerCount, root, value.getDependencies(), \"dependencies\", \"dependency\");\n        findAndReplaceSimpleElement(innerCount, root, \"inherited\", value.getInherited(), null);\n        findAndReplaceXpp3DOM(innerCount, root, \"configuration\", (Xpp3Dom) value.getConfiguration());\n    }\n\n    /**\n     * Method updatePluginConfiguration\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    // CHECKSTYLE_OFF: LineLength\n    protected void updatePluginConfiguration(\n            PluginConfiguration value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            updatePluginManagement(value.getPluginManagement(), \"pluginManagement\", innerCount, root);\n            iteratePlugin(innerCount, root, value.getPlugins(), \"plugins\", \"plugin\");\n        }\n    }\n    // CHECKSTYLE_ON: LineLength\n\n    /**\n     * Method updatePluginContainer\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updatePluginContainer(PluginContainer value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            iteratePlugin(innerCount, root, value.getPlugins(), \"plugins\", \"plugin\");\n        }\n    }\n\n    /**\n     * Method updatePluginExecution\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updatePluginExecution(PluginExecution value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"id\", value.getId(), \"default\");\n        findAndReplaceSimpleElement(innerCount, root, \"phase\", value.getPhase(), null);\n        findAndReplaceSimpleLists(innerCount, root, value.getGoals(), \"goals\", \"goal\");\n        findAndReplaceSimpleElement(innerCount, root, \"inherited\", value.getInherited(), null);\n        findAndReplaceXpp3DOM(innerCount, root, \"configuration\", (Xpp3Dom) value.getConfiguration());\n    }\n\n    /**\n     * Method updatePluginManagement\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updatePluginManagement(PluginManagement value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            iteratePlugin(innerCount, root, value.getPlugins(), \"plugins\", \"plugin\");\n        }\n    }\n\n    /**\n     * Method updatePrerequisites\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updatePrerequisites(Prerequisites value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"maven\", value.getMaven(), \"2.0\");\n        }\n    }\n\n    /**\n     * Method updateProfile\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateProfile(Profile value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"id\", value.getId(), \"default\");\n        // updateActivation( value.getActivation(), \"activation\", innerCount, root);\n        updateBuildBase(value.getBuild(), \"build\", innerCount, root);\n        findAndReplaceSimpleLists(innerCount, root, value.getModules(), \"modules\", \"module\");\n        iterateRepository(innerCount, root, value.getRepositories(), \"repositories\", \"repository\");\n        iterateRepository(innerCount, root, value.getPluginRepositories(), \"pluginRepositories\", \"pluginRepository\");\n        iterateDependency(innerCount, root, value.getDependencies(), \"dependencies\", \"dependency\");\n        updateReporting(value.getReporting(), \"reporting\", innerCount, root);\n        updateDependencyManagement(value.getDependencyManagement(), \"dependencyManagement\", innerCount, root);\n        updateDistributionManagement(value.getDistributionManagement(), \"distributionManagement\", innerCount, root);\n        findAndReplaceProperties(innerCount, root, \"properties\", value.getProperties());\n    }\n\n    /**\n     * Method updateRelocation\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateRelocation(Relocation value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"groupId\", value.getGroupId(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"artifactId\", value.getArtifactId(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"version\", value.getVersion(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"message\", value.getMessage(), null);\n        }\n    }\n\n    /**\n     * Method updateReportPlugin\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateReportPlugin(ReportPlugin value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"groupId\", value.getGroupId(), \"org.apache.maven.plugins\");\n        findAndReplaceSimpleElement(innerCount, root, \"artifactId\", value.getArtifactId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"version\", value.getVersion(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"inherited\", value.getInherited(), null);\n        findAndReplaceXpp3DOM(innerCount, root, \"configuration\", (Xpp3Dom) value.getConfiguration());\n        iterateReportSet(innerCount, root, value.getReportSets(), \"reportSets\", \"reportSet\");\n    }\n\n    /**\n     * Method updateReportSet\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateReportSet(ReportSet value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"id\", value.getId(), \"default\");\n        findAndReplaceXpp3DOM(innerCount, root, \"configuration\", (Xpp3Dom) value.getConfiguration());\n        findAndReplaceSimpleElement(innerCount, root, \"inherited\", value.getInherited(), null);\n        findAndReplaceSimpleLists(innerCount, root, value.getReports(), \"reports\", \"report\");\n    }\n\n    /**\n     * Method updateReporting\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateReporting(Reporting value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(\n                    innerCount,\n                    root,\n                    \"excludeDefaults\",\n                    !value.isExcludeDefaults() ? null : String.valueOf(value.isExcludeDefaults()),\n                    \"false\");\n            findAndReplaceSimpleElement(innerCount, root, \"outputDirectory\", value.getOutputDirectory(), null);\n            iterateReportPlugin(innerCount, root, value.getPlugins(), \"plugins\", \"plugin\");\n        }\n    }\n\n    /**\n     * Method updateRepository\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateRepository(Repository value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        updateRepositoryPolicy(value.getReleases(), \"releases\", innerCount, root);\n        updateRepositoryPolicy(value.getSnapshots(), \"snapshots\", innerCount, root);\n        findAndReplaceSimpleElement(innerCount, root, \"id\", value.getId(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n        findAndReplaceSimpleElement(innerCount, root, \"layout\", value.getLayout(), \"default\");\n    }\n\n    /**\n     * Method updateRepositoryBase\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateRepositoryBase(RepositoryBase value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"id\", value.getId(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"layout\", value.getLayout(), \"default\");\n        }\n    }\n\n    /**\n     * Method updateRepositoryPolicy\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateRepositoryPolicy(RepositoryPolicy value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(\n                    innerCount, root, \"enabled\", value.isEnabled() ? null : String.valueOf(value.isEnabled()), \"true\");\n            findAndReplaceSimpleElement(innerCount, root, \"updatePolicy\", value.getUpdatePolicy(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"checksumPolicy\", value.getChecksumPolicy(), null);\n        }\n    }\n\n    /**\n     * Method updateResource\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateResource(Resource value, String xmlTag, Counter counter, Element element) {\n        Element root = element;\n        Counter innerCount = new Counter(counter.getDepth() + 1);\n        findAndReplaceSimpleElement(innerCount, root, \"targetPath\", value.getTargetPath(), null);\n        findAndReplaceSimpleElement(\n                innerCount,\n                root,\n                \"filtering\",\n                !value.isFiltering() ? null : String.valueOf(value.isFiltering()),\n                \"false\");\n        findAndReplaceSimpleElement(innerCount, root, \"directory\", value.getDirectory(), null);\n        findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), \"includes\", \"include\");\n        findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), \"excludes\", \"exclude\");\n    }\n\n    /**\n     * Method updateScm\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateScm(Scm value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            // CHECKSTYLE_OFF: LineLength\n\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"connection\", value.getConnection(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"developerConnection\", value.getDeveloperConnection(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"tag\", value.getTag(), \"HEAD\");\n            findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n\n            // CHECKSTYLE_ON: LineLength\n        }\n    }\n\n    /**\n     * Method updateSite\n     *\n     * @param value The value.\n     * @param element {@link Element}\n     * @param counter {@link Counter}\n     * @param xmlTag The XMLTag.\n     */\n    protected void updateSite(Site value, String xmlTag, Counter counter, Element element) {\n        boolean shouldExist = value != null;\n        Element root = updateElement(counter, element, xmlTag, shouldExist);\n        if (shouldExist) {\n            Counter innerCount = new Counter(counter.getDepth() + 1);\n            findAndReplaceSimpleElement(innerCount, root, \"id\", value.getId(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"name\", value.getName(), null);\n            findAndReplaceSimpleElement(innerCount, root, \"url\", value.getUrl(), null);\n        }\n    }\n\n    /**\n     * Method write\n     *\n     * @param project {@link Model}\n     * @param stream {@link OutputStream}\n     * @param document {@link Document}\n     * @deprecated\n     * @throws IOException in case of an error.\n     */\n    public void write(Model project, Document document, OutputStream stream) throws IOException {\n        updateModel(project, \"project\", new Counter(0), document.getRootElement());\n        XMLOutputter outputter = new XMLOutputter();\n        Format format = Format.getPrettyFormat();\n        format.setIndent(\"    \").setLineSeparator(lineSeparator);\n        outputter.setFormat(format);\n        outputter.output(document, stream);\n    }\n\n    /**\n     * Method write\n     *\n     * @param project {@link Model}\n     * @param writer {@link OutputStreamWriter}\n     * @param document {@link Document}\n     * @throws IOException in case of an error.\n     */\n    public void write(Model project, Document document, OutputStreamWriter writer) throws IOException {\n        Format format = Format.getRawFormat();\n        format.setEncoding(writer.getEncoding()).setLineSeparator(lineSeparator);\n        write(project, document, writer, format);\n    }\n\n    /**\n     * Method write\n     *\n     * @param project {@link Model}\n     * @param jdomFormat {@link Format}\n     * @param writer {@link Writer}\n     * @param document {@link Document}\n     * @throws IOException in case of an error.\n     */\n    public void write(Model project, Document document, Writer writer, Format jdomFormat) throws IOException {\n        updateModel(project, \"project\", new Counter(0), document.getRootElement());\n        XMLOutputter outputter = new XMLOutputter();\n        outputter.setFormat(jdomFormat);\n        outputter.output(document, writer);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/pom/PomWriter.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.pom;\n\nimport java.io.IOException;\nimport java.io.Writer;\n\nimport org.apache.maven.model.Model;\nimport org.jdom2.Document;\nimport org.jdom2.Element;\nimport org.jdom2.Namespace;\nimport org.jdom2.output.Format;\n\n/**\n * @author Jason van Zyl\n */\npublic class PomWriter {\n    public static void write(Writer w, Model newModel) throws IOException {\n        write(w, newModel, false);\n    }\n\n    public static void write(Writer w, Model newModel, boolean namespaceDeclaration) throws IOException {\n        Element root = new Element(\"project\");\n\n        if (namespaceDeclaration) {\n            String modelVersion = newModel.getModelVersion();\n\n            Namespace pomNamespace = Namespace.getNamespace(\"\", \"http://maven.apache.org/POM/\" + modelVersion);\n\n            root.setNamespace(pomNamespace);\n\n            Namespace xsiNamespace = Namespace.getNamespace(\"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\");\n\n            root.addNamespaceDeclaration(xsiNamespace);\n\n            if (root.getAttribute(\"schemaLocation\", xsiNamespace) == null) {\n                root.setAttribute(\n                        \"schemaLocation\",\n                        \"http://maven.apache.org/POM/\" + modelVersion + \" http://maven.apache.org/maven-v\"\n                                + modelVersion.replace('.', '_') + \".xsd\",\n                        xsiNamespace);\n            }\n        }\n\n        Document doc = new Document(root);\n\n        MavenJDOMWriter writer = new MavenJDOMWriter();\n\n        String encoding = newModel.getModelEncoding() != null ? newModel.getModelEncoding() : \"UTF-8\";\n\n        Format format = Format.getPrettyFormat().setEncoding(encoding);\n\n        writer.write(newModel, doc, w, format);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/relocation/Relocator.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.relocation;\n\n/** @author Jason van Zyl */\npublic interface Relocator {\n    String ROLE = Relocator.class.getName();\n\n    boolean canRelocatePath(String clazz);\n\n    String relocatePath(String clazz);\n\n    boolean canRelocateClass(String clazz);\n\n    /**\n     * Replace the first class pattern match in the given string\n     * @see #relocateAllClasses(String)\n     */\n    String relocateClass(String input);\n\n    String applyToSourceContent(String sourceContent);\n\n    /**\n     * Replace all class pattern matches in the given input.\n     * @see #relocateClass(String)\n     */\n    String relocateAllClasses(String input);\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/relocation/SerializedLambdaRelocator.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.relocation;\n\nimport java.util.List;\nimport java.util.regex.Pattern;\n\n/** @author Kamil Wójcik */\npublic class SerializedLambdaRelocator extends SimpleRelocator {\n    private final Pattern serializedLambdaDefinitionPattern =\n            Pattern.compile(\"\\\\(([BCDFIJSZ]|\\\\[+[BCDFIJSZ]|\\\\[*L[^;]+;)*\\\\)([BCDFIJSZ]|V|\\\\[+[BCDFIJSZ]|\\\\[*L[^;]+;)\");\n    private final Pattern clazzInsideFunctionDefintionPattern;\n    private final String shadedPathPattern;\n    private boolean shouldRelocate = true;\n\n    public SerializedLambdaRelocator(\n            String pattern, String shadedPattern, List<String> includes, List<String> excludes, boolean rawString) {\n        super(pattern, shadedPattern, includes, excludes, rawString);\n        if (shadedPattern != null && pattern != null) {\n            this.shadedPathPattern = shadedPattern.replace('.', '/');\n            String pathPattern = pattern.replace('.', '/');\n            this.clazzInsideFunctionDefintionPattern = Pattern.compile(\"(?<=[(;)]L)\" + Pattern.quote(pathPattern));\n        } else {\n            this.clazzInsideFunctionDefintionPattern = null;\n            this.shadedPathPattern = null;\n            this.shouldRelocate = false;\n        }\n    }\n\n    @Override\n    public boolean canRelocatePath(String path) {\n        return shouldRelocate && serializedLambdaDefinitionPattern.matcher(path).matches();\n    }\n\n    @Override\n    public boolean canRelocateClass(String clazz) {\n        return false;\n    }\n\n    @Override\n    public String relocatePath(String path) {\n        return !shouldRelocate\n                ? path\n                : clazzInsideFunctionDefintionPattern.matcher(path).replaceAll(shadedPathPattern);\n    }\n\n    @Override\n    public String relocateClass(String input) {\n        return input;\n    }\n\n    @Override\n    public String relocateAllClasses(String input) {\n        return input;\n    }\n\n    @Override\n    public String applyToSourceContent(String sourceContent) {\n        return sourceContent;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.relocation;\n\nimport java.util.Collection;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\nimport org.codehaus.plexus.util.SelectorUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * @author Jason van Zyl\n * @author Mauro Talevi\n */\npublic class SimpleRelocator implements Relocator {\n    private static final Logger LOGGER = LoggerFactory.getLogger(SimpleRelocator.class);\n    /**\n     * Match dot, slash or space at end of string\n     */\n    private static final Pattern RX_ENDS_WITH_DOT_SLASH_SPACE = Pattern.compile(\"[./ ]$\");\n\n    /**\n     * Match <ul>\n     *     <li>certain Java keywords + space</li>\n     *     <li>beginning of Javadoc link + optional line breaks and continuations with '*'</li>\n     *     <li>(opening curly brace / opening parenthesis / comma / equals / semicolon) + space</li>\n     *     <li>(closing curly brace / closing multi-line comment) + space</li>\n     * </ul>\n     * at end of string\n     */\n    private static final Pattern RX_ENDS_WITH_JAVA_KEYWORD = Pattern.compile(\n            \"\\\\b(import|package|public|protected|private|static|final|synchronized|abstract|volatile|extends|implements|throws) $\"\n                    + \"|\"\n                    + \"\\\\{@link( \\\\*)* $\"\n                    + \"|\"\n                    + \"([{}(=;,]|\\\\*/) $\");\n\n    /** plain text, no wildcards, always refers to fully qualified package names, may be {@code null} when rawString is {@code true}. */\n    private final String originalPattern;\n\n    /** plain text, no wildcards, always refers to paths with \"/\" separator, never {@code null}. */\n    private final String originalPathPattern;\n\n    /**\n     * May be {@code null} when {@link #rawString} is true\n     */\n    private final Pattern regExPattern;\n\n    private final Pattern regExPathPattern;\n\n    /**\n     * Replacement (no wildcards) for {@link #originalPattern}, may be {@code null} when {@link #rawString} is true.\n     */\n    private final String shadedPattern;\n\n    /**\n     * Replacement (no wildcards) for {@link #originalPathPattern}.\n     */\n    private final String shadedPathPattern;\n\n    /**\n     * Patterns to include in relocation.\n     * Only Ant-based patterns (used with SelectorUtils.matchPath), must not start with \"%ant[\" prefix. Include both forms with dots and slashes, e.g. \"my/package/**\" and \"my/package/*\" for class patterns, \"my/path/**\" and \"my/path/*\" for path patterns.\n     */\n    private final Set<String> includes;\n\n    /**\n     * Patterns to exclude from relocation.\n     * Only Ant-based patterns (used with SelectorUtils.matchPath), must not start with \"%ant[\" prefix. Include both forms with dots and slashes, e.g. \"my/package/**\" and \"my/package/*\" for class patterns, \"my/path/**\" and \"my/path/*\" for path patterns.\n     */\n    private final Set<String> excludes;\n\n    // prefix (no wildcards), derived from excludes\n    private final Set<String> sourcePackageExcludes = new LinkedHashSet<>();\n\n    // prefix (no wildcards), derived from excludes\n    private final Set<String> sourcePathExcludes = new LinkedHashSet<>();\n\n    private final boolean rawString;\n\n    /**\n     * Same as {@link #SimpleRelocator(String, String, List, List, boolean)} with {@code rawString} set to {@code false}.\n     * @param patt\n     * @param shadedPattern\n     * @param includes\n     * @param excludes\n     */\n    public SimpleRelocator(String patt, String shadedPattern, List<String> includes, List<String> excludes) {\n        this(patt, shadedPattern, includes, excludes, false);\n    }\n\n    /**\n     * Creates a relocator with the given patterns and includes/excludes. If {@code rawString} is {@code true}, then the given pattern is\n     * treated as regular expression pattern, otherwise it is treated as plain text with no wildcards.\n     * In the latter case, the pattern is expected to refer to classes, not paths, and the constructor will derive the path pattern by replacing dots with slashes.\n     * @param pattern\n     * @param shadedPattern\n     * @param includes\n     * @param excludes\n     * @param rawString\n     */\n    public SimpleRelocator(\n            String pattern, String shadedPattern, List<String> includes, List<String> excludes, boolean rawString) {\n        this.rawString = rawString;\n        if (rawString) {\n            originalPathPattern = pattern;\n            this.shadedPathPattern = shadedPattern;\n\n            originalPattern = null; // not used for raw string relocator\n            this.shadedPattern = null; // not used for raw string relocator\n        } else {\n            if (pattern == null) {\n                // means default package\n                throw new IllegalArgumentException(\n                        \"Pattern must not be null, otherwise it is unclear what to relocate!\");\n            } else {\n                originalPattern = pattern.replace('/', '.');\n                originalPathPattern = pattern.replace('.', '/');\n            }\n\n            if (shadedPattern != null) {\n                this.shadedPattern = shadedPattern.replace('/', '.');\n                this.shadedPathPattern = shadedPattern.replace('.', '/');\n            } else {\n                this.shadedPattern = \"hidden.\" + originalPattern;\n                this.shadedPathPattern = \"hidden/\" + originalPathPattern;\n            }\n        }\n\n        if (rawString) {\n            if ((includes != null && !includes.isEmpty()) || (excludes != null && !excludes.isEmpty())) {\n                LOGGER.warn(\"Includes and excludes are ignored when rawString is true\");\n            }\n            // In raw string mode, the pattern is treated as regular expression, so we compile it as is, without quoting\n            // it.\n            this.regExPattern = originalPattern != null ? Pattern.compile(originalPattern) : null;\n            this.regExPathPattern = Pattern.compile(originalPathPattern);\n            this.includes = null;\n            this.excludes = null;\n        } else {\n            this.includes = normalizePatterns(includes);\n            this.excludes = normalizePatterns(excludes);\n\n            // Don't replace all dots to slashes, otherwise /META-INF/maven/${groupId} can't be matched.\n            if (includes != null && !includes.isEmpty()) {\n                this.includes.addAll(includes);\n            }\n\n            if (excludes != null && !excludes.isEmpty()) {\n                this.excludes.addAll(excludes);\n            }\n\n            if (this.excludes != null) {\n                // Create exclude pattern sets for sources\n                for (String exclude : this.excludes) {\n                    // Excludes should be subpackages of the global pattern\n                    if (exclude.startsWith(originalPattern)) {\n                        sourcePackageExcludes.add(\n                                exclude.substring(originalPattern.length()).replaceFirst(\"[.][*]$\", \"\"));\n                    }\n                    // Excludes should be subpackages of the global pattern\n                    if (exclude.startsWith(originalPathPattern)) {\n                        sourcePathExcludes.add(\n                                exclude.substring(originalPathPattern.length()).replaceFirst(\"[/][*]$\", \"\"));\n                    }\n                }\n            }\n            this.regExPattern = originalPattern != null ? Pattern.compile(Pattern.quote(originalPattern)) : null;\n            this.regExPathPattern = Pattern.compile(Pattern.quote(originalPathPattern));\n        }\n    }\n\n    /**\n     * Normalizes the given patterns by replacing dots with slashes and slashes with dots so that both forms are returned.\n     *\n     * @param patterns\n     * @return the normalized patterns, or {@code null} if the given patterns were {@code null} or empty\n     */\n    private static Set<String> normalizePatterns(Collection<String> patterns) {\n        Set<String> normalized = null;\n\n        if (patterns != null && !patterns.isEmpty()) {\n            normalized = new LinkedHashSet<>();\n            for (String pattern : patterns) {\n                String classPattern = pattern.replace('.', '/');\n                normalized.add(classPattern);\n                // Actually, class patterns should just use 'foo.bar.*' ending with a single asterisk, but some users\n                // mistake them for path patterns like 'my/path/**', so let us be a bit more lenient here.\n                if (classPattern.endsWith(\"/*\") || classPattern.endsWith(\"/**\")) {\n                    String packagePattern = classPattern.substring(0, classPattern.lastIndexOf('/'));\n                    normalized.add(packagePattern);\n                }\n            }\n        }\n\n        return normalized;\n    }\n\n    protected boolean isIncluded(String path) {\n        if (includes != null && !includes.isEmpty()) {\n            for (String include : includes) {\n                if (SelectorUtils.matchPath(include, path, true)) {\n                    return true;\n                }\n            }\n            return false;\n        }\n        return true;\n    }\n\n    protected boolean isExcluded(String path) {\n        if (excludes != null && !excludes.isEmpty()) {\n            for (String exclude : excludes) {\n                if (SelectorUtils.matchPath(exclude, path, true)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    @Override\n    public boolean canRelocatePath(String path) {\n        if (rawString) {\n            return regExPathPattern.matcher(path).find();\n        }\n\n        if (path.endsWith(\".class\")) {\n            path = path.substring(0, path.length() - 6);\n        }\n\n        // Allow for annoying option of an extra / on the front of a path. See MSHADE-119; comes from\n        // getClass().getResource(\"/a/b/c.properties\").\n        if (!path.isEmpty() && path.charAt(0) == '/') {\n            path = path.substring(1);\n        }\n\n        if (isIncluded(path) && !isExcluded(path)) {\n            Matcher matcher = regExPathPattern.matcher(path);\n            if (matcher.find()) {\n                return matcher.start() == 0;\n            }\n        }\n        return false;\n    }\n\n    @Override\n    public boolean canRelocateClass(String clazz) {\n        return !rawString && clazz.indexOf('/') < 0 && canRelocatePath(clazz.replace('.', '/'));\n    }\n\n    @Override\n    public String relocatePath(String path) {\n        if (rawString) {\n            return regExPathPattern.matcher(path).replaceAll(shadedPathPattern);\n        } else {\n            return regExPathPattern.matcher(path).replaceFirst(shadedPathPattern);\n        }\n    }\n\n    @Override\n    public String relocateClass(String input) {\n        return regExPattern == null ? input : regExPattern.matcher(input).replaceFirst(shadedPattern);\n    }\n\n    @Override\n    public String relocateAllClasses(String input) {\n        return regExPattern == null ? input : regExPattern.matcher(input).replaceAll(shadedPattern);\n    }\n\n    @Override\n    public String applyToSourceContent(String sourceContent) {\n        if (rawString) {\n            return sourceContent;\n        }\n        sourceContent = shadeSourceWithExcludes(sourceContent, originalPattern, shadedPattern, sourcePackageExcludes);\n        return shadeSourceWithExcludes(sourceContent, originalPathPattern, shadedPathPattern, sourcePathExcludes);\n    }\n\n    private String shadeSourceWithExcludes(\n            String sourceContent, String patternFrom, String patternTo, Set<String> excludedPatterns) {\n        // Usually shading makes package names a bit longer, so make buffer 10% bigger than original source\n        StringBuilder shadedSourceContent = new StringBuilder(sourceContent.length() * 11 / 10);\n        boolean isFirstSnippet = true;\n        // Make sure that search pattern starts at word boundary and that we look for literal \".\", not regex jokers\n        String[] snippets = sourceContent.split(\"\\\\b\" + patternFrom.replace(\".\", \"[.]\") + \"\\\\b\");\n        for (int i = 0, snippetsLength = snippets.length; i < snippetsLength; i++) {\n            String snippet = snippets[i];\n            String previousSnippet = isFirstSnippet ? \"\" : snippets[i - 1];\n            boolean doExclude = false;\n            for (String excludedPattern : excludedPatterns) {\n                if (snippet.startsWith(excludedPattern)) {\n                    doExclude = true;\n                    break;\n                }\n            }\n            if (isFirstSnippet) {\n                shadedSourceContent.append(snippet);\n                isFirstSnippet = false;\n            } else {\n                String previousSnippetOneLine = previousSnippet.replaceAll(\"\\\\s+\", \" \");\n                boolean afterDotSlashSpace = RX_ENDS_WITH_DOT_SLASH_SPACE\n                        .matcher(previousSnippetOneLine)\n                        .find();\n                boolean afterJavaKeyWord = RX_ENDS_WITH_JAVA_KEYWORD\n                        .matcher(previousSnippetOneLine)\n                        .find();\n                boolean shouldExclude = doExclude || afterDotSlashSpace && !afterJavaKeyWord;\n                shadedSourceContent\n                        .append(shouldExclude ? patternFrom : patternTo)\n                        .append(snippet);\n            }\n        }\n        return shadedSourceContent.toString();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/AbstractCompatibilityTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/**\n * An abstract class to implement once the old non-reproducible ResourceTransformer API.\n */\nabstract class AbstractCompatibilityTransformer implements ReproducibleResourceTransformer {\n    @Override\n    public final void processResource(String resource, InputStream is, List<Relocator> relocators) throws IOException {\n        processResource(resource, is, relocators, 0);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/**\n * Prevents duplicate copies of the license\n */\npublic class ApacheLicenseResourceTransformer extends AbstractCompatibilityTransformer {\n    private static final String LICENSE_PATH = \"META-INF/LICENSE\";\n\n    private static final String LICENSE_TXT_PATH = \"META-INF/LICENSE.txt\";\n\n    private static final String LICENSE_MD_PATH = \"META-INF/LICENSE.md\";\n\n    @Override\n    public boolean canTransformResource(String resource) {\n        return LICENSE_PATH.equalsIgnoreCase(resource)\n                || LICENSE_TXT_PATH.regionMatches(true, 0, resource, 0, LICENSE_TXT_PATH.length())\n                || LICENSE_MD_PATH.regionMatches(true, 0, resource, 0, LICENSE_MD_PATH.length());\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        // no op\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return false;\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream os) throws IOException {\n        // no op\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.io.Writer;\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.TreeSet;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/**\n * Merges <code>META-INF/NOTICE.TXT</code> files.\n */\npublic class ApacheNoticeResourceTransformer extends AbstractCompatibilityTransformer {\n    Set<String> entries = new LinkedHashSet<>();\n\n    Map<String, Set<String>> organizationEntries = new LinkedHashMap<>();\n\n    String projectName = \"\"; // MSHADE-101 :: NullPointerException when projectName is missing\n\n    boolean addHeader = true;\n\n    String preamble1 = \"// ------------------------------------------------------------------\\n\"\n            + \"// NOTICE file corresponding to the section 4d of The Apache License,\\n\"\n            + \"// Version 2.0, in this case for \";\n\n    String preamble2 = \"\\n// ------------------------------------------------------------------\\n\";\n\n    String preamble3 = \"This product includes software developed at\\n\";\n\n    // defaults overridable via config in pom\n    String organizationName = \"The Apache Software Foundation\";\n\n    String organizationURL = \"http://www.apache.org/\";\n\n    String inceptionYear = \"2006\";\n\n    String copyright;\n\n    /**\n     * The file encoding of the <code>NOTICE</code> file.\n     */\n    String encoding;\n\n    private long time = Long.MIN_VALUE;\n\n    private static final String NOTICE_PATH = \"META-INF/NOTICE\";\n\n    private static final String NOTICE_TXT_PATH = \"META-INF/NOTICE.txt\";\n\n    private static final String NOTICE_MD_PATH = \"META-INF/NOTICE.md\";\n\n    @Override\n    public boolean canTransformResource(String resource) {\n        return NOTICE_PATH.equalsIgnoreCase(resource)\n                || NOTICE_TXT_PATH.equalsIgnoreCase(resource)\n                || NOTICE_MD_PATH.equalsIgnoreCase(resource);\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        if (entries.isEmpty()) {\n            String year = new SimpleDateFormat(\"yyyy\").format(new Date());\n            if (!inceptionYear.equals(year)) {\n                year = inceptionYear + \"-\" + year;\n            }\n\n            // add headers\n            if (addHeader) {\n                entries.add(preamble1 + projectName + preamble2);\n            } else {\n                entries.add(\"\");\n            }\n            // fake second entry, we'll look for a real one later\n            entries.add(projectName + \"\\nCopyright \" + year + \" \" + organizationName + \"\\n\");\n            entries.add(preamble3 + organizationName + \" (\" + organizationURL + \").\\n\");\n        }\n\n        BufferedReader reader;\n        if (encoding != null && !encoding.isEmpty()) {\n            reader = new BufferedReader(new InputStreamReader(is, encoding));\n        } else {\n            reader = new BufferedReader(new InputStreamReader(is));\n        }\n\n        String line = reader.readLine();\n        StringBuilder sb = new StringBuilder();\n        Set<String> currentOrg = null;\n        int lineCount = 0;\n        while (line != null) {\n            String trimedLine = line.trim();\n\n            if (!trimedLine.startsWith(\"//\")) {\n                if (trimedLine.length() > 0) {\n                    if (trimedLine.startsWith(\"- \")) {\n                        // resource-bundle 1.3 mode\n                        if (lineCount == 1\n                                && sb.toString().contains(\"This product includes/uses software(s) developed by\")) {\n                            currentOrg = organizationEntries.get(sb.toString().trim());\n                            if (currentOrg == null) {\n                                currentOrg = new TreeSet<>();\n                                organizationEntries.put(sb.toString().trim(), currentOrg);\n                            }\n                            sb = new StringBuilder();\n                        } else if (sb.length() > 0 && currentOrg != null) {\n                            currentOrg.add(sb.toString());\n                            sb = new StringBuilder();\n                        }\n                    }\n                    sb.append(line).append(\"\\n\");\n                    lineCount++;\n                } else {\n                    String ent = sb.toString();\n                    if (ent.startsWith(projectName) && ent.contains(\"Copyright \")) {\n                        copyright = ent;\n                    }\n                    if (currentOrg == null) {\n                        entries.add(ent);\n                    } else {\n                        currentOrg.add(ent);\n                    }\n                    sb = new StringBuilder();\n                    lineCount = 0;\n                    currentOrg = null;\n                }\n            }\n\n            line = reader.readLine();\n        }\n        if (sb.length() > 0) {\n            if (currentOrg == null) {\n                entries.add(sb.toString());\n            } else {\n                currentOrg.add(sb.toString());\n            }\n        }\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return true;\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        JarEntry jarEntry = new JarEntry(NOTICE_PATH);\n        jarEntry.setTime(time);\n        jos.putNextEntry(jarEntry);\n\n        Writer writer;\n        if (encoding != null && !encoding.isEmpty()) {\n            writer = new OutputStreamWriter(jos, encoding);\n        } else {\n            writer = new OutputStreamWriter(jos);\n        }\n\n        int count = 0;\n        for (String line : entries) {\n            ++count;\n            if (line.equals(copyright) && count != 2) {\n                continue;\n            }\n\n            if (count == 2 && copyright != null) {\n                writer.write(copyright);\n                writer.write('\\n');\n            } else {\n                writer.write(line);\n                writer.write('\\n');\n            }\n            if (count == 3) {\n                // do org stuff\n                for (Map.Entry<String, Set<String>> entry : organizationEntries.entrySet()) {\n                    writer.write(entry.getKey());\n                    writer.write('\\n');\n                    for (String l : entry.getValue()) {\n                        writer.write(l);\n                    }\n                    writer.write('\\n');\n                }\n            }\n        }\n\n        writer.flush();\n\n        entries.clear();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/AppendingTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.codehaus.plexus.util.IOUtil;\n\n/**\n * A resource processor that appends content for a resource, separated by a newline.\n */\npublic class AppendingTransformer extends AbstractCompatibilityTransformer {\n    String resource;\n\n    ByteArrayOutputStream data = new ByteArrayOutputStream();\n\n    private long time = Long.MIN_VALUE;\n\n    @Override\n    public boolean canTransformResource(String r) {\n        return resource != null && resource.equalsIgnoreCase(r);\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        IOUtil.copy(is, data);\n        data.write('\\n');\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return data.size() > 0;\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        JarEntry jarEntry = new JarEntry(resource);\n        jarEntry.setTime(time);\n        jos.putNextEntry(jarEntry);\n\n        jos.write(data.toByteArray());\n        data.reset();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/ComponentsXmlResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.BufferedInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.Reader;\nimport java.io.Writer;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.codehaus.plexus.util.ReaderFactory;\nimport org.codehaus.plexus.util.WriterFactory;\nimport org.codehaus.plexus.util.xml.Xpp3Dom;\nimport org.codehaus.plexus.util.xml.Xpp3DomBuilder;\nimport org.codehaus.plexus.util.xml.Xpp3DomWriter;\n\n/**\n * A resource processor that aggregates plexus <code>components.xml</code> files.\n */\npublic class ComponentsXmlResourceTransformer extends AbstractCompatibilityTransformer {\n    private Map<String, Xpp3Dom> components = new LinkedHashMap<>();\n\n    private long time = Long.MIN_VALUE;\n\n    public static final String COMPONENTS_XML_PATH = \"META-INF/plexus/components.xml\";\n\n    @Override\n    public boolean canTransformResource(String resource) {\n        return COMPONENTS_XML_PATH.equals(resource);\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        Xpp3Dom newDom;\n\n        try {\n            BufferedInputStream bis = new BufferedInputStream(is) {\n                @Override\n                public void close() throws IOException {\n                    // leave ZIP open\n                }\n            };\n\n            Reader reader = ReaderFactory.newXmlReader(bis);\n\n            newDom = Xpp3DomBuilder.build(reader);\n        } catch (Exception e) {\n            throw new IOException(\"Error parsing components.xml in \" + is, e);\n        }\n\n        // Only try to merge in components if there are some elements in the component-set\n        if (newDom.getChild(\"components\") == null) {\n            return;\n        }\n\n        Xpp3Dom[] children = newDom.getChild(\"components\").getChildren(\"component\");\n\n        for (Xpp3Dom component : children) {\n            String role = getValue(component, \"role\");\n            role = getRelocatedClass(role, relocators);\n            setValue(component, \"role\", role);\n\n            String roleHint = getValue(component, \"role-hint\");\n\n            String impl = getValue(component, \"implementation\");\n            impl = getRelocatedClass(impl, relocators);\n            setValue(component, \"implementation\", impl);\n\n            String key = role + ':' + roleHint;\n            if (components.containsKey(key)) {\n                // TODO: use the tools in Plexus to merge these properly. For now, I just need an all-or-nothing\n                // configuration carry over\n\n                Xpp3Dom dom = components.get(key);\n                if (dom.getChild(\"configuration\") != null) {\n                    component.addChild(dom.getChild(\"configuration\"));\n                }\n            }\n\n            Xpp3Dom requirements = component.getChild(\"requirements\");\n            if (requirements != null && requirements.getChildCount() > 0) {\n                for (int r = requirements.getChildCount() - 1; r >= 0; r--) {\n                    Xpp3Dom requirement = requirements.getChild(r);\n\n                    String requiredRole = getValue(requirement, \"role\");\n                    requiredRole = getRelocatedClass(requiredRole, relocators);\n                    setValue(requirement, \"role\", requiredRole);\n                }\n            }\n\n            components.put(key, component);\n        }\n\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        JarEntry jarEntry = new JarEntry(COMPONENTS_XML_PATH);\n        jarEntry.setTime(time);\n\n        byte[] data = getTransformedResource();\n\n        jos.putNextEntry(jarEntry);\n\n        jos.write(data);\n\n        components.clear();\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return !components.isEmpty();\n    }\n\n    byte[] getTransformedResource() throws IOException {\n        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024 * 4);\n\n        try (Writer writer = WriterFactory.newXmlWriter(baos)) {\n            Xpp3Dom dom = new Xpp3Dom(\"component-set\");\n\n            Xpp3Dom componentDom = new Xpp3Dom(\"components\");\n\n            dom.addChild(componentDom);\n\n            for (Xpp3Dom component : components.values()) {\n                componentDom.addChild(component);\n            }\n\n            Xpp3DomWriter.write(writer, dom);\n        }\n\n        return baos.toByteArray();\n    }\n\n    private String getRelocatedClass(String className, List<Relocator> relocators) {\n        if (className != null && className.length() > 0 && relocators != null) {\n            for (Relocator relocator : relocators) {\n                if (relocator.canRelocateClass(className)) {\n                    return relocator.relocateClass(className);\n                }\n            }\n        }\n\n        return className;\n    }\n\n    private static String getValue(Xpp3Dom dom, String element) {\n        Xpp3Dom child = dom.getChild(element);\n\n        return (child != null && child.getValue() != null) ? child.getValue() : \"\";\n    }\n\n    private static void setValue(Xpp3Dom dom, String element, String value) {\n        Xpp3Dom child = dom.getChild(element);\n\n        if (child == null || value == null || value.length() <= 0) {\n            return;\n        }\n\n        child.setValue(value);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/DontIncludeResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/**\n * A resource processor that prevents the inclusion of an arbitrary\n * resource into the shaded JAR.\n */\npublic class DontIncludeResourceTransformer extends AbstractCompatibilityTransformer {\n    String resource;\n\n    List<String> resources;\n\n    @Override\n    public boolean canTransformResource(String r) {\n        if ((resource != null && !resource.isEmpty()) && r.endsWith(resource)) {\n            return true;\n        }\n\n        if (resources != null) {\n            for (String resourceEnd : resources) {\n                if (r.endsWith(resourceEnd)) {\n                    return true;\n                }\n            }\n        }\n\n        return false;\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        // no op\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return false;\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream os) throws IOException {\n        // no op\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/GroovyResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Properties;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/**\n * Aggregate Apache Groovy extension modules descriptors\n */\npublic class GroovyResourceTransformer extends AbstractCompatibilityTransformer {\n\n    static final String EXT_MODULE_NAME_LEGACY = \"META-INF/services/org.codehaus.groovy.runtime.ExtensionModule\";\n\n    // Since Groovy 2.5.x/Java 9 META-INF/services may only be used by Service Providers\n    static final String EXT_MODULE_NAME = \"META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule\";\n\n    private List<String> extensionClassesList = new ArrayList<>();\n\n    private List<String> staticExtensionClassesList = new ArrayList<>();\n\n    private String extModuleName = \"no-module-name\";\n\n    private String extModuleVersion = \"1.0\";\n\n    private long time = Long.MIN_VALUE;\n\n    @Override\n    public boolean canTransformResource(String resource) {\n        return EXT_MODULE_NAME.equals(resource) || EXT_MODULE_NAME_LEGACY.equals(resource);\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        Properties out = new Properties();\n        try (InputStream props = is) {\n            out.load(props);\n        }\n        String extensionClasses = out.getProperty(\"extensionClasses\", \"\").trim();\n        if (extensionClasses.length() > 0) {\n            append(extensionClasses, extensionClassesList);\n        }\n        String staticExtensionClasses =\n                out.getProperty(\"staticExtensionClasses\", \"\").trim();\n        if (staticExtensionClasses.length() > 0) {\n            append(staticExtensionClasses, staticExtensionClassesList);\n        }\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    private void append(String entry, List<String> list) {\n        if (entry != null) {\n            Collections.addAll(list, entry.split(\"\\\\s*,\\\\s*\"));\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return extensionClassesList.size() > 0 && staticExtensionClassesList.size() > 0;\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream os) throws IOException {\n        if (hasTransformedResource()) {\n            JarEntry jarEntry = new JarEntry(EXT_MODULE_NAME);\n            jarEntry.setTime(time);\n            os.putNextEntry(jarEntry);\n\n            Properties desc = new Properties();\n            desc.put(\"moduleName\", extModuleName);\n            desc.put(\"moduleVersion\", extModuleVersion);\n            if (extensionClassesList.size() > 0) {\n                desc.put(\"extensionClasses\", join(extensionClassesList));\n            }\n            if (staticExtensionClassesList.size() > 0) {\n                desc.put(\"staticExtensionClasses\", join(staticExtensionClassesList));\n            }\n            desc.store(os, null);\n        }\n    }\n\n    private String join(Collection<String> strings) {\n        Iterator<String> it = strings.iterator();\n        switch (strings.size()) {\n            case 0:\n                return \"\";\n            case 1:\n                return it.next();\n            default:\n                StringBuilder buff = new StringBuilder(it.next());\n                while (it.hasNext()) {\n                    buff.append(\",\").append(it.next());\n                }\n                return buff.toString();\n        }\n    }\n\n    public void setExtModuleName(String extModuleName) {\n        this.extModuleName = extModuleName;\n    }\n\n    public void setExtModuleVersion(String extModuleVersion) {\n        this.extModuleVersion = extModuleVersion;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/IncludeResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.codehaus.plexus.util.IOUtil;\n\n/**\n * A resource processor that allows the addition of an arbitrary file\n * content into the shaded JAR.\n */\npublic class IncludeResourceTransformer extends AbstractCompatibilityTransformer {\n    File file;\n\n    String resource;\n\n    private long time = Long.MIN_VALUE;\n\n    @Override\n    public boolean canTransformResource(String r) {\n        return false;\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return file != null && file.exists();\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        JarEntry jarEntry = new JarEntry(resource);\n        jarEntry.setTime(time);\n\n        try (InputStream in = new FileInputStream(file)) {\n            jos.putNextEntry(jarEntry);\n            IOUtil.copy(in, jos);\n        }\n    }\n\n    @Override\n    public String toString() {\n        return \"IncludeResourceTransformer {resource: '\" + resource + \"'}\";\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/ManifestResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.jar.Attributes;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarFile;\nimport java.util.jar.JarOutputStream;\nimport java.util.jar.Manifest;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/**\n * A resource processor that allows the arbitrary addition of attributes to\n * the first MANIFEST.MF that is found in the set of JARs being processed, or\n * to a newly created manifest for the shaded JAR.\n *\n * @author Jason van Zyl\n * @since 1.2\n */\npublic class ManifestResourceTransformer extends AbstractCompatibilityTransformer {\n    private final List<String> defaultAttributes =\n            Arrays.asList(\"Export-Package\", \"Import-Package\", \"Provide-Capability\", \"Require-Capability\");\n\n    // Configuration\n    private String mainClass;\n\n    private Map<String, Object> manifestEntries;\n\n    private List<String> additionalAttributes;\n\n    // Fields\n    private boolean manifestDiscovered;\n\n    private Manifest manifest;\n\n    private long time = Long.MIN_VALUE;\n\n    private String shade;\n\n    public void setMainClass(String mainClass) {\n        this.mainClass = mainClass;\n    }\n\n    public void setManifestEntries(Map<String, Object> manifestEntries) {\n        this.manifestEntries = manifestEntries;\n    }\n\n    public void setAdditionalAttributes(List<String> additionalAttributes) {\n        this.additionalAttributes = additionalAttributes;\n    }\n\n    @Override\n    public boolean canTransformResource(String resource) {\n        return JarFile.MANIFEST_NAME.equalsIgnoreCase(resource);\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        // We just want to take the first manifest we come across as that's our project's manifest. This is the behavior\n        // now which is situational at best. Right now there is no context passed in with the processing so we cannot\n        // tell what artifact is being processed.\n        if (!manifestDiscovered) {\n            manifest = new Manifest(is);\n\n            if (relocators != null && !relocators.isEmpty()) {\n                final Attributes attributes = manifest.getMainAttributes();\n\n                for (final String attribute : defaultAttributes) {\n                    final String attributeValue = attributes.getValue(attribute);\n                    if (attributeValue != null) {\n                        String newValue = relocate(attributeValue, relocators);\n                        attributes.putValue(attribute, newValue);\n                    }\n                }\n\n                if (additionalAttributes != null) {\n                    for (final String attribute : additionalAttributes) {\n                        final String attributeValue = attributes.getValue(attribute);\n                        if (attributeValue != null) {\n                            String newValue = relocate(attributeValue, relocators);\n                            attributes.putValue(attribute, newValue);\n                        }\n                    }\n                }\n            }\n\n            manifestDiscovered = true;\n\n            if (time > this.time) {\n                this.time = time;\n            }\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return true;\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        // If we didn't find a manifest, then let's create one.\n        if (manifest == null) {\n            manifest = new Manifest();\n        }\n\n        Attributes attributes = manifest.getMainAttributes();\n\n        if (mainClass != null) {\n            attributes.put(Attributes.Name.MAIN_CLASS, mainClass);\n        }\n\n        if (manifestEntries != null) {\n            for (Map.Entry<String, Object> entry : manifestEntries.entrySet()) {\n                if (entry.getValue() == null) {\n                    attributes.remove(new Attributes.Name(entry.getKey()));\n                } else {\n                    attributes.put(new Attributes.Name(entry.getKey()), entry.getValue());\n                }\n            }\n        }\n\n        JarEntry jarEntry = new JarEntry(JarFile.MANIFEST_NAME);\n        jarEntry.setTime(time);\n        jos.putNextEntry(jarEntry);\n        manifest.write(jos);\n    }\n\n    private String relocate(String originalValue, List<Relocator> relocators) {\n        String newValue = originalValue;\n        for (Relocator relocator : relocators) {\n            newValue = relocator.relocateAllClasses(newValue);\n        }\n        return newValue;\n    }\n\n    /**\n     * The shades to apply this transformer to or no shades if no filter is applied.\n     *\n     * @param shade {@code null}, {@code jar}, {@code test-jar}, {@code sources-jar} or {@code test-sources-jar}.\n     */\n    public void setForShade(String shade) {\n        this.shade = shade;\n    }\n\n    public boolean isForShade(String shade) {\n        return isUsedForDefaultShading() || this.shade.equalsIgnoreCase(shade);\n    }\n\n    public boolean isUsedForDefaultShading() {\n        return this.shade == null || this.shade.isEmpty();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/PluginXmlResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.BufferedInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.Reader;\nimport java.io.Writer;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.codehaus.plexus.util.ReaderFactory;\nimport org.codehaus.plexus.util.WriterFactory;\nimport org.codehaus.plexus.util.xml.Xpp3Dom;\nimport org.codehaus.plexus.util.xml.Xpp3DomBuilder;\nimport org.codehaus.plexus.util.xml.Xpp3DomWriter;\n\n/**\n * A resource processor that aggregates Maven <code>plugin.xml</code> files.\n *\n * @author Robert Scholte\n * @since 3.0\n */\npublic class PluginXmlResourceTransformer extends AbstractCompatibilityTransformer {\n    private List<Xpp3Dom> mojos = new ArrayList<>();\n\n    private long time = Long.MIN_VALUE;\n\n    public static final String PLUGIN_XML_PATH = \"META-INF/maven/plugin.xml\";\n\n    @Override\n    public boolean canTransformResource(String resource) {\n        return PLUGIN_XML_PATH.equals(resource);\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        Xpp3Dom newDom;\n\n        try {\n            BufferedInputStream bis = new BufferedInputStream(is) {\n                @Override\n                public void close() throws IOException {\n                    // leave ZIP open\n                }\n            };\n\n            Reader reader = ReaderFactory.newXmlReader(bis);\n\n            newDom = Xpp3DomBuilder.build(reader);\n        } catch (Exception e) {\n            throw new IOException(\"Error parsing plugin.xml in \" + is, e);\n        }\n\n        // Only try to merge in mojos if there are some elements in the plugin\n        if (newDom.getChild(\"mojos\") == null) {\n            return;\n        }\n\n        if (time > this.time) {\n            this.time = time;\n        }\n\n        for (Xpp3Dom mojo : newDom.getChild(\"mojos\").getChildren(\"mojo\")) {\n\n            String impl = getValue(mojo, \"implementation\");\n            impl = getRelocatedClass(impl, relocators);\n            setValue(mojo, \"implementation\", impl);\n\n            Xpp3Dom parameters = mojo.getChild(\"parameters\");\n            if (parameters != null) {\n                for (Xpp3Dom parameter : parameters.getChildren()) {\n                    String type = getValue(parameter, \"type\");\n                    type = getRelocatedClass(type, relocators);\n                    setValue(parameter, \"type\", type);\n                }\n            }\n\n            Xpp3Dom configuration = mojo.getChild(\"configuration\");\n            if (configuration != null) {\n                for (Xpp3Dom configurationEntry : configuration.getChildren()) {\n                    String implementation = getAttribute(configurationEntry, \"implementation\");\n                    implementation = getRelocatedClass(implementation, relocators);\n                    setAttribute(configurationEntry, \"implementation\", implementation);\n                }\n            }\n\n            Xpp3Dom requirements = mojo.getChild(\"requirements\");\n            if (requirements != null && requirements.getChildCount() > 0) {\n                for (Xpp3Dom requirement : requirements.getChildren()) {\n                    String requiredRole = getValue(requirement, \"role\");\n                    requiredRole = getRelocatedClass(requiredRole, relocators);\n                    setValue(requirement, \"role\", requiredRole);\n                }\n            }\n            mojos.add(mojo);\n        }\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        byte[] data = getTransformedResource();\n\n        JarEntry jarEntry = new JarEntry(PLUGIN_XML_PATH);\n        jarEntry.setTime(time);\n        jos.putNextEntry(jarEntry);\n\n        jos.write(data);\n\n        mojos.clear();\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return !mojos.isEmpty();\n    }\n\n    byte[] getTransformedResource() throws IOException {\n        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024 * 4);\n\n        try (Writer writer = WriterFactory.newXmlWriter(baos)) {\n            Xpp3Dom dom = new Xpp3Dom(\"plugin\");\n\n            Xpp3Dom componentDom = new Xpp3Dom(\"mojos\");\n\n            dom.addChild(componentDom);\n\n            for (Xpp3Dom mojo : mojos) {\n                componentDom.addChild(mojo);\n            }\n\n            Xpp3DomWriter.write(writer, dom);\n        }\n\n        return baos.toByteArray();\n    }\n\n    private String getRelocatedClass(String className, List<Relocator> relocators) {\n        if (className != null && className.length() > 0 && relocators != null) {\n            for (Relocator relocator : relocators) {\n                if (relocator.canRelocateClass(className)) {\n                    return relocator.relocateClass(className);\n                }\n            }\n        }\n\n        return className;\n    }\n\n    private static String getValue(Xpp3Dom dom, String element) {\n        Xpp3Dom child = dom.getChild(element);\n\n        return (child != null && child.getValue() != null) ? child.getValue() : \"\";\n    }\n\n    private static void setValue(Xpp3Dom dom, String element, String value) {\n        Xpp3Dom child = dom.getChild(element);\n\n        if (child == null || value == null || value.length() <= 0) {\n            return;\n        }\n\n        child.setValue(value);\n    }\n\n    private static String getAttribute(Xpp3Dom dom, String attribute) {\n        return (dom.getAttribute(attribute) != null) ? dom.getAttribute(attribute) : \"\";\n    }\n\n    private static void setAttribute(Xpp3Dom dom, String attribute, String value) {\n        String attr = dom.getAttribute(attribute);\n\n        if (attr == null || value == null || value.length() <= 0) {\n            return;\n        }\n\n        dom.setAttribute(attribute, value);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/ReproducibleResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/**\n * Transform resource ensuring reproducible output: that requires to get the timestamp of\n * the initial resources to define in a reproducible way the timestamp of the transformed\n * resource.\n *\n * @author Hervé Boutemy\n * @since 3.2.4\n */\npublic interface ReproducibleResourceTransformer extends ResourceTransformer {\n    /**\n     * Transform an individual resource\n     * @param resource The resource name\n     * @param is An input stream for the resource, the implementation should *not* close this stream\n     * @param relocators  A list of relocators\n     * @param time the time of the resource to process\n     * @throws IOException When the IO blows up\n     */\n    void processResource(String resource, InputStream is, List<Relocator> relocators, long time) throws IOException;\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/ResourceBundleAppendingTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\nimport java.util.regex.Pattern;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.codehaus.plexus.util.IOUtil;\n\n/**\n * An appending transformer for resource bundles\n *\n * @author Robert Scholte\n * @since 3.0.0\n */\npublic class ResourceBundleAppendingTransformer extends AbstractCompatibilityTransformer {\n    private Map<String, ByteArrayOutputStream> dataMap = new HashMap<>();\n\n    private Pattern resourceBundlePattern;\n\n    private long time = Long.MIN_VALUE;\n\n    /**\n     * the base name of the resource bundle, a fully qualified class name\n     * @param basename The basename.\n     */\n    public void setBasename(String basename) {\n        resourceBundlePattern = Pattern.compile(basename + \"(_[a-zA-Z]+){0,3}\\\\.properties\");\n    }\n\n    @Override\n    public boolean canTransformResource(String r) {\n        return resourceBundlePattern != null && resourceBundlePattern.matcher(r).matches();\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        ByteArrayOutputStream data = dataMap.get(resource);\n        if (data == null) {\n            data = new ByteArrayOutputStream();\n            dataMap.put(resource, data);\n        }\n\n        IOUtil.copy(is, data);\n        data.write('\\n');\n\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return !dataMap.isEmpty();\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        for (Map.Entry<String, ByteArrayOutputStream> dataEntry : dataMap.entrySet()) {\n            JarEntry jarEntry = new JarEntry(dataEntry.getKey());\n            jarEntry.setTime(time);\n            jos.putNextEntry(jarEntry);\n\n            jos.write(dataEntry.getValue().toByteArray());\n            dataEntry.getValue().reset();\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/ResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/** @author Jason van Zyl */\npublic interface ResourceTransformer {\n    boolean canTransformResource(String resource);\n\n    /**\n     * Transform an individual resource\n     * @param resource The resource name\n     * @param is An input stream for the resource, the implementation should *not* close this stream\n     * @param relocators  A list of relocators\n     * @throws IOException When the IO blows up\n     * @deprecated prefer ReproducibleResourceTransformer\n     */\n    void processResource(String resource, InputStream is, List<Relocator> relocators) throws IOException;\n\n    boolean hasTransformedResource();\n\n    void modifyOutputStream(JarOutputStream os) throws IOException;\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/ServicesResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.nio.charset.StandardCharsets;\nimport java.util.HashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Scanner;\nimport java.util.Set;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.codehaus.plexus.util.IOUtil;\n\n/**\n * Resources transformer that relocates classes in META-INF/services and appends entries in META-INF/services resources\n * into a single resource. For example, if there are several META-INF/services/org.apache.maven.project.ProjectBuilder\n * resources spread across many JARs the individual entries will all be concatenated into a single\n * META-INF/services/org.apache.maven.project.ProjectBuilder resource packaged into the resultant JAR produced by the\n * shading process.\n */\npublic class ServicesResourceTransformer extends AbstractCompatibilityTransformer {\n    private static final String SERVICES_PATH = \"META-INF/services\";\n\n    private final Map<String, Set<String>> serviceEntries = new HashMap<>();\n\n    private long time = Long.MIN_VALUE;\n\n    @Override\n    public boolean canTransformResource(String resource) {\n        return resource.startsWith(SERVICES_PATH);\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, final List<Relocator> relocators, long time)\n            throws IOException {\n        resource = resource.substring(SERVICES_PATH.length() + 1);\n        for (Relocator relocator : relocators) {\n            if (relocator.canRelocateClass(resource)) {\n                resource = relocator.relocateClass(resource);\n                break;\n            }\n        }\n        resource = SERVICES_PATH + '/' + resource;\n\n        Set<String> out = serviceEntries.computeIfAbsent(resource, k -> new LinkedHashSet<>());\n\n        Scanner scanner = new Scanner(is, StandardCharsets.UTF_8.name());\n        while (scanner.hasNextLine()) {\n            String relContent = scanner.nextLine();\n            for (Relocator relocator : relocators) {\n                if (relocator.canRelocateClass(relContent)) {\n                    relContent = relocator.applyToSourceContent(relContent);\n                }\n            }\n            out.add(relContent);\n        }\n\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return !serviceEntries.isEmpty();\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        for (Map.Entry<String, Set<String>> entry : serviceEntries.entrySet()) {\n            String key = entry.getKey();\n            Set<String> data = entry.getValue();\n\n            JarEntry jarEntry = new JarEntry(key);\n            jarEntry.setTime(time);\n            jos.putNextEntry(jarEntry);\n\n            IOUtil.copy((String.join(\"\\n\", data) + \"\\n\").getBytes(StandardCharsets.UTF_8), jos);\n            jos.flush();\n            data.clear();\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/SisuIndexResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.nio.charset.StandardCharsets;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.codehaus.plexus.util.IOUtil;\n\n/**\n * Resource transformer that relocates classes in {@code META-INF/sisu/javax.inject.Named} and appends resources\n * into a single resource.\n *\n * @since 3.3.0\n */\npublic class SisuIndexResourceTransformer extends AbstractCompatibilityTransformer {\n    private static final String SISU_INDEX_PATH = \"META-INF/sisu/javax.inject.Named\";\n\n    private final ArrayList<String> indexEntries = new ArrayList<>();\n\n    private long time = Long.MIN_VALUE;\n\n    @Override\n    public boolean canTransformResource(final String resource) {\n        return resource.equals(SISU_INDEX_PATH);\n    }\n\n    @Override\n    public void processResource(\n            final String resource, final InputStream is, final List<Relocator> relocators, long time)\n            throws IOException {\n        Scanner scanner = new Scanner(is, StandardCharsets.UTF_8.name());\n        while (scanner.hasNextLine()) {\n            String relContent = scanner.nextLine();\n            for (Relocator relocator : relocators) {\n                if (relocator.canRelocateClass(relContent)) {\n                    relContent = relocator.applyToSourceContent(relContent);\n                }\n            }\n            indexEntries.add(relContent);\n        }\n\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return !indexEntries.isEmpty();\n    }\n\n    @Override\n    public void modifyOutputStream(final JarOutputStream jos) throws IOException {\n        JarEntry jarEntry = new JarEntry(SISU_INDEX_PATH);\n        jarEntry.setTime(time);\n        jos.putNextEntry(jarEntry);\n        IOUtil.copy((String.join(\"\\n\", indexEntries) + \"\\n\").getBytes(StandardCharsets.UTF_8), jos);\n        jos.flush();\n        indexEntries.clear();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/UseDependencyReducedPom.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.File;\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.apache.maven.project.MavenProject;\n\n/**\n * Manually creates the resource processors needed to remove the original pom.xml and inject\n * the dependency-reduced-pom.xml in its place in the shaded JAR.\n */\npublic class UseDependencyReducedPom {\n    public static List<ResourceTransformer> createPomReplaceTransformers(\n            MavenProject project, File dependencyReducedPomLocation) {\n        String pomInFinalJarFilename =\n                \"META-INF/maven/\" + project.getGroupId() + \"/\" + project.getArtifactId() + \"/pom.xml\";\n\n        List<ResourceTransformer> resourceTransformers = new ArrayList<>();\n\n        DontIncludeResourceTransformer removePom = new DontIncludeResourceTransformer();\n        removePom.resource = pomInFinalJarFilename;\n        resourceTransformers.add(removePom);\n\n        IncludeResourceTransformer insertDependencyReducedPom = new IncludeResourceTransformer();\n        insertDependencyReducedPom.file = dependencyReducedPomLocation;\n        insertDependencyReducedPom.resource = pomInFinalJarFilename;\n        resourceTransformers.add(insertDependencyReducedPom);\n\n        return resourceTransformers;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/XmlAppendingTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.StringReader;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.jdom2.Attribute;\nimport org.jdom2.Content;\nimport org.jdom2.Document;\nimport org.jdom2.Element;\nimport org.jdom2.JDOMException;\nimport org.jdom2.input.SAXBuilder;\nimport org.jdom2.output.Format;\nimport org.jdom2.output.XMLOutputter;\nimport org.xml.sax.EntityResolver;\nimport org.xml.sax.InputSource;\nimport org.xml.sax.SAXException;\n\n/**\n * Appends multiple occurrences of some XML file.\n */\npublic class XmlAppendingTransformer extends AbstractCompatibilityTransformer {\n    public static final String XSI_NS = \"http://www.w3.org/2001/XMLSchema-instance\";\n\n    boolean ignoreDtd = true;\n\n    String resource;\n\n    Document doc;\n\n    private long time = Long.MIN_VALUE;\n\n    @Override\n    public boolean canTransformResource(String r) {\n        return resource != null && resource.equalsIgnoreCase(r);\n    }\n\n    @Override\n    public void processResource(String resource, InputStream is, List<Relocator> relocators, long time)\n            throws IOException {\n        Document r;\n        try {\n            SAXBuilder builder = new SAXBuilder(false);\n            builder.setExpandEntities(false);\n            if (ignoreDtd) {\n                builder.setEntityResolver(new EntityResolver() {\n                    @Override\n                    public InputSource resolveEntity(String publicId, String systemId)\n                            throws SAXException, IOException {\n                        return new InputSource(new StringReader(\"\"));\n                    }\n                });\n            }\n            r = builder.build(is);\n        } catch (JDOMException e) {\n            throw new RuntimeException(\"Error processing resource \" + resource + \": \" + e.getMessage(), e);\n        }\n\n        if (doc == null) {\n            doc = r;\n        } else {\n            Element root = r.getRootElement();\n\n            for (Iterator<Attribute> itr = root.getAttributes().iterator(); itr.hasNext(); ) {\n                Attribute a = itr.next();\n                itr.remove();\n\n                Element mergedEl = doc.getRootElement();\n                Attribute mergedAtt = mergedEl.getAttribute(a.getName(), a.getNamespace());\n                if (mergedAtt == null) {\n                    mergedEl.setAttribute(a);\n                }\n            }\n\n            for (Iterator<Element> itr = root.getChildren().iterator(); itr.hasNext(); ) {\n                Content n = itr.next();\n                itr.remove();\n\n                doc.getRootElement().addContent(n);\n            }\n        }\n\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return doc != null;\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream jos) throws IOException {\n        JarEntry jarEntry = new JarEntry(resource);\n        jarEntry.setTime(time);\n        jos.putNextEntry(jarEntry);\n\n        new XMLOutputter(Format.getPrettyFormat()).output(doc, jos);\n\n        doc = null;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/properties/MicroprofileConfigTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource.properties;\n\n/**\n * Enables to merge Microprofile Config configuration files properly respecting their ordinal.\n *\n * @since 3.2.2\n */\npublic class MicroprofileConfigTransformer extends PropertiesTransformer {\n    public MicroprofileConfigTransformer() {\n        super(null, \"config_ordinal\", 1000, false);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/properties/OpenWebBeansPropertiesTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource.properties;\n\n/**\n * Enables to merge openwebbeans configuration files properly respecting their ordinal.\n *\n * @since 3.2.2\n */\npublic class OpenWebBeansPropertiesTransformer extends PropertiesTransformer {\n    public OpenWebBeansPropertiesTransformer() {\n        super(\"META-INF/openwebbeans/openwebbeans.properties\", \"configuration.ordinal\", 100, false);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/properties/PropertiesTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource.properties;\n\nimport java.io.BufferedWriter;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStreamWriter;\nimport java.nio.charset.StandardCharsets;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.Properties;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.resource.ReproducibleResourceTransformer;\nimport org.apache.maven.plugins.shade.resource.properties.io.NoCloseOutputStream;\nimport org.apache.maven.plugins.shade.resource.properties.io.SkipPropertiesDateLineWriter;\n\n/**\n * Enables to merge a set of properties respecting priority between them.\n *\n * @since 3.2.2\n */\npublic class PropertiesTransformer implements ReproducibleResourceTransformer {\n    private String resource;\n    private String alreadyMergedKey;\n    private String ordinalKey;\n    private int defaultOrdinal;\n    private boolean reverseOrder;\n    private long time = Long.MIN_VALUE;\n\n    private final List<Properties> properties = new ArrayList<>();\n\n    public PropertiesTransformer() {\n        // no-op\n    }\n\n    protected PropertiesTransformer(\n            final String resource, final String ordinalKey, final int defaultOrdinal, final boolean reversed) {\n        this.resource = resource;\n        this.ordinalKey = ordinalKey;\n        this.defaultOrdinal = defaultOrdinal;\n        this.reverseOrder = reversed;\n    }\n\n    @Override\n    public boolean canTransformResource(final String resource) {\n        return Objects.equals(resource, this.resource);\n    }\n\n    @Override\n    public final void processResource(String resource, InputStream is, List<Relocator> relocators) throws IOException {\n        processResource(resource, is, relocators, 0);\n    }\n\n    @Override\n    public void processResource(\n            final String resource, final InputStream is, final List<Relocator> relocators, long time)\n            throws IOException {\n        final Properties p = new Properties();\n        p.load(is);\n        properties.add(p);\n        if (time > this.time) {\n            this.time = time;\n        }\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return !properties.isEmpty();\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream os) throws IOException {\n        if (properties.isEmpty()) {\n            return;\n        }\n\n        final Properties out = mergeProperties(sortProperties());\n        if (ordinalKey != null) {\n            out.remove(ordinalKey);\n        }\n        if (alreadyMergedKey != null) {\n            out.remove(alreadyMergedKey);\n        }\n        JarEntry jarEntry = new JarEntry(resource);\n        jarEntry.setTime(time);\n        os.putNextEntry(jarEntry);\n        final BufferedWriter writer = new SkipPropertiesDateLineWriter(\n                new OutputStreamWriter(new NoCloseOutputStream(os), StandardCharsets.ISO_8859_1));\n        out.store(writer, \" Merged by maven-shade-plugin (\" + getClass().getName() + \")\");\n        writer.close();\n        os.closeEntry();\n    }\n\n    public void setReverseOrder(final boolean reverseOrder) {\n        this.reverseOrder = reverseOrder;\n    }\n\n    public void setResource(final String resource) {\n        this.resource = resource;\n    }\n\n    public void setOrdinalKey(final String ordinalKey) {\n        this.ordinalKey = ordinalKey;\n    }\n\n    public void setDefaultOrdinal(final int defaultOrdinal) {\n        this.defaultOrdinal = defaultOrdinal;\n    }\n\n    public void setAlreadyMergedKey(final String alreadyMergedKey) {\n        this.alreadyMergedKey = alreadyMergedKey;\n    }\n\n    private List<Properties> sortProperties() {\n        final List<Properties> sortedProperties = new ArrayList<>();\n        boolean foundMaster = false;\n        for (final Properties current : properties) {\n            if (alreadyMergedKey != null) {\n                final String master = current.getProperty(alreadyMergedKey);\n                if (Boolean.parseBoolean(master)) {\n                    if (foundMaster) {\n                        throw new IllegalStateException(\n                                \"Ambiguous merged values: \" + sortedProperties + \", \" + current);\n                    }\n                    foundMaster = true;\n                    sortedProperties.clear();\n                    sortedProperties.add(current);\n                }\n            }\n            if (!foundMaster) {\n                final int configOrder = getConfigurationOrdinal(current);\n\n                int i;\n                for (i = 0; i < sortedProperties.size(); i++) {\n                    int listConfigOrder = getConfigurationOrdinal(sortedProperties.get(i));\n                    if ((!reverseOrder && listConfigOrder > configOrder)\n                            || (reverseOrder && listConfigOrder < configOrder)) {\n                        break;\n                    }\n                }\n                sortedProperties.add(i, current);\n            }\n        }\n        return sortedProperties;\n    }\n\n    private int getConfigurationOrdinal(final Properties p) {\n        if (ordinalKey == null) {\n            return defaultOrdinal;\n        }\n        final String configOrderString = p.getProperty(ordinalKey);\n        if (configOrderString != null && configOrderString.length() > 0) {\n            return Integer.parseInt(configOrderString);\n        }\n        return defaultOrdinal;\n    }\n\n    private static Properties mergeProperties(final List<Properties> sortedProperties) {\n        final Properties mergedProperties = new SortedProperties();\n        for (final Properties p : sortedProperties) {\n            mergedProperties.putAll(p);\n        }\n        return mergedProperties;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/properties/SortedProperties.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource.properties;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.Enumeration;\nimport java.util.Iterator;\nimport java.util.LinkedHashSet;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Properties;\nimport java.util.Set;\n\n/**\n * Internal Properties instance sorting its keys on iterations for store() usages.\n * It ensures properties persistence is deterministic.\n *\n * IMPORTANT: this only overrides methods used across JVM in store() so ordering is not guaranteed for other cases.\n */\npublic class SortedProperties extends Properties {\n    @Override\n    public Set<Map.Entry<Object, Object>> entrySet() {\n        final List<Map.Entry<Object, Object>> entries = new ArrayList<>(super.entrySet());\n        Collections.sort(entries, new Comparator<Map.Entry<Object, Object>>() {\n            @Override\n            public int compare(Map.Entry<Object, Object> o1, Map.Entry<Object, Object> o2) {\n                return String.valueOf(o1.getKey()).compareTo(String.valueOf(o2.getKey()));\n            }\n        });\n        return new LinkedHashSet<>(entries);\n    }\n\n    @Override\n    public synchronized Enumeration<Object> keys() // ensure it is sorted to be deterministic\n            {\n        final List<String> keys = new LinkedList<>();\n        for (Object k : super.keySet()) {\n            keys.add((String) k);\n        }\n        Collections.sort(keys);\n        final Iterator<String> it = keys.iterator();\n        return new Enumeration<Object>() {\n            @Override\n            public boolean hasMoreElements() {\n                return it.hasNext();\n            }\n\n            @Override\n            public Object nextElement() {\n                return it.next();\n            }\n        };\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/properties/io/NoCloseOutputStream.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource.properties.io;\n\nimport java.io.IOException;\nimport java.io.OutputStream;\n\n/**\n * Simple output stream replacing close call by a simple flush.\n * Useful for output streams nesting streams (like jar output streams) and using a stream encoder.\n */\npublic class NoCloseOutputStream extends OutputStream {\n    private final OutputStream delegate;\n\n    public NoCloseOutputStream(OutputStream delegate) {\n        this.delegate = delegate;\n    }\n\n    @Override\n    public void write(int b) throws IOException {\n        delegate.write(b);\n    }\n\n    @Override\n    public void write(byte[] b) throws IOException {\n        delegate.write(b);\n    }\n\n    @Override\n    public void write(byte[] b, int off, int len) throws IOException {\n        delegate.write(b, off, len);\n    }\n\n    @Override\n    public void flush() throws IOException {\n        delegate.flush();\n    }\n\n    @Override\n    public void close() throws IOException {\n        delegate.flush();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugins/shade/resource/properties/io/SkipPropertiesDateLineWriter.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource.properties.io;\n\nimport java.io.BufferedWriter;\nimport java.io.IOException;\nimport java.io.Writer;\n\n/**\n * Simple buffered writer skipping its first write(String) call.\n */\npublic class SkipPropertiesDateLineWriter extends BufferedWriter {\n    private State currentState = State.MUST_SKIP_DATE_COMMENT;\n\n    public SkipPropertiesDateLineWriter(Writer out) {\n        super(out);\n    }\n\n    @Override\n    public void write(String str) throws IOException {\n        if (currentState.shouldSkip(str)) {\n            currentState = currentState.next();\n            return;\n        }\n        super.write(str);\n    }\n\n    private enum State {\n        MUST_SKIP_DATE_COMMENT {\n            @Override\n            boolean shouldSkip(String content) {\n                return content.length() > 1 && content.startsWith(\"#\") && !content.startsWith(\"# \");\n            }\n\n            @Override\n            State next() {\n                return SKIPPED_DATE_COMMENT;\n            }\n        },\n        SKIPPED_DATE_COMMENT {\n            @Override\n            boolean shouldSkip(String content) {\n                return content.trim().isEmpty();\n            }\n\n            @Override\n            State next() {\n                return DONE;\n            }\n        },\n        DONE {\n            @Override\n            boolean shouldSkip(String content) {\n                return false;\n            }\n\n            @Override\n            State next() {\n                throw new UnsupportedOperationException(\"done is a terminal state\");\n            }\n        };\n\n        abstract boolean shouldSkip(String content);\n\n        abstract State next();\n    }\n}\n"
  },
  {
    "path": "src/site/apt/examples/attached-artifact.apt.vm",
    "content": " ------\n Attaching the Shaded Artifact\n ------\n Mauro Talevi\n ------\n 2008-07-21\n ------\n\n~~ Licensed to the Apache Software Foundation (ASF) under one\n~~ or more contributor license agreements.  See the NOTICE file\n~~ distributed with this work for additional information\n~~ regarding copyright ownership.  The ASF licenses this file\n~~ to you under the Apache License, Version 2.0 (the\n~~ \"License\"); you may not use this file except in compliance\n~~ with the License.  You may obtain a copy of the License at\n~~\n~~   http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing,\n~~ software distributed under the License is distributed on an\n~~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n~~ KIND, either express or implied.  See the License for the\n~~ specific language governing permissions and limitations\n~~ under the License.\n\nAttaching the Shaded Artifact\n\n  By default, the plugin will replace the project's main artifact with the shaded artifact. If both the original and\n  the shaded artifact should be installed/deployed to the repository, one can configure the plugin to attach the\n  shaded artifact as a secondary artifact:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>jackofall</shadedClassifierName> <!-- Any name that makes sense -->\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  The shaded artifact is distinguished from the main artifact by means of the additional classifier.\n"
  },
  {
    "path": "src/site/apt/examples/class-relocation.apt.vm",
    "content": " ------\n Relocating Classes\n ------\n Mauro Talevi\n ------\n 2008-07-21\n ------\n\n~~ Licensed to the Apache Software Foundation (ASF) under one\n~~ or more contributor license agreements.  See the NOTICE file\n~~ distributed with this work for additional information\n~~ regarding copyright ownership.  The ASF licenses this file\n~~ to you under the Apache License, Version 2.0 (the\n~~ \"License\"); you may not use this file except in compliance\n~~ with the License.  You may obtain a copy of the License at\n~~\n~~   http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing,\n~~ software distributed under the License is distributed on an\n~~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n~~ KIND, either express or implied.  See the License for the\n~~ specific language governing permissions and limitations\n~~ under the License.\n\nRelocating Classes\n\n  If the uber JAR is reused as a dependency of some other project, directly including classes from the artifact's\n  dependencies in the uber JAR can cause class loading conflicts due to duplicate classes on the class path. To\n  address this issue, one can relocate the classes which get included in the shaded artifact in order to create a\n  private copy of their bytecode:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <relocations>\n                <relocation>\n                  <pattern>org.codehaus.plexus.util</pattern>\n                  <shadedPattern>org.shaded.plexus.util</shadedPattern>\n                  <excludes>\n                    <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>\n                    <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>\n                  </excludes>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  This instructs the plugin to move classes from the package <<<org.codehaus.plexus.util>>> and its subpackages\n  into the package <<<org.shaded.plexus.util>>> by moving the corresponding JAR file entries and rewriting the\n  affected bytecode. The class <<<Xpp3Dom>>> and some others will remain in their original package.\n\n\n  It's also possible to narrow the pattern with the <<<include>>> and/or <<<exclude>>> tag:\n\n\n+-----\n<project>\n  ...\n    <relocation>\n      <pattern>org.codehaus.plexus.util</pattern>\n      <shadedPattern>org.shaded.plexus.util</shadedPattern>\n      <includes>\n        <include>org.codehaud.plexus.util.io.*</include>\n      </includes>\n      <excludes>\n        <exclude>org.codehaud.plexus.util.io.*</exclude>\n      </excludes>\n    </relocation>\n  ...\n</project>\n+-----\n\nWhen using relocations with the <<<rawString>>> element set to <<<true>>>, both <<<includes>>> and <<<excludes>>> are disregarded but the pattern is treated as {{{https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html}regular expression pattern}}. \nAlso the <<<pattern>>> and <<<shadedPattern>>> are always referring to a filesystem path (and must use forward slash (<<</>>>) as separator). Both are not normalized in this case.\n"
  },
  {
    "path": "src/site/apt/examples/executable-jar.apt.vm",
    "content": " ------\n Executable JAR\n ------\n Mauro Talevi\n ------\n 2008-07-21\n ------\n\n~~ Licensed to the Apache Software Foundation (ASF) under one\n~~ or more contributor license agreements.  See the NOTICE file\n~~ distributed with this work for additional information\n~~ regarding copyright ownership.  The ASF licenses this file\n~~ to you under the Apache License, Version 2.0 (the\n~~ \"License\"); you may not use this file except in compliance\n~~ with the License.  You may obtain a copy of the License at\n~~\n~~   http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing,\n~~ software distributed under the License is distributed on an\n~~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n~~ KIND, either express or implied.  See the License for the\n~~ specific language governing permissions and limitations\n~~ under the License.\n\nExecutable JAR\n\n  To create an executable uber JAR, one simply needs to set the main class that serves as the application entry point:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                  <mainClass>org.sonatype.haven.HavenCli</mainClass>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  This snippet configures a special resource transformer which sets the <<<Main-Class>>> entry in the <<<MANIFEST.MF>>>\n  of the shaded JAR. Other entries can be added to the <<<MANIFEST.MF>>> as well via key-value pairs in the\n  <<<\\<manifestEntries\\>>>> section:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                  <manifestEntries>\n                    <Main-Class>org.sonatype.haven.ExodusCli</Main-Class>\n                    <Build-Number>123</Build-Number>\n                  </manifestEntries>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n"
  },
  {
    "path": "src/site/apt/examples/includes-excludes.apt.vm",
    "content": " ------\n Selecting Contents for Uber JAR\n ------\n Mauro Talevi\n ------\n 2008-07-21\n ------\n\n~~ Licensed to the Apache Software Foundation (ASF) under one\n~~ or more contributor license agreements.  See the NOTICE file\n~~ distributed with this work for additional information\n~~ regarding copyright ownership.  The ASF licenses this file\n~~ to you under the Apache License, Version 2.0 (the\n~~ \"License\"); you may not use this file except in compliance\n~~ with the License.  You may obtain a copy of the License at\n~~\n~~   http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing,\n~~ software distributed under the License is distributed on an\n~~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n~~ KIND, either express or implied.  See the License for the\n~~ specific language governing permissions and limitations\n~~ under the License.\n\nSelecting Contents for Uber JAR\n\n  The POM snippet below shows how to control which project dependencies should be included/excluded in the uber JAR:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <artifactSet>\n                <excludes>\n                  <exclude>classworlds:classworlds</exclude>\n                  <exclude>junit:junit</exclude>\n                  <exclude>jmock:*</exclude>\n                  <exclude>*:xml-apis</exclude>\n                  <exclude>org.apache.maven:lib:tests</exclude>\n                  <exclude>log4j:log4j:jar:</exclude>\n                </excludes>\n              </artifactSet>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  Of course, <<<\\<includes\\>>>> can be used as well to specify a white list of artifacts. Artifacts are denoted by a\n  composite identifier of the form <groupId>:<artifactId>[[:<type>]:<classifier>]. Since plugin version 1.3, the\n  wildcard characters '*' and '?' can be used to do glob-like pattern matching.\n\n\n  For fine-grained control of which classes from the selected dependencies are included, artifact filters can be used:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <filters>\n                <filter>\n                  <artifact>junit:junit</artifact>\n                  <includes>\n                    <include>junit/framework/**</include>\n                    <include>org/junit/**</include>\n                  </includes>\n                  <excludes>\n                    <exclude>org/junit/experimental/**</exclude>\n                    <exclude>org/junit/runners/**</exclude>\n                  </excludes>\n                </filter>\n                <filter>\n                  <artifact>*:*</artifact>\n                  <excludes>\n                    <exclude>META-INF/*.SF</exclude>\n                    <exclude>META-INF/*.DSA</exclude>\n                    <exclude>META-INF/*.RSA</exclude>\n                  </excludes>\n                </filter>\n              </filters>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  Here, Ant-like patterns are used to specify that from the dependency <<<junit:junit>>> only certain classes/resources\n  should be included in the uber JAR. The second filter demonstrates the use of wildcards for the artifact identity which\n  was introduced in plugin version 1.3. It excludes all signature related files from every artifact, regardless of its\n  group or artifact id.\n\n  Besides user-specified filters, the plugin can also be configured to automatically remove all classes of dependencies\n  that are not used by the project, thereby minimizing the resulting uber JAR:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <minimizeJar>true</minimizeJar>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  As of version 1.6, minimizeJar will respect classes that were specifically marked for inclusion in a filter.\n  Note that specifying an include filter for classes in an artifact implicitly excludes all non-specified\n  classes in that artifact. <<<\\<excludeDefaults\\>false\\<\\\\excludeDefaults\\>>>> will override this behavior so that all\n  non-specified classes still will be included though.\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <minimizeJar>true</minimizeJar>\n              <filters>\n                <filter>\n                   <artifact>log4j:log4j</artifact>\n                   <includes>\n                       <include>**</include>\n                   </includes>\n                </filter>\n                <filter>\n                   <artifact>commons-logging:commons-logging</artifact>\n                   <includes>\n                       <include>**</include>\n                   </includes>\n                </filter>\n                <filter>\n                   <artifact>foo:bar</artifact>\n                   <excludeDefaults>false</excludeDefaults>\n                   <includes>\n                       <include>foo/Bar.class</include>\n                   </includes>\n                </filter>\n              </filters>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n"
  },
  {
    "path": "src/site/apt/examples/resource-transformers.apt.vm",
    "content": " ------\n Resource Transformers\n ------\n Mauro Talevi\n ------\n 2008-07-21\n ------\n\n~~ Licensed to the Apache Software Foundation (ASF) under one\n~~ or more contributor license agreements.  See the NOTICE file\n~~ distributed with this work for additional information\n~~ regarding copyright ownership.  The ASF licenses this file\n~~ to you under the Apache License, Version 2.0 (the\n~~ \"License\"); you may not use this file except in compliance\n~~ with the License.  You may obtain a copy of the License at\n~~\n~~   http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing,\n~~ software distributed under the License is distributed on an\n~~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n~~ KIND, either express or implied.  See the License for the\n~~ specific language governing permissions and limitations\n~~ under the License.\n\nResource Transformers\n\n  Aggregating classes/resources from several artifacts into one uber JAR is straight forward as long as there is no\n  overlap. Otherwise, some kind of logic to merge resources from several JARs is required. This is where resource\n  transformers kick in.\n\n  \n*-----------------------------------------+------------------------------------------+\n| {{ApacheLicenseResourceTransformer}}    | Prevents license duplication             |\n*-----------------------------------------+------------------------------------------+\n| {{ApacheNoticeResourceTransformer}}     | Prepares merged NOTICE                   |\n*-----------------------------------------+------------------------------------------+\n| {{AppendingTransformer}}                | Adds content to a resource               |\n*-----------------------------------------+------------------------------------------+\n| {{ComponentsXmlResourceTransformer}}    | Aggregates Plexus <<<components.xml>>>   |\n*-----------------------------------------+------------------------------------------+\n| {{DontIncludeResourceTransformer}}      | Prevents inclusion of matching resources |\n*-----------------------------------------+------------------------------------------+\n| {{GroovyResourceTransformer}}           | Merges Apache Groovy extends modules     |\n*-----------------------------------------+------------------------------------------+\n| {{IncludeResourceTransformer}}          | Adds files from the project              |\n*-----------------------------------------+------------------------------------------+\n| {{ManifestResourceTransformer}}         | Sets entries in the <<<MANIFEST>>>       |\n*-----------------------------------------+------------------------------------------+\n| {{PluginXmlResourceTransformer}}        | Aggregates Mavens <<<plugin.xml>>>       |\n*-----------------------------------------+------------------------------------------+\n| {{ResourceBundleAppendingTransformer}}  | Merges ResourceBundles                  | \n*-----------------------------------------+------------------------------------------+\n| {{ServicesResourceTransformer}}         | Relocated class names in <<<META-INF/services>>> resources and merges them. |\n*-----------------------------------------+------------------------------------------+\n| {{XmlAppendingTransformer}}             | Adds XML content to an XML resource      | \n*-----------------------------------------+------------------------------------------+\nTransformers in <<<org.apache.maven.plugins.shade.resource>>>\n\n*-----------------------------------------+------------------------------------------+\n| {{PropertiesTransformer}}               | Merges properties files owning an ordinal to solve conflicts |\n*-----------------------------------------+------------------------------------------+\n| {{OpenWebBeansPropertiesTransformer}}   | Merges Apache OpenWebBeans configuration files |\n*-----------------------------------------+------------------------------------------+\n| {{MicroprofileConfigTransformer}}       | Merges conflicting Microprofile Config properties based on an ordinal |\n*-----------------------------------------+------------------------------------------+\nTransformers in <<<org.apache.maven.plugins.shade.resource.properties>>> (available since 3.2.2)\n  \n* Merging Plexus Component Descriptors with the {ComponentsXmlResourceTransformer}\n\n  JARs for components targeting the Plexus IoC container contain a <<<META-INF/plexus/components.xml>>> entry that\n  declares the component and its requirements. If the uber JAR aggregates multiple Plexus components, a\n  <<<ComponentsXmlResourceTransformer>>> needs to be used to merge the XML descriptors:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer\"/>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  Since plugin version 1.3, this resource transformer will also update the descriptor to account for relocation of\n  component interfaces/implementations (if any).\n\n* Relocate classes of the Maven Plugin Descriptor with the {PluginXmlResourceTransformer}\n\n  With {{{http://maven.apache.org/plugin-tools/index.html}Plugin Tools 3.0}} annotations have been introduced. Now references \n  to classes are no longer classnames as String, but the actual Class reference. When you wanted to relocate classes, you had to\n  maintain the <<<META-INF/maven/plugin.xml>>> by hand, but now this can be done with the <<<PluginXmlResourceTransformer>>>  \n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer\"/>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n* Concatenating Service Entries with the {ServicesResourceTransformer}\n\n  JAR files providing implementations of some interfaces often ship with a <<<META-INF/services/>>> directory that\n  maps interfaces to their implementation classes for lookup by the service locator.\n  To relocate the class names of these implementation classes, and to\n  merge multiple implementations of the same interface into one service entry,\n  the <<<ServicesResourceTransformer>>> can be used:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n* Merging Content of Specific Files with {AppendingTransformer}, XmlAppendingTransformer and ResourceBundleAppendingTransformer\n\n  Some jars contain additional resources (such as properties files) that have the same file name. To avoid overwriting, you can\n  opt to merge them by appending their content into one file. One good example for this is when aggregating both the spring-context \n  and plexus-spring jars. Both of them have the <<<META-INF/spring.handlers>>> file which is used by Spring to handle XML schema \n  namespaces. You can merge the contents of all the files with that specific name using the <<<AppendingTransformer>>> as shown below:\n  \n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.AppendingTransformer\">\n                  <resource>META-INF/spring.handlers</resource>\n                </transformer>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.AppendingTransformer\">\n                  <resource>META-INF/spring.schemas</resource>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+----- \n\n  For XML files, you can use the <<<{XmlAppendingTransformer}>>> instead:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.XmlAppendingTransformer\">\n                  <resource>META-INF/magic.xml</resource>\n                  <!-- Add this to enable loading of DTDs\n                  <ignoreDtd>false</ignoreDtd>\n                  -->\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+----- \n\n  Since plugin version 1.3.1, the <<<XmlAppendingTransformer>>> will by default not load DTDs, thereby avoiding network\n  access. The potential downside of this mode is that external entities cannot be resolved which could fail the\n  transformation, e.g. when using the Crimson XML parser as used in some JRE 1.4. If the transformed resource uses\n  external entities, DTD resolution can either be turned back on or a plugin dependency on <<<xerces:xercesImpl:2.9.1>>>\n  is added to the POM.\n  \n  For ResourceBundles properties files, you can use the <<<{ResourceBundleAppendingTransformer}>>> instead, which will respect all available Locales as well:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ResourceBundleAppendingTransformer\">\n                  <!-- the base name of the resource bundle, a fully qualified class name -->\n                  <basename>path/to/Messages</basename>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----   \n\n* Excluding Resources with the {DontIncludeResourceTransformer}\n\n  The <<<DontIncludeResourceTransformer>>> allows resources to be excluded when\n  their name ends in a given value.\n\n  For example, the following sample excludes all resources ending in <<<.txt>>>.\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer\">\n                    <resource>.txt</resource>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  Since maven-shade-plugin-3.0 it is also possible to give a list of resources which should not be included, like: \n\n+-----\n<transformer implementation=\"org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer\">\n  <resources>\n    <resource>.txt</resource>\n    <resource>READ.me</resource>\n  </resources>\n</transformer>\n+-----\n\n\n\n* Adding New Resources with the {IncludeResourceTransformer}\n\n  The <<<IncludeResourceTransformer>>> allows project files to be included in\n  the package under a given name.\n\n  For example, the following sample includes <<<README.txt>>> in the package\n  as <<<README>>> in the <<<META-INF>>> directory.\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.IncludeResourceTransformer\">\n                    <resource>META-INF/README</resource>\n                    <file>README.txt</file>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+----- \n\n\n* Setting Manifest Entries with the {ManifestResourceTransformer}\n\n  The <<<ManifestResourceTransformer>>> allows existing entries in the <<<MANIFEST>>>\n  to be replaced and new entries added. \n\n  For example, the following sample sets\n   \n    * the <<<Main-Class>>> entry to the value of the <<<app.main.class>>> property,\n                            \n    * the <<<X-Compile-Source-JDK>>> entry to the value of the <<<maven.compile.source>>> property and\n                            \n    * the <<<X-Compile-Target-JDK>>> entry to the value of the <<<maven.compile.target>>> property.\n\n  By default the <<<ManifestResourceTransformer>>> will relocate the following attributes:\n\n    * Export-Package\n\n    * Import-Package\n\n    * Provide-Capability\n\n    * Require-Capability\n\n  With <<<additionalAttributes>>> you can specify the attributes that need to be relocated too.\n   \n                            \n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                  <manifestEntries>\n                    <Main-Class>${app.main.class}</Main-Class>\n                    <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>\n                    <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>\n                  </manifestEntries>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+----- \n\n\n* Licensing\n\n** Preventing License Duplication with the {ApacheLicenseResourceTransformer}\n\n  Some open source producers \n  (including the {{{https://www.apache.org} Apache Software Foundation}})\n  include a copy of their license in the META-INF directory. These are conventionally named\n  either <<<LICENSE>>>,<<<LICENSE.txt>>> or <<<LICENSE.md>>>. When merging these dependencies, adding these\n  resources may cause confusion.\n  The <<<ApacheLicenseResourceTransformer>>> ensures that duplicate licenses (named according\n  to this convention) are not merged. \n\n  For example, the following prevents the license from a <<<commons-collections>>> dependency\n  being merged in\n                            \n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer\">\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+----- \n\n** Aggregating Notices with the {ApacheNoticeResourceTransformer}\n\n  Some licenses \n  (including the {{{https://www.apache.org/licenses/LICENSE-2.0.html} Apache License, Version 2}})\n  require that notices are preserved by downstream distributors. <<<ApacheNoticeResourceTransformer>>>\n  automates the assembly of an appropriate <<<NOTICE>>>.\n\n  For example, to simply merge in dependent notices:\n                            \n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer\">\n                    <addHeader>false</addHeader>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n** Aggregating Apache Groovy extension modules descriptors with the {GroovyResourceTransformer}\n\n  The Apache Groovy language provides extension modules located at\n  <<<META-INF/services/org.codehaus.groovy.runtime.ExtensionModule>>>, these modules use the property file format.\n  <<<GroovyResourceTransformer>>> automates the assembly of Groovy extension modules <<<NOTICE>>>.\n\n  For example, to simply merge the extension modules of several jars:\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.GroovyResourceTransformer\">\n                  <extModuleName>the-aggregated-module</extModuleName>\n                  <extModuleVersion>1.0.0</extModuleVersion>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n ...\n</project>\n+-----\n\n* Merging properties files with {PropertiesTransformer}\n\n  The <<<PropertiesTransformer>>> allows a set of properties files to be merged and to resolve conflicts\n  based on an ordinal giving the priority of each file.\n  An optional <<<alreadyMergedKey>>> enables to have a boolean flag in the file which, if set to true,\n  request to use the file as it as the result of the merge. If two files are considered complete in the\n  merge process then the shade will fail.\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.properties.PropertiesTransformer\">\n                  <!-- required configuration -->\n                  <resource>configuration/application.properties</resource>\n                  <ordinalKey>ordinal</ordinalKey>\n                  <!-- optional configuration -->\n                  <alreadyMergedKey>already_merged</alreadyMergedKey>\n                  <defaultOrdinal>0</defaultOrdinal>\n                  <reverseOrder>false</reverseOrder>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n* Merging Apache OpenWebBeans configuration with {OpenWebBeansPropertiesTransformer}\n\n  <<<OpenWebBeansPropertiesTransformer>>> preconfigure a <<<PropertiesTransformer>>>\n  for Apache OpenWebBeans configuration files.\n\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.properties.OpenWebBeansPropertiesTransformer\" />\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n* Merging Microprofile Config properties with {MicroprofileConfigTransformer}\n\n  <<<MicroprofileConfigTransformer>>> preconfigure a <<<PropertiesTransformer>>>\n  for Microprofile Config. The only required configuration is the ordinal.\n  The <<<alreadyMergedKey>>> is supported but is not defined by the specification.\n\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.properties.MicroprofileConfigTransformer\">\n                  <resource>configuration/app.properties</resource>\n                </transformer>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n"
  },
  {
    "path": "src/site/apt/examples/use-shader-other-impl.apt.vm",
    "content": " ------\n Using an other Shader Implementation\n ------\n Olivier Lamy\n ------\n 2012-03-13\n ------\n\n~~ Licensed to the Apache Software Foundation (ASF) under one\n~~ or more contributor license agreements.  See the NOTICE file\n~~ distributed with this work for additional information\n~~ regarding copyright ownership.  The ASF licenses this file\n~~ to you under the Apache License, Version 2.0 (the\n~~ \"License\"); you may not use this file except in compliance\n~~ with the License.  You may obtain a copy of the License at\n~~\n~~   http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing,\n~~ software distributed under the License is distributed on an\n~~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n~~ KIND, either express or implied.  See the License for the\n~~ specific language governing permissions and limitations\n~~ under the License.\n\nUsing your own Shader implementation\n\n  By default, the plugin provide a DefaultShader implementation but with version 1.6 you can use your own implementation.\n\n  Create a standard Maven project with your implementation.\n\n+-----\n\nDependency to Plexus annotations\n\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-component-annotations</artifactId>\n      <version>1.5.5</version>\n    </dependency>\n\nCreate your Shader\n\n@Component( role = Shader.class, hint = \"mock\" )\npublic class MockShader\n    implements Shader\n{\n  // implement the interface here\n}\n\n// Use the plexus component metadata plugin in your job to generate Plexus metadata\n\n      <plugin>\n        <groupId>org.codehaus.plexus</groupId>\n        <artifactId>plexus-component-metadata</artifactId>\n        <version>1.5.5</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>generate-metadata</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n+-----\n\n  Assuming your project has coordinate org.foo.bar:wine:1.0, you must add it as a dependency of the shade plugin.\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${project.version}</version>\n        <dependencies>\n          <dependency>\n            <groupId>org.foo.bar</groupId>\n            <artifactId>wine</artifactId>\n            <version>1.0</version>\n          </dependency>\n        </dependencies>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shaderHint>mock</shaderHint>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n  Now the mojo will use your own implementation.\n"
  },
  {
    "path": "src/site/apt/index.apt.vm",
    "content": " ------\n Introduction\n ------\n Mauro Talevi\n ------\n 2013-07-22\n ------\n\n~~ Licensed to the Apache Software Foundation (ASF) under one\n~~ or more contributor license agreements.  See the NOTICE file\n~~ distributed with this work for additional information\n~~ regarding copyright ownership.  The ASF licenses this file\n~~ to you under the Apache License, Version 2.0 (the\n~~ \"License\"); you may not use this file except in compliance\n~~ with the License.  You may obtain a copy of the License at\n~~\n~~   http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing,\n~~ software distributed under the License is distributed on an\n~~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n~~ KIND, either express or implied.  See the License for the\n~~ specific language governing permissions and limitations\n~~ under the License.\n\n${project.name}\n\n This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and\n to <shade> - i.e. rename - the packages of some of the dependencies.\n\n* Goals Overview\n\n  The Shade Plugin has a single goal:\n\n  * {{{./shade-mojo.html}shade:shade}} is bound to the <<<package>>> phase and\n  is used to create a shaded jar.\n\n* Usage\n\n  General instructions on how to use the Shade Plugin can be found on the {{{./usage.html}usage page}}. Some more\n  specific use cases are described in the examples given below.\n\n  In case you still have questions regarding the plugin's usage, please feel\n  free to contact the {{{./mailing-lists.html}user mailing list}}. The posts to the mailing list are archived and could\n  already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching\n  the {{{./mail-lists.html}mail archive}}.\n\n  If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our\n  {{{./issue-management.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your\n  concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason,\n  entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated.\n  Of course, patches are welcome, too. Contributors can check out the project from our\n  {{{./scm.html}source repository}} and will find supplementary information in the\n  {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}.\n\n\n* Examples\n\n  To provide you with better understanding on some usages of the Shade Plugin,\n  you can take a look into the following examples:\n\n  * {{{./examples/includes-excludes.html}Selecting Contents for Uber JAR}}\n\n  * {{{./examples/class-relocation.html}Relocating Classes}}\n\n  * {{{./examples/attached-artifact.html}Attaching the Shaded Artifact}}\n\n  * {{{./examples/executable-jar.html}Executable JAR}}\n\n  * {{{./examples/resource-transformers.html}Resource Transformers}}\n\n  * {{{./examples/use-shader-other-impl.html}Using another Shader implementation}}\n\n  []\n"
  },
  {
    "path": "src/site/apt/usage.apt.vm",
    "content": " ------\n Usage\n ------\n Mauro Talevi\n ------\n 2008-07-21\n ------\n\n~~ Licensed to the Apache Software Foundation (ASF) under one\n~~ or more contributor license agreements.  See the NOTICE file\n~~ distributed with this work for additional information\n~~ regarding copyright ownership.  The ASF licenses this file\n~~ to you under the Apache License, Version 2.0 (the\n~~ \"License\"); you may not use this file except in compliance\n~~ with the License.  You may obtain a copy of the License at\n~~\n~~   http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing,\n~~ software distributed under the License is distributed on an\n~~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n~~ KIND, either express or implied.  See the License for the\n~~ specific language governing permissions and limitations\n~~ under the License.\n\nUsage\n\n* Creating a Shaded JAR\n\n  The goals for the Shade Plugin are bound to the <<<package>>> phase in the\n  build lifecycle.\n\n+-----\nmvn package\n+-----\n\n* Configuring Your Shade Plugin\n\n+-----\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <version>${currentVersion}</version>\n        <configuration>\n          <!-- put your configurations here -->\n        </configuration>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n  ...\n</project>\n+-----\n\n* Resource Transformers\n\n*-----------------------------------------+--------------------------------------+\n| ApacheLicenseResourceTransformer        | Prevents license duplication         |\n*-----------------------------------------+--------------------------------------+\n| ApacheNoticeResourceTransformer         | Prepares merged NOTICE               |\n*-----------------------------------------+--------------------------------------+\n| AppendingTransformer                    | Adds content to a resource           |\n*-----------------------------------------+--------------------------------------+\n| ComponentsXmlResourceTransformer        | Aggregates Plexus <<<components.xml>>>|\n*-----------------------------------------+--------------------------------------+\n| DontIncludeResourceTransformer          | Prevents inclusion of matching resources |\n*-----------------------------------------+--------------------------------------+\n| IncludeResourceTransformer              | Adds files from the project          |\n*-----------------------------------------+--------------------------------------+\n| ManifestResourceTransformer             | Sets entries in the <<<MANIFEST>>>   |\n*-----------------------------------------+--------------------------------------+\n| ServicesResourceTransformer             | Merges <<<META-INF/services>>> resources |\n*-----------------------------------------+--------------------------------------+\n| XmlAppendingTransformer                 | Adds XML content to an XML resource  | \n*-----------------------------------------+--------------------------------------+\nTransformers in <<<org.apache.maven.plugins.shade.resource>>>\n\n  For more information, see {{{./examples/resource-transformers.html}samples}}.\n"
  },
  {
    "path": "src/site/fml/faq.fml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<faqs xmlns=\"http://maven.apache.org/FML/1.0.1\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/FML/1.0.1 http://maven.apache.org/xsd/fml-1.0.1.xsd\"\n  id=\"FAQ\" \n  title=\"Frequently Asked Questions\">\n <part id=\"general\">\n   <faq id=\"two-executions\">\n     <question>Why Does My Second Shade Include The Results Of The First Execution?</question>\n     <answer>\n       <p>\n       By default, shade replaces with original jar with the result of shading.\n       So, when a <code>pom.xml</code> includes two shades, \n       the second shade execution will (by default) start from the result of the \n       first shade execution.\n       </p><p>\n       If you're looking for two independent shades then read \n       in <a href='shade-mojo.html'>shade:shade</a> about\n       ways choose a different name for your first shade.\n       </p>\n     </answer>\n   </faq>\n </part>\n</faqs>"
  },
  {
    "path": "src/site/resources/download.cgi",
    "content": "#!/bin/sh\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n# Just call the standard mirrors.cgi script. It will use download.html\n# as the input template.\nexec /www/www.apache.org/dyn/mirrors/mirrors.cgi $*"
  },
  {
    "path": "src/site/site.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<site xmlns=\"http://maven.apache.org/SITE/2.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n      xsi:schemaLocation=\"http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd\">\n\n  <body>\n    <menu name=\"Overview\">\n      <item name=\"Introduction\" href=\"index.html\"/>\n      <item name=\"Plugin Documentation\" href=\"plugin-info.html\">\n        <item name=\"shade:shade\" href=\"shade-mojo.html\" />\n        <item name=\"shade:help\" href=\"help-mojo.html\" />\n      </item>\n      <item name=\"Usage\" href=\"usage.html\"/>\n      <item name=\"FAQ\" href=\"faq.html\"/>\n      <!-- According to https://issues.apache.org/jira/browse/MNGSITE-152 -->\n      <item name=\"License\" href=\"https://www.apache.org/licenses/\"/>\n      <item name=\"Download\" href=\"download.html\"/>\n    </menu>\n    <menu name=\"Examples\">\n      <item name=\"Selecting Contents for Uber JAR\" href=\"examples/includes-excludes.html\"/>\n      <item name=\"Relocating Classes\" href=\"examples/class-relocation.html\"/>\n      <item name=\"Attaching the Shaded Artifact\" href=\"examples/attached-artifact.html\"/>\n      <item name=\"Executable JAR\" href=\"examples/executable-jar.html\"/>\n      <item name=\"Resource Transformers\" href=\"examples/resource-transformers.html\"/>\n      <item name=\"Using another Shader implementation\" href=\"examples/use-shader-other-impl.html\"/>\n    </menu>\n  </body>\n</site>\n"
  },
  {
    "path": "src/site/xdoc/download.xml.vm",
    "content": "<?xml version=\"1.0\"?>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<document>\n  <properties>\n    <title>Download ${project.name} Source</title>\n  </properties>\n\n  <body>\n    <section name=\"Download ${project.name} ${project.version} Source\">\n\n      <p><strong>${project.name} ${project.version}</strong> is distributed in source format.</p>\n\n      <p>Use a source archive if you intend to build <strong>${project.name}</strong> yourself.</p>\n\n      <p>Otherwise, simply use the ready-made binary artifacts from <strong>central repository</strong>.</p>\n\n      <p><strong>${project.name}</strong> is distributed under the <a href=\"https://www.apache.org/licenses/\">Apache License, version 2.0</a>.</p>\n\n      <subsection name=\"Files\">\n        \n        <p>This is the current stable version of <strong>${project.name}</strong>.</p>\n\n        <table>\n          <thead>\n            <tr>\n              <th></th>\n              <th>Link</th>\n              <th>Checksum</th>\n              <th>Signature</th>\n            </tr>\n          </thead>\n          <tbody>\n            <tr>\n              <td>${project.name} ${project.version} (Source zip)</td>\n              <td><a href=\"https://dlcdn.apache.org/maven/plugins/${project.artifactId}-${project.version}-source-release.zip\">${project.artifactId}-${project.version}-source-release.zip</a></td>\n              <td><a href=\"https://downloads.apache.org/maven/plugins/${project.artifactId}-${project.version}-source-release.zip.sha512\">${project.artifactId}-${project.version}-source-release.zip.sha512</a></td>\n              <td><a href=\"https://downloads.apache.org/maven/plugins/${project.artifactId}-${project.version}-source-release.zip.asc\">${project.artifactId}-${project.version}-source-release.zip.asc</a></td>\n            </tr>\n          </tbody>\n        </table>\n\n        <p>It is essential that you <a href=\"https://www.apache.org/info/verification.html\">verify the integrity</a> of the downloaded file\n          using the checksum (.sha512 file)\n          or using the signature (.asc file) against the public <a href=\"https://downloads.apache.org/maven/KEYS\">KEYS</a> used by the Apache Maven developers.\n        </p>\n\n      </subsection>\n\n      <subsection name=\"Previous Versions\">\n        <p>It is strongly recommended to use the latest release version of <strong>${project.name}</strong> to take advantage of the newest features and bug fixes.</p>\n        <p>Older non-recommended releases can be found on our <a href=\"https://archive.apache.org/dist/maven/plugins/\">archive site</a>.</p>\n      </subsection>\n    </section>\n  </body>\n</document>\n\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/DefaultShaderTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade;\n\nimport java.io.BufferedReader;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.lang.reflect.Field;\nimport java.net.URL;\nimport java.net.URLClassLoader;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\nimport java.nio.file.attribute.FileTime;\nimport java.time.temporal.ChronoUnit;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Enumeration;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarFile;\nimport java.util.jar.JarInputStream;\nimport java.util.jar.JarOutputStream;\nimport java.util.stream.Collectors;\nimport java.util.zip.CRC32;\nimport java.util.zip.ZipEntry;\n\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugins.shade.filter.Filter;\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.relocation.SimpleRelocator;\nimport org.apache.maven.plugins.shade.resource.AppendingTransformer;\nimport org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer;\nimport org.apache.maven.plugins.shade.resource.ResourceTransformer;\nimport org.apache.maven.plugins.shade.resource.ServicesResourceTransformer;\nimport org.codehaus.plexus.util.IOUtil;\nimport org.codehaus.plexus.util.Os;\nimport org.junit.Assert;\nimport org.junit.ClassRule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\nimport org.mockito.ArgumentCaptor;\nimport org.objectweb.asm.ClassReader;\nimport org.objectweb.asm.ClassVisitor;\nimport org.objectweb.asm.Opcodes;\nimport org.slf4j.Logger;\n\nimport static java.util.Arrays.asList;\nimport static java.util.Collections.singleton;\nimport static java.util.Objects.requireNonNull;\nimport static org.codehaus.plexus.util.FileUtils.forceMkdir;\nimport static org.hamcrest.CoreMatchers.containsString;\nimport static org.hamcrest.CoreMatchers.hasItem;\nimport static org.hamcrest.CoreMatchers.hasItems;\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\nimport static org.mockito.Mockito.doNothing;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.when;\n\n/**\n * @author Jason van Zyl\n * @author Mauro Talevi\n */\npublic class DefaultShaderTest {\n    private static final String[] EXCLUDES =\n            new String[] {\"org/codehaus/plexus/util/xml/Xpp3Dom\", \"org/codehaus/plexus/util/xml/pull.*\"};\n\n    @ClassRule\n    public static final TemporaryFolder TEMPORARY_FOLDER = new TemporaryFolder();\n\n    private static final String NEWLINE = \"\\n\";\n\n    @Test\n    public void testNoopWhenNotRelocated() throws IOException, MojoExecutionException {\n        File plexusJar = new File(\"src/test/jars/plexus-utils-1.4.1.jar\");\n        File shadedOutput = new File(\"target/foo-custom_testNoopWhenNotRelocated.jar\");\n\n        Set<File> jars = new LinkedHashSet<>();\n        jars.add(new File(\"src/test/jars/test-project-1.0-SNAPSHOT.jar\"));\n        jars.add(plexusJar);\n\n        Relocator relocator = new SimpleRelocator(\n                \"org/codehaus/plexus/util/cli\",\n                \"relocated/plexus/util/cli\",\n                Collections.emptyList(),\n                Collections.emptyList());\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(jars);\n        shadeRequest.setRelocators(Collections.singletonList(relocator));\n        shadeRequest.setResourceTransformers(Collections.emptyList());\n        shadeRequest.setFilters(Collections.emptyList());\n        shadeRequest.setUberJar(shadedOutput);\n\n        DefaultShader shader = newShader();\n        shader.shade(shadeRequest);\n\n        try (JarFile originalJar = new JarFile(plexusJar);\n                JarFile shadedJar = new JarFile(shadedOutput)) {\n            // ASM processes all class files. In doing so, it modifies them, even when not relocating anything.\n            // Before MSHADE-391, the processed files were written to the uber JAR, which did no harm, but made it\n            // difficult to find out by simple file comparison, if a file was actually relocated or not. Now, Shade\n            // makes sure to always write the original file if the class neither was relocated itself nor references\n            // other, relocated classes. So we are checking for regressions here.\n            assertTrue(areEqual(originalJar, shadedJar, \"org/codehaus/plexus/util/Expand.class\"));\n\n            // Relocated files should always be different, because they contain different package names in their byte\n            // code. We should verify this anyway, in order to avoid an existing class file from simply being moved to\n            // another location without actually having been relocated internally.\n            assertFalse(areEqual(\n                    originalJar,\n                    shadedJar,\n                    \"org/codehaus/plexus/util/cli/Arg.class\",\n                    \"relocated/plexus/util/cli/Arg.class\"));\n        }\n        int result = 0;\n        for (String msg : debugMessages.getAllValues()) {\n            if (\"Rewrote class bytecode: org/codehaus/plexus/util/cli/Arg.class\".equals(msg)) {\n                result |= 1;\n            } else if (\"Keeping original class bytecode: org/codehaus/plexus/util/Expand.class\".equals(msg)) {\n                result |= 2;\n            }\n        }\n        assertEquals(3 /* 1 | 2 */, result);\n    }\n\n    @Test\n    public void testOverlappingResourcesAreLogged() throws IOException, MojoExecutionException {\n        DefaultShader shader = newShader();\n\n        // we will shade two jars and expect to see META-INF/MANIFEST.MF overlaps, this will always be true\n        // but this can lead to a broken deployment if intended for OSGi or so, so even this should be logged\n        Set<File> set = new LinkedHashSet<>();\n        set.add(new File(\"src/test/jars/test-project-1.0-SNAPSHOT.jar\"));\n        set.add(new File(\"src/test/jars/plexus-utils-1.4.1.jar\"));\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(set);\n        shadeRequest.setRelocators(Collections.<Relocator>emptyList());\n        shadeRequest.setResourceTransformers(Collections.<ResourceTransformer>emptyList());\n        shadeRequest.setFilters(Collections.<Filter>emptyList());\n        shadeRequest.setUberJar(new File(\"target/foo-custom_testOverlappingResourcesAreLogged.jar\"));\n        shader.shade(shadeRequest);\n\n        assertThat(\n                warnMessages.getAllValues(),\n                hasItem(containsString(\n                        \"plexus-utils-1.4.1.jar, test-project-1.0-SNAPSHOT.jar define 1 overlapping resource:\")));\n        assertThat(warnMessages.getAllValues(), hasItem(containsString(\"- META-INF/MANIFEST.MF\")));\n        if (Os.isFamily(Os.FAMILY_WINDOWS)) {\n            assertThat(\n                    debugMessages.getAllValues(),\n                    hasItem(containsString(\n                            \"We have a duplicate META-INF/MANIFEST.MF in src\\\\test\\\\jars\\\\plexus-utils-1.4.1.jar\")));\n        } else {\n            assertThat(\n                    debugMessages.getAllValues(),\n                    hasItem(containsString(\n                            \"We have a duplicate META-INF/MANIFEST.MF in src/test/jars/plexus-utils-1.4.1.jar\")));\n        }\n    }\n\n    @Test\n    public void testOverlappingResourcesAreLoggedExceptATransformerHandlesIt() throws Exception {\n        TemporaryFolder temporaryFolder = new TemporaryFolder();\n        try {\n            Set<File> set = new LinkedHashSet<>();\n            temporaryFolder.create();\n            File j1 = temporaryFolder.newFile(\"j1.jar\");\n            try (JarOutputStream jos = new JarOutputStream(new FileOutputStream(j1))) {\n                jos.putNextEntry(new JarEntry(\"foo.txt\"));\n                jos.write(\"c1\".getBytes(StandardCharsets.UTF_8));\n                jos.closeEntry();\n            }\n            File j2 = temporaryFolder.newFile(\"j2.jar\");\n            try (JarOutputStream jos = new JarOutputStream(new FileOutputStream(j2))) {\n                jos.putNextEntry(new JarEntry(\"foo.txt\"));\n                jos.write(\"c2\".getBytes(StandardCharsets.UTF_8));\n                jos.closeEntry();\n            }\n            set.add(j1);\n            set.add(j2);\n\n            AppendingTransformer transformer = new AppendingTransformer();\n            Field resource = AppendingTransformer.class.getDeclaredField(\"resource\");\n            resource.setAccessible(true);\n            resource.set(transformer, \"foo.txt\");\n\n            ShadeRequest shadeRequest = new ShadeRequest();\n            shadeRequest.setJars(set);\n            shadeRequest.setRelocators(Collections.emptyList());\n            shadeRequest.setResourceTransformers(Collections.singletonList(transformer));\n            shadeRequest.setFilters(Collections.emptyList());\n            shadeRequest.setUberJar(new File(\"target/foo-custom_testOverlappingResourcesAreLogged.jar\"));\n\n            DefaultShader shaderWithTransformer = newShader();\n            shaderWithTransformer.shade(shadeRequest);\n\n            assertThat(warnMessages.getAllValues().size(), is(0));\n\n            DefaultShader shaderWithoutTransformer = newShader();\n            shadeRequest.setResourceTransformers(Collections.emptyList());\n            shaderWithoutTransformer.shade(shadeRequest);\n\n            assertThat(\n                    warnMessages.getAllValues(),\n                    hasItems(containsString(\"j1.jar, j2.jar define 1 overlapping resource:\")));\n            assertThat(warnMessages.getAllValues(), hasItems(containsString(\"- foo.txt\")));\n        } finally {\n            temporaryFolder.delete();\n        }\n    }\n\n    @Test\n    public void testShaderWithDefaultShadedPattern() throws Exception {\n        shaderWithPattern(null, new File(\"target/foo-default.jar\"), EXCLUDES);\n    }\n\n    @Test\n    public void testShaderWithStaticInitializedClass() throws Exception {\n        Shader s = newShader();\n\n        Set<File> set = new LinkedHashSet<>();\n\n        set.add(new File(\"src/test/jars/test-artifact-1.0-SNAPSHOT.jar\"));\n\n        List<Relocator> relocators = new ArrayList<>();\n\n        relocators.add(new SimpleRelocator(\"org.apache.maven.plugins.shade\", null, null, null));\n\n        List<ResourceTransformer> resourceTransformers = new ArrayList<>();\n\n        List<Filter> filters = new ArrayList<>();\n\n        File file = new File(\"target/testShaderWithStaticInitializedClass.jar\");\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(set);\n        shadeRequest.setUberJar(file);\n        shadeRequest.setFilters(filters);\n        shadeRequest.setRelocators(relocators);\n        shadeRequest.setResourceTransformers(resourceTransformers);\n\n        s.shade(shadeRequest);\n\n        try (URLClassLoader cl = new URLClassLoader(new URL[] {file.toURI().toURL()})) {\n            Class<?> c = cl.loadClass(\"hidden.org.apache.maven.plugins.shade.Lib\");\n            Object o = c.newInstance();\n            assertEquals(\"foo.bar/baz\", c.getDeclaredField(\"CONSTANT\").get(o));\n        }\n    }\n\n    @Test\n    public void testShaderWithCustomShadedPattern() throws Exception {\n        shaderWithPattern(\"org/shaded/plexus/util\", new File(\"target/foo-custom.jar\"), EXCLUDES);\n    }\n\n    @Test\n    public void testShaderWithoutExcludesShouldRemoveReferencesOfOriginalPattern() throws Exception {\n        // FIXME: shaded jar should not include references to org/codehaus/* (empty dirs) or org.codehaus.* META-INF\n        // files.\n        shaderWithPattern(\n                \"org/shaded/plexus/util\", new File(\"target/foo-custom-without-excludes.jar\"), new String[] {});\n    }\n\n    @Test\n    public void testHandleDirectory() throws Exception {\n        final File dir = TEMPORARY_FOLDER.getRoot();\n        // explode src/test/jars/test-artifact-1.0-SNAPSHOT.jar in this temp dir\n        try (JarInputStream in =\n                new JarInputStream(Files.newInputStream(Paths.get(\"src/test/jars/test-artifact-1.0-SNAPSHOT.jar\")))) {\n            JarEntry nextJarEntry;\n            while ((nextJarEntry = in.getNextJarEntry()) != null) {\n                if (nextJarEntry.isDirectory()) {\n                    continue;\n                }\n                File out = new File(dir, nextJarEntry.getName());\n                forceMkdir(out.getParentFile());\n                try (OutputStream outputStream = Files.newOutputStream(out.toPath())) {\n                    IOUtil.copy(in, outputStream, (int) Math.max(nextJarEntry.getSize(), 512));\n                }\n            }\n        }\n\n        // do shade\n        File shade = new File(\"target/testHandleDirectory.jar\");\n        shaderWithPattern(\"org/shaded/plexus/util\", shade, new String[0], singleton(dir));\n\n        // ensure directory was shaded properly\n        try (JarFile jar = new JarFile(shade)) {\n            List<String> entries = new ArrayList<>();\n            Enumeration<JarEntry> jarEntryEnumeration = jar.entries();\n            while (jarEntryEnumeration.hasMoreElements()) {\n                JarEntry jarEntry = jarEntryEnumeration.nextElement();\n                if (jarEntry.isDirectory()) {\n                    continue;\n                }\n                entries.add(jarEntry.getName());\n            }\n            Collections.sort(entries);\n            assertEquals(\n                    asList(\n                            \"META-INF/maven/org.apache.maven.plugins.shade/test-artifact/pom.properties\",\n                            \"META-INF/maven/org.apache.maven.plugins.shade/test-artifact/pom.xml\",\n                            \"org/apache/maven/plugins/shade/Lib.class\"),\n                    entries);\n        }\n    }\n\n    @Test\n    public void testShaderWithRelocatedClassname() throws Exception {\n        DefaultShader s = newShader();\n\n        Set<File> set = new LinkedHashSet<>();\n\n        set.add(new File(\"src/test/jars/test-project-1.0-SNAPSHOT.jar\"));\n\n        set.add(new File(\"src/test/jars/plexus-utils-1.4.1.jar\"));\n\n        List<Relocator> relocators = new ArrayList<>();\n\n        relocators.add(\n                new SimpleRelocator(\"org/codehaus/plexus/util/\", \"_plexus/util/__\", null, Collections.emptyList()));\n\n        List<ResourceTransformer> resourceTransformers = new ArrayList<>();\n\n        resourceTransformers.add(new ComponentsXmlResourceTransformer());\n\n        List<Filter> filters = new ArrayList<>();\n\n        File file = new File(\"target/foo-relocate-class.jar\");\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(set);\n        shadeRequest.setUberJar(file);\n        shadeRequest.setFilters(filters);\n        shadeRequest.setRelocators(relocators);\n        shadeRequest.setResourceTransformers(resourceTransformers);\n\n        s.shade(shadeRequest);\n\n        try (URLClassLoader cl = new URLClassLoader(new URL[] {file.toURI().toURL()})) {\n            Class<?> c = cl.loadClass(\"_plexus.util.__StringUtils\");\n            // first, ensure it works:\n            Object o = c.newInstance();\n            assertEquals(\"\", c.getMethod(\"clean\", String.class).invoke(o, (String) null));\n\n            // now, check that its source file was rewritten:\n            String[] source = {null};\n            ClassReader classReader = new ClassReader(cl.getResourceAsStream(\"_plexus/util/__StringUtils.class\"));\n            classReader.accept(\n                    new ClassVisitor(Opcodes.ASM4) {\n                        @Override\n                        public void visitSource(String arg0, String arg1) {\n                            super.visitSource(arg0, arg1);\n                            source[0] = arg0;\n                        }\n                    },\n                    ClassReader.SKIP_CODE);\n            assertEquals(\"__StringUtils.java\", source[0]);\n        }\n    }\n\n    @Test\n    public void testShaderWithNestedJar() throws Exception {\n        TemporaryFolder temporaryFolder = new TemporaryFolder();\n\n        final String innerJarFileName = \"inner.jar\";\n\n        temporaryFolder.create();\n        File innerJar = temporaryFolder.newFile(innerJarFileName);\n        try (JarOutputStream jos = new JarOutputStream(Files.newOutputStream(innerJar.toPath()))) {\n            jos.putNextEntry(new JarEntry(\"foo.txt\"));\n            jos.write(\"c1\".getBytes(StandardCharsets.UTF_8));\n            jos.closeEntry();\n        }\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(new LinkedHashSet<>(Collections.singleton(innerJar)));\n        shadeRequest.setFilters(Collections.emptyList());\n        shadeRequest.setRelocators(Collections.emptyList());\n        shadeRequest.setResourceTransformers(Collections.emptyList());\n        File shadedFile = temporaryFolder.newFile(\"shaded.jar\");\n        shadeRequest.setUberJar(shadedFile);\n\n        DefaultShader shader = newShader();\n        shader.shade(shadeRequest);\n\n        FileTime lastModified = FileTime.from(\n                Files.getLastModifiedTime(shadedFile.toPath()).toInstant().minus(5, ChronoUnit.SECONDS));\n\n        Files.setLastModifiedTime(shadedFile.toPath(), lastModified);\n\n        shader.shade(shadeRequest);\n        assertEquals(lastModified, Files.getLastModifiedTime(shadedFile.toPath()));\n\n        temporaryFolder.delete();\n    }\n\n    @Test\n    public void testShaderNoOverwrite() throws Exception {\n        TemporaryFolder temporaryFolder = new TemporaryFolder();\n\n        final String innerJarFileName = \"inner.jar\";\n\n        temporaryFolder.create();\n        File innerJar = temporaryFolder.newFile(innerJarFileName);\n        try (JarOutputStream jos = new JarOutputStream(new FileOutputStream(innerJar))) {\n            jos.putNextEntry(new JarEntry(\"foo.txt\"));\n            jos.write(\"c1\".getBytes(StandardCharsets.UTF_8));\n            jos.closeEntry();\n        }\n\n        File outerJar = temporaryFolder.newFile(\"outer.jar\");\n        try (JarOutputStream jos = new JarOutputStream(new FileOutputStream(outerJar))) {\n            FileInputStream innerStream = new FileInputStream(innerJar);\n            byte[] bytes = IOUtil.toByteArray(innerStream, 32 * 1024);\n            innerStream.close();\n            writeEntryWithoutCompression(innerJarFileName, bytes, jos);\n        }\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(new LinkedHashSet<>(Collections.singleton(outerJar)));\n        shadeRequest.setFilters(new ArrayList<>());\n        shadeRequest.setRelocators(new ArrayList<>());\n        shadeRequest.setResourceTransformers(new ArrayList<>());\n        File shadedFile = temporaryFolder.newFile(\"shaded.jar\");\n        shadeRequest.setUberJar(shadedFile);\n\n        DefaultShader shader = newShader();\n        shader.shade(shadeRequest);\n\n        JarFile shadedJarFile = new JarFile(shadedFile);\n        JarEntry entry = shadedJarFile.getJarEntry(innerJarFileName);\n\n        // After shading, entry compression method should not be changed.\n        Assert.assertEquals(entry.getMethod(), ZipEntry.STORED);\n\n        temporaryFolder.delete();\n    }\n\n    @Test\n    public void testShaderWithDuplicateService() throws Exception {\n        TemporaryFolder temporaryFolder = new TemporaryFolder();\n        temporaryFolder.create();\n\n        String serviceEntryName = \"META-INF/services/my.foo.Service\";\n        String serviceEntryValue = \"my.foo.impl.Service1\";\n\n        File innerJar1 = temporaryFolder.newFile(\"inner1.jar\");\n        try (JarOutputStream jos = new JarOutputStream(Files.newOutputStream(innerJar1.toPath()))) {\n            jos.putNextEntry(new JarEntry(serviceEntryName));\n            jos.write((serviceEntryValue + NEWLINE).getBytes(StandardCharsets.UTF_8));\n            jos.closeEntry();\n        }\n\n        File innerJar2 = temporaryFolder.newFile(\"inner2.jar\");\n        try (JarOutputStream jos = new JarOutputStream(Files.newOutputStream(innerJar2.toPath()))) {\n            jos.putNextEntry(new JarEntry(serviceEntryName));\n            jos.write((serviceEntryValue + NEWLINE).getBytes(StandardCharsets.UTF_8));\n            jos.closeEntry();\n        }\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(new LinkedHashSet<>(Arrays.asList(innerJar1, innerJar2)));\n        shadeRequest.setFilters(Collections.emptyList());\n        shadeRequest.setRelocators(Collections.emptyList());\n        shadeRequest.setResourceTransformers(Collections.singletonList(new ServicesResourceTransformer()));\n        File shadedFile = temporaryFolder.newFile(\"shaded.jar\");\n        shadeRequest.setUberJar(shadedFile);\n\n        DefaultShader shader = newShader();\n        shader.shade(shadeRequest);\n\n        JarFile shadedJarFile = new JarFile(shadedFile);\n        JarEntry entry = shadedJarFile.getJarEntry(serviceEntryName);\n\n        List<String> lines = new BufferedReader(\n                        new InputStreamReader(shadedJarFile.getInputStream(entry), StandardCharsets.UTF_8))\n                .lines()\n                .collect(Collectors.toList());\n\n        // After shading, there should be a single input\n        Assert.assertEquals(Collections.singletonList(serviceEntryValue), lines);\n\n        temporaryFolder.delete();\n    }\n\n    @Test\n    public void testShaderWithSmallEntries() throws Exception {\n        TemporaryFolder temporaryFolder = new TemporaryFolder();\n\n        final String innerJarFileName = \"inner.jar\";\n        int len;\n\n        temporaryFolder.create();\n        File innerJar = temporaryFolder.newFile(innerJarFileName);\n        try (JarOutputStream jos = new JarOutputStream(Files.newOutputStream(innerJar.toPath()))) {\n            jos.putNextEntry(new JarEntry(\"foo.txt\"));\n            byte[] bytes = \"c1\".getBytes(StandardCharsets.UTF_8);\n            len = bytes.length;\n            jos.write(bytes);\n            jos.closeEntry();\n        }\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(new LinkedHashSet<>(Collections.singleton(innerJar)));\n        shadeRequest.setFilters(new ArrayList<>());\n        shadeRequest.setRelocators(new ArrayList<>());\n        shadeRequest.setResourceTransformers(new ArrayList<>());\n        File shadedFile = temporaryFolder.newFile(\"shaded.jar\");\n        shadeRequest.setUberJar(shadedFile);\n\n        DefaultShader shader = newShader();\n        shader.shade(shadeRequest);\n\n        JarFile shadedJarFile = new JarFile(shadedFile);\n        JarEntry entry = shadedJarFile.getJarEntry(\"foo.txt\");\n\n        // After shading, entry compression method should not be changed.\n        Assert.assertEquals(entry.getSize(), len);\n\n        temporaryFolder.delete();\n    }\n\n    private void writeEntryWithoutCompression(String entryName, byte[] entryBytes, JarOutputStream jos)\n            throws IOException {\n        final JarEntry entry = new JarEntry(entryName);\n        final int size = entryBytes.length;\n        final CRC32 crc = new CRC32();\n        crc.update(entryBytes, 0, size);\n        entry.setSize(size);\n        entry.setCompressedSize(size);\n        entry.setMethod(ZipEntry.STORED);\n        entry.setCrc(crc.getValue());\n        jos.putNextEntry(entry);\n        jos.write(entryBytes);\n        jos.closeEntry();\n    }\n\n    private void shaderWithPattern(String shadedPattern, File jar, String[] excludes) throws Exception {\n        Set<File> set = new LinkedHashSet<>();\n        set.add(new File(\"src/test/jars/test-project-1.0-SNAPSHOT.jar\"));\n        set.add(new File(\"src/test/jars/plexus-utils-1.4.1.jar\"));\n        shaderWithPattern(shadedPattern, jar, excludes, set);\n    }\n\n    private void shaderWithPattern(String shadedPattern, File jar, String[] excludes, Set<File> set) throws Exception {\n        DefaultShader s = newShader();\n\n        List<Relocator> relocators = new ArrayList<>();\n\n        relocators.add(new SimpleRelocator(\"org/codehaus/plexus/util\", shadedPattern, null, Arrays.asList(excludes)));\n\n        List<ResourceTransformer> resourceTransformers = new ArrayList<>();\n\n        resourceTransformers.add(new ComponentsXmlResourceTransformer());\n\n        List<Filter> filters = new ArrayList<>();\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(set);\n        shadeRequest.setUberJar(jar);\n        shadeRequest.setFilters(filters);\n        shadeRequest.setRelocators(relocators);\n        shadeRequest.setResourceTransformers(resourceTransformers);\n\n        s.shade(shadeRequest);\n    }\n\n    private DefaultShader newShader() {\n        return new DefaultShader(mockLogger());\n    }\n\n    private ArgumentCaptor<String> debugMessages;\n\n    private ArgumentCaptor<String> warnMessages;\n\n    private Logger mockLogger() {\n        debugMessages = ArgumentCaptor.forClass(String.class);\n        warnMessages = ArgumentCaptor.forClass(String.class);\n        Logger logger = mock(Logger.class);\n        when(logger.isDebugEnabled()).thenReturn(true);\n        when(logger.isWarnEnabled()).thenReturn(true);\n        doNothing().when(logger).debug(debugMessages.capture());\n        doNothing().when(logger).warn(warnMessages.capture());\n        return logger;\n    }\n\n    private boolean areEqual(final JarFile jar1, final JarFile jar2, final String entry) throws IOException {\n        return areEqual(jar1, jar2, entry, entry);\n    }\n\n    private boolean areEqual(final JarFile jar1, final JarFile jar2, final String entry1, String entry2)\n            throws IOException {\n        try (InputStream s1 = jar1.getInputStream(\n                        requireNonNull(jar1.getJarEntry(entry1), entry1 + \" in \" + jar1.getName()));\n                InputStream s2 = jar2.getInputStream(\n                        requireNonNull(jar2.getJarEntry(entry2), entry2 + \" in \" + jar2.getName()))) {\n            return Arrays.equals(IOUtil.toByteArray(s1), IOUtil.toByteArray(s2));\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/MockShader.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade;\n\nimport javax.inject.Named;\nimport javax.inject.Singleton;\n\nimport java.io.IOException;\n\nimport org.apache.maven.plugin.MojoExecutionException;\n\n/**\n * @author Olivier Lamy\n */\n@Singleton\n@Named(\"mock\")\npublic class MockShader implements Shader {\n    public void shade(ShadeRequest shadeRequest) throws IOException, MojoExecutionException {\n        System.out.println(\"Executing MockShader#shade\");\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/custom/CustomReproducibleResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.custom;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.resource.ReproducibleResourceTransformer;\n\n/**\n * Custom ReproducibleResourceTransformer for MSHADE-363_old-plugin IT, to check that it can be run with\n * an older maven-shade-plugin that does not contain the ReproducibleResourceTransformer interface.\n */\npublic class CustomReproducibleResourceTransformer implements ReproducibleResourceTransformer {\n    @Override\n    public boolean canTransformResource(final String resource) {\n        return true;\n    }\n\n    /**\n     * old non-reproducible RessourceTransformer API that will be used by maven-shade-plugin up to 3.2.2.\n     */\n    @Override\n    public final void processResource(final String resource, final InputStream is, final List<Relocator> relocators)\n            throws IOException {\n        System.out.println(\"Custom ResourceTransformer called through old API\");\n        // call new ReproducibleRessourceTransformer API using a conventional timestamp\n        processResource(resource, is, relocators, 0);\n    }\n\n    /**\n     * new reproducible API\n     */\n    @Override\n    public void processResource(\n            final String resource, final InputStream is, final List<Relocator> relocators, long time)\n            throws IOException {\n        System.out.println(\"Custom ResourceTransformer called through new Reprodcible API\");\n    }\n\n    @Override\n    public boolean hasTransformedResource() {\n        return true;\n    }\n\n    @Override\n    public void modifyOutputStream(JarOutputStream os) throws IOException {\n        // do-op for this test\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/filter/MinijarFilterTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.filter;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.TreeSet;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.artifact.DefaultArtifact;\nimport org.apache.maven.artifact.DependencyResolutionRequiredException;\nimport org.apache.maven.model.Build;\nimport org.apache.maven.plugin.logging.Log;\nimport org.apache.maven.project.MavenProject;\nimport org.junit.Before;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\nimport org.mockito.ArgumentCaptor;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.fail;\nimport static org.junit.Assume.assumeFalse;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.never;\nimport static org.mockito.Mockito.verify;\nimport static org.mockito.Mockito.when;\n\npublic class MinijarFilterTest {\n\n    @Rule\n    public TemporaryFolder tempFolder =\n            TemporaryFolder.builder().assureDeletion().build();\n\n    private File outputDirectory;\n    private File emptyFile;\n    private File jarFile;\n    private Log log;\n    private ArgumentCaptor<CharSequence> logCaptor;\n\n    @Before\n    public void init() throws IOException {\n        this.outputDirectory = tempFolder.newFolder();\n        this.emptyFile = tempFolder.newFile();\n        this.jarFile = tempFolder.newFile();\n        new JarOutputStream(Files.newOutputStream(this.jarFile.toPath())).close();\n        this.log = mock(Log.class);\n        logCaptor = ArgumentCaptor.forClass(CharSequence.class);\n    }\n\n    /**\n     * This test will fail on JDK 7 because jdependency needs at least JDK 8.\n     */\n    @Test\n    public void testWithMockProject() throws IOException {\n        assumeFalse(\n                \"Expected to run under JDK8+\",\n                System.getProperty(\"java.version\").startsWith(\"1.7\"));\n\n        MavenProject mavenProject = mockProject(outputDirectory, emptyFile);\n\n        MinijarFilter mf = new MinijarFilter(mavenProject, log);\n\n        mf.finished();\n\n        verify(log).info(logCaptor.capture());\n\n        assertEquals(\"Minimized 0 -> 0\", logCaptor.getValue());\n    }\n\n    @Test\n    public void testWithPomProject() throws IOException {\n        // project with pom packaging and no artifact.\n        MavenProject mavenProject = mockProject(outputDirectory, null);\n        mavenProject.setPackaging(\"pom\");\n\n        MinijarFilter mf = new MinijarFilter(mavenProject, log);\n\n        mf.finished();\n\n        verify(log).info(logCaptor.capture());\n\n        // verify no access to project's artifacts\n        verify(mavenProject, never()).getArtifacts();\n\n        assertEquals(\"Minimized 0 -> 0\", logCaptor.getValue());\n    }\n\n    private MavenProject mockProject(File outputDirectory, File file, String... classPathElements) {\n        MavenProject mavenProject = mock(MavenProject.class);\n\n        Artifact artifact = mock(Artifact.class);\n        when(artifact.getGroupId()).thenReturn(\"com\");\n        when(artifact.getArtifactId()).thenReturn(\"aid\");\n        when(artifact.getVersion()).thenReturn(\"1.9\");\n        when(artifact.getClassifier()).thenReturn(\"classifier1\");\n        when(artifact.getScope()).thenReturn(Artifact.SCOPE_COMPILE);\n\n        when(mavenProject.getArtifact()).thenReturn(artifact);\n\n        DefaultArtifact dependencyArtifact =\n                new DefaultArtifact(\"dep.com\", \"dep.aid\", \"1.0\", \"compile\", \"jar\", \"classifier2\", null);\n        dependencyArtifact.setFile(file);\n\n        Set<Artifact> artifacts = new TreeSet<>();\n        artifacts.add(dependencyArtifact);\n\n        when(mavenProject.getArtifacts()).thenReturn(artifacts);\n\n        when(mavenProject.getArtifact().getFile()).thenReturn(file);\n\n        Build build = new Build();\n        build.setOutputDirectory(outputDirectory.toString());\n\n        List<String> classpath = new ArrayList<>();\n        classpath.add(outputDirectory.toString());\n        if (file != null) {\n            classpath.add(file.toString());\n        }\n        classpath.addAll(Arrays.asList(classPathElements));\n        when(mavenProject.getBuild()).thenReturn(build);\n        try {\n            when(mavenProject.getRuntimeClasspathElements()).thenReturn(classpath);\n        } catch (DependencyResolutionRequiredException e) {\n            fail(\"Encountered unexpected exception: \" + e.getClass().getSimpleName() + \": \" + e.getMessage());\n        }\n\n        return mavenProject;\n    }\n\n    @Test\n    public void finsishedShouldProduceMessageForClassesTotalNonZero() {\n        MinijarFilter m = new MinijarFilter(1, 50, log);\n\n        m.finished();\n\n        verify(log).info(logCaptor.capture());\n\n        assertEquals(\"Minimized 51 -> 1 (1%)\", logCaptor.getValue());\n    }\n\n    @Test\n    public void finishedShouldProduceMessageForClassesTotalZero() {\n        MinijarFilter m = new MinijarFilter(0, 0, log);\n\n        m.finished();\n\n        verify(log).info(logCaptor.capture());\n\n        assertEquals(\"Minimized 0 -> 0\", logCaptor.getValue());\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/filter/SimpleFilterTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.filter;\n\nimport java.util.Collections;\n\nimport org.apache.maven.plugins.shade.mojo.ArchiveFilter;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.when;\n\n/**\n * @author Benjamin Bentmann\n */\npublic class SimpleFilterTest {\n\n    @Test\n    public void testIsFiltered() {\n        SimpleFilter filter;\n\n        filter = new SimpleFilter(null, null, null);\n        assertFalse(filter.isFiltered(\"a.properties\"));\n        assertFalse(filter.isFiltered(\"org/Test.class\"));\n\n        filter = new SimpleFilter(null, Collections.<String>emptySet(), Collections.<String>emptySet());\n        assertFalse(filter.isFiltered(\"a.properties\"));\n        assertFalse(filter.isFiltered(\"org/Test.class\"));\n\n        filter = new SimpleFilter(null, Collections.singleton(\"org/Test.class\"), Collections.<String>emptySet());\n        assertTrue(filter.isFiltered(\"a.properties\"));\n        assertFalse(filter.isFiltered(\"org/Test.class\"));\n        assertTrue(filter.isFiltered(\"org/Test.properties\"));\n\n        filter = new SimpleFilter(null, Collections.<String>emptySet(), Collections.singleton(\"org/Test.class\"));\n        assertFalse(filter.isFiltered(\"a.properties\"));\n        assertTrue(filter.isFiltered(\"org/Test.class\"));\n        assertFalse(filter.isFiltered(\"org/Test.properties\"));\n\n        filter = new SimpleFilter(null, Collections.singleton(\"**/a.properties\"), Collections.<String>emptySet());\n        assertFalse(filter.isFiltered(\"a.properties\"));\n        assertFalse(filter.isFiltered(\"org/a.properties\"));\n        assertFalse(filter.isFiltered(\"org/maven/a.properties\"));\n        assertTrue(filter.isFiltered(\"org/maven/a.class\"));\n\n        filter = new SimpleFilter(null, Collections.<String>emptySet(), Collections.singleton(\"org/*\"));\n        assertFalse(filter.isFiltered(\"Test.class\"));\n        assertTrue(filter.isFiltered(\"org/Test.class\"));\n        assertFalse(filter.isFiltered(\"org/apache/Test.class\"));\n\n        filter = new SimpleFilter(null, Collections.<String>emptySet(), Collections.singleton(\"org/**\"));\n        assertFalse(filter.isFiltered(\"Test.class\"));\n        assertTrue(filter.isFiltered(\"org/Test.class\"));\n        assertTrue(filter.isFiltered(\"org/apache/Test.class\"));\n\n        filter = new SimpleFilter(null, Collections.<String>emptySet(), Collections.singleton(\"org/\"));\n        assertFalse(filter.isFiltered(\"Test.class\"));\n        assertTrue(filter.isFiltered(\"org/Test.class\"));\n        assertTrue(filter.isFiltered(\"org/apache/Test.class\"));\n\n        // given defaults shall be excluded and a specific include is given when filtering then only specific file must\n        // be included\n        final ArchiveFilter archiveFilter = mock(ArchiveFilter.class);\n        when(archiveFilter.getIncludes()).thenReturn(Collections.singleton(\"specific include\"));\n        when(archiveFilter.getExcludes()).thenReturn(Collections.<String>emptySet());\n        when(archiveFilter.getExcludeDefaults()).thenReturn(true);\n        filter = new SimpleFilter(null, archiveFilter);\n        assertFalse(filter.isFiltered(\"specific include\"));\n        assertTrue(filter.isFiltered(\"some other file matched by default include\"));\n\n        // given defaults shall be included and a specific include is given when filtering then all files must be\n        // included\n        when(archiveFilter.getExcludeDefaults()).thenReturn(false);\n        filter = new SimpleFilter(null, archiveFilter);\n        assertFalse(filter.isFiltered(\"specific include\"));\n        assertFalse(filter.isFiltered(\"some other file matched by default include\"));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/mojo/ArtifactIdTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * @author Benjamin Bentmann\n */\npublic class ArtifactIdTest {\n\n    @Test\n    public void testIdParsing() {\n        ArtifactId id;\n\n        id = new ArtifactId((String) null);\n        assertEquals(\"\", id.getGroupId());\n\n        id = new ArtifactId(\"\");\n        assertEquals(\"\", id.getGroupId());\n\n        id = new ArtifactId(\"gid\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"*\", id.getArtifactId());\n        assertEquals(\"*\", id.getType());\n        assertEquals(\"*\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"\", id.getArtifactId());\n        assertEquals(\"*\", id.getType());\n        assertEquals(\"*\", id.getClassifier());\n\n        id = new ArtifactId(\":aid\");\n        assertEquals(\"\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"*\", id.getType());\n        assertEquals(\"*\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:aid\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"*\", id.getType());\n        assertEquals(\"*\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:aid:\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"*\", id.getType());\n        assertEquals(\"\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:aid:cls\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"*\", id.getType());\n        assertEquals(\"cls\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:aid:type:cls\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"type\", id.getType());\n        assertEquals(\"cls\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:aid::cls\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"\", id.getType());\n        assertEquals(\"cls\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:aid::\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"\", id.getType());\n        assertEquals(\"\", id.getClassifier());\n\n        id = new ArtifactId(\"*:aid:type:cls\");\n        assertEquals(\"*\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"type\", id.getType());\n        assertEquals(\"cls\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:*:type:cls\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"*\", id.getArtifactId());\n        assertEquals(\"type\", id.getType());\n        assertEquals(\"cls\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:aid:*:cls\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"*\", id.getType());\n        assertEquals(\"cls\", id.getClassifier());\n\n        id = new ArtifactId(\"gid:aid:type:*\");\n        assertEquals(\"gid\", id.getGroupId());\n        assertEquals(\"aid\", id.getArtifactId());\n        assertEquals(\"type\", id.getType());\n        assertEquals(\"*\", id.getClassifier());\n    }\n\n    @Test\n    public void testMatches() {\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:aid:type:cls\")));\n        assertFalse(new ArtifactId(\"Gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:aid:type:cls\")));\n        assertFalse(new ArtifactId(\"gid\", \"Aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:aid:type:cls\")));\n        assertFalse(new ArtifactId(\"gid\", \"aid\", \"Type\", \"cls\").matches(new ArtifactId(\"gid:aid:type:cls\")));\n        assertFalse(new ArtifactId(\"gid\", \"aid\", \"type\", \"Cls\").matches(new ArtifactId(\"gid:aid:type:cls\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"any\", \"cls\").matches(new ArtifactId(\"gid:aid:cls\")));\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:aid:cls\")));\n        assertFalse(new ArtifactId(\"id\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:aid:cls\")));\n        assertFalse(new ArtifactId(\"gid\", \"id\", \"type\", \"cls\").matches(new ArtifactId(\"gid:aid:cls\")));\n        assertFalse(new ArtifactId(\"gid\", \"id\", \"type\", \"ls\").matches(new ArtifactId(\"gid:aid:cls\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"\").matches(new ArtifactId(\"gid:aid\")));\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"any\", \"tests\").matches(new ArtifactId(\"gid:aid\")));\n        assertFalse(new ArtifactId(\"id\", \"aid\", \"type\", \"\").matches(new ArtifactId(\"gid:aid\")));\n        assertFalse(new ArtifactId(\"gid\", \"id\", \"type\", \"\").matches(new ArtifactId(\"gid:aid\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"\").matches(new ArtifactId(\"gid\")));\n        assertTrue(new ArtifactId(\"gid\", \"id\", \"any\", \"any\").matches(new ArtifactId(\"gid\")));\n        assertFalse(new ArtifactId(\"id\", \"aid\", \"type\", \"\").matches(new ArtifactId(\"gid\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"*:aid:type:cls\")));\n        assertTrue(new ArtifactId(\"any\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"*:aid:type:cls\")));\n        assertFalse(new ArtifactId(\"any\", \"id\", \"type\", \"cls\").matches(new ArtifactId(\"*:aid:type:cls\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:*:type:cls\")));\n        assertTrue(new ArtifactId(\"gid\", \"any\", \"type\", \"cls\").matches(new ArtifactId(\"gid:*:type:cls\")));\n        assertFalse(new ArtifactId(\"id\", \"any\", \"type\", \"cls\").matches(new ArtifactId(\"gid:*:type:cls\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:aid:*:cls\")));\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"any\", \"cls\").matches(new ArtifactId(\"gid:aid:*:cls\")));\n        assertFalse(new ArtifactId(\"id\", \"aid\", \"any\", \"cls\").matches(new ArtifactId(\"gid:aid:*:cls\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:aid:type:*\")));\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"any\").matches(new ArtifactId(\"gid:aid:type:*\")));\n        assertFalse(new ArtifactId(\"id\", \"aid\", \"type\", \"any\").matches(new ArtifactId(\"gid:aid:type:*\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:a*d\")));\n        assertTrue(new ArtifactId(\"gid\", \"ad\", \"type\", \"cls\").matches(new ArtifactId(\"gid:a*d\")));\n        assertTrue(new ArtifactId(\"gid\", \"a---d\", \"type\", \"cls\").matches(new ArtifactId(\"gid:a*d\")));\n\n        assertTrue(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\").matches(new ArtifactId(\"gid:a?d\")));\n        assertTrue(new ArtifactId(\"gid\", \"a-d\", \"type\", \"cls\").matches(new ArtifactId(\"gid:a?d\")));\n        assertFalse(new ArtifactId(\"gid\", \"ad\", \"type\", \"cls\").matches(new ArtifactId(\"gid:a?d\")));\n        assertFalse(new ArtifactId(\"gid\", \"a---d\", \"type\", \"cls\").matches(new ArtifactId(\"gid:a?d\")));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/mojo/ArtifactSelectorTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport java.util.Collection;\nimport java.util.Collections;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * @author Benjamin Bentmann\n */\npublic class ArtifactSelectorTest {\n\n    private ArtifactSelector newSelector(Collection<String> includes, Collection<String> excludes, String groupPrefix) {\n        return new ArtifactSelector(includes, excludes, groupPrefix);\n    }\n\n    @Test\n    public void testIsSelected() {\n        ArtifactSelector selector;\n\n        selector = newSelector(null, null, null);\n        assertTrue(selector.isSelected(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\")));\n\n        selector = newSelector(null, null, \"\");\n        assertTrue(selector.isSelected(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\")));\n\n        selector = newSelector(null, null, \"gid\");\n        assertTrue(selector.isSelected(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\")));\n        assertTrue(selector.isSelected(new ArtifactId(\"gid.test\", \"aid\", \"type\", \"cls\")));\n        assertFalse(selector.isSelected(new ArtifactId(\"id\", \"aid\", \"type\", \"cls\")));\n\n        selector = newSelector(Collections.<String>emptySet(), Collections.<String>emptySet(), null);\n        assertTrue(selector.isSelected(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\")));\n\n        selector = newSelector(Collections.singleton(\"gid:aid\"), Collections.<String>emptySet(), null);\n        assertTrue(selector.isSelected(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\")));\n        assertFalse(selector.isSelected(new ArtifactId(\"gid\", \"id\", \"type\", \"cls\")));\n\n        selector = newSelector(Collections.<String>emptySet(), Collections.singleton(\"gid:aid\"), null);\n        assertFalse(selector.isSelected(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\")));\n        assertTrue(selector.isSelected(new ArtifactId(\"gid\", \"id\", \"type\", \"cls\")));\n\n        selector = newSelector(Collections.singleton(\"gid:*\"), Collections.singleton(\"*:aid\"), null);\n        assertTrue(selector.isSelected(new ArtifactId(\"gid\", \"id\", \"type\", \"cls\")));\n        assertFalse(selector.isSelected(new ArtifactId(\"gid\", \"aid\", \"type\", \"cls\")));\n        assertFalse(selector.isSelected(new ArtifactId(\"gid.test\", \"id\", \"type\", \"cls\")));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/mojo/RelativizePathTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport java.io.File;\nimport java.io.IOException;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\npublic class RelativizePathTest {\n    static final String[] PARENTS = {\n        \"rel-path-test-files/a/pom\",\n        \"rel-path-test-files/a/b/pom\",\n        \"rel-path-test-files/a/b/c/pom\",\n        \"rel-path-test-files/a/c/d/pom\"\n    };\n\n    static final String[] CHILDREN = {\n        \"rel-path-test-files/a/b/pom\",\n        \"rel-path-test-files/a/pom\",\n        \"rel-path-test-files/a/b/c1/pom\",\n        \"rel-path-test-files/a/c/d/pom\"\n    };\n\n    static final String[] ANSWER = {\"../pom\", \"b/pom\", \"../c/pom\", \"pom\"};\n\n    @Test\n    public void runTests() throws IOException {\n        for (int x = 0; x < PARENTS.length; x++) {\n            File parent = new File(PARENTS[x]).getCanonicalFile();\n            File child = new File(CHILDREN[x]).getCanonicalFile();\n            String answer = ANSWER[x];\n            String r = RelativizePath.convertToRelativePath(parent, child);\n            assertEquals(String.format(\"parent %s child %s\", parent.toString(), child.toString()), answer, r);\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/mojo/ShadeMojoTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.mojo;\n\nimport java.io.File;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Method;\nimport java.net.URL;\nimport java.net.URLClassLoader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Set;\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.artifact.DefaultArtifact;\nimport org.apache.maven.artifact.handler.ArtifactHandler;\nimport org.apache.maven.artifact.versioning.VersionRange;\nimport org.apache.maven.execution.MavenExecutionRequest;\nimport org.apache.maven.execution.MavenExecutionResult;\nimport org.apache.maven.execution.MavenSession;\nimport org.apache.maven.plugin.testing.AbstractMojoTestCase;\nimport org.apache.maven.plugins.shade.ShadeRequest;\nimport org.apache.maven.plugins.shade.Shader;\nimport org.apache.maven.plugins.shade.filter.Filter;\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.relocation.SimpleRelocator;\nimport org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer;\nimport org.apache.maven.plugins.shade.resource.ManifestResourceTransformer;\nimport org.apache.maven.plugins.shade.resource.ResourceTransformer;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.repository.internal.MavenRepositorySystemUtils;\nimport org.codehaus.plexus.ContainerConfiguration;\nimport org.codehaus.plexus.PlexusConstants;\nimport org.eclipse.aether.DefaultRepositorySystemSession;\nimport org.eclipse.aether.RepositorySystem;\nimport org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;\nimport org.eclipse.aether.repository.LocalRepository;\nimport org.eclipse.aether.resolution.ArtifactRequest;\nimport org.eclipse.aether.resolution.ArtifactResult;\n\nimport static java.util.Arrays.asList;\nimport static java.util.Collections.singletonList;\nimport static org.mockito.ArgumentMatchers.any;\nimport static org.mockito.ArgumentMatchers.eq;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.when;\n\n/**\n * @author Jason van Zyl\n * @author Mauro Talevi\n */\npublic class ShadeMojoTest extends AbstractMojoTestCase {\n    @Override\n    protected void customizeContainerConfiguration(final ContainerConfiguration configuration) {\n        configuration.setClassPathScanning(PlexusConstants.SCANNING_INDEX);\n    }\n\n    public void testManifestTransformerSelection() throws Exception {\n        final ShadeMojo mojo = new ShadeMojo();\n        final Method m = ShadeMojo.class.getDeclaredMethod(\"toResourceTransformers\", String.class, List.class);\n        m.setAccessible(true);\n\n        final ManifestResourceTransformer defaultTfr = new ManifestResourceTransformer() {\n            @Override\n            public String toString() // when test fails junit does a toString so easier to read errors this way\n                    {\n                return \"default\";\n            }\n        };\n        final ManifestResourceTransformer testsTfr1 = new ManifestResourceTransformer() {\n            @Override\n            public String toString() {\n                return \"t1\";\n            }\n        };\n        testsTfr1.setForShade(\"tests\");\n        final ManifestResourceTransformer testsTfr2 = new ManifestResourceTransformer() {\n            @Override\n            public String toString() {\n                return \"t2\";\n            }\n        };\n        testsTfr2.setForShade(\"tests\");\n\n        assertEquals(singletonList(defaultTfr), m.invoke(mojo, \"jar\", asList(defaultTfr, testsTfr1, testsTfr2)));\n        assertEquals(asList(testsTfr1, testsTfr2), m.invoke(mojo, \"tests\", asList(defaultTfr, testsTfr1, testsTfr2)));\n        assertEquals(asList(testsTfr1, testsTfr2), m.invoke(mojo, \"tests\", asList(testsTfr1, defaultTfr, testsTfr2)));\n        assertEquals(asList(testsTfr1, testsTfr2), m.invoke(mojo, \"tests\", asList(testsTfr1, testsTfr2, defaultTfr)));\n    }\n\n    public void testShaderWithDefaultShadedPattern() throws Exception {\n        shaderWithPattern(null, new File(\"target/foo-default.jar\"));\n    }\n\n    public void testShaderWithCustomShadedPattern() throws Exception {\n        shaderWithPattern(\"org/shaded/plexus/util\", new File(\"target/foo-custom.jar\"));\n    }\n\n    public void testShaderWithExclusions() throws Exception {\n        File jarFile = new File(getBasedir(), \"target/unit/foo-bar.jar\");\n\n        Shader s = lookup(Shader.class);\n\n        Set<File> set = new LinkedHashSet<>();\n        set.add(new File(getBasedir(), \"src/test/jars/test-artifact-1.0-SNAPSHOT.jar\"));\n\n        List<Relocator> relocators = new ArrayList<>();\n        relocators.add(new SimpleRelocator(\n                \"org.codehaus.plexus.util\",\n                \"hidden\",\n                null,\n                Arrays.asList(\"org.codehaus.plexus.util.xml.Xpp3Dom\", \"org.codehaus.plexus.util.xml.pull.*\")));\n\n        List<ResourceTransformer> resourceTransformers = new ArrayList<>();\n\n        List<Filter> filters = new ArrayList<>();\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(set);\n        shadeRequest.setUberJar(jarFile);\n        shadeRequest.setFilters(filters);\n        shadeRequest.setRelocators(relocators);\n        shadeRequest.setResourceTransformers(resourceTransformers);\n\n        s.shade(shadeRequest);\n\n        try (URLClassLoader cl = new URLClassLoader(new URL[] {jarFile.toURI().toURL()})) {\n            Class<?> c = cl.loadClass(\"org.apache.maven.plugins.shade.Lib\");\n\n            Field field = c.getDeclaredField(\"CLASS_REALM_PACKAGE_IMPORT\");\n            assertEquals(\"org.codehaus.plexus.util.xml.pull\", field.get(null));\n\n            Method method = c.getDeclaredMethod(\"getClassRealmPackageImport\");\n            assertEquals(\"org.codehaus.plexus.util.xml.pull\", method.invoke(null));\n        }\n    }\n\n    /**\n     * Tests if a Filter is installed correctly, also if createSourcesJar is set to true.\n     *\n     * @throws Exception\n     */\n    public void testShadeWithFilter() throws Exception {\n        // create and configure MavenProject\n        MavenProject project = new MavenProject();\n        ArtifactHandler artifactHandler = lookup(ArtifactHandler.class);\n        Artifact artifact = new DefaultArtifact(\n                \"org.apache.myfaces.core\",\n                \"myfaces-impl\",\n                VersionRange.createFromVersion(\"2.0.1-SNAPSHOT\"),\n                \"compile\",\n                \"jar\",\n                null,\n                artifactHandler);\n        artifact.setFile(new File(\"myfaces-impl-2.0.1-SNAPSHOT.jar\"));\n        project.setArtifact(artifact);\n\n        ShadeMojo mojo = (ShadeMojo) lookupConfiguredMojo(project, \"shade\");\n\n        DefaultRepositorySystemSession repositorySystemSession = MavenRepositorySystemUtils.newSession();\n        repositorySystemSession.setLocalRepositoryManager(new SimpleLocalRepositoryManagerFactory()\n                .newInstance(repositorySystemSession, new LocalRepository(new File(\"target/local-repo/\"))));\n        MavenSession mavenSession = new MavenSession(\n                getContainer(),\n                repositorySystemSession,\n                mock(MavenExecutionRequest.class),\n                mock(MavenExecutionResult.class));\n\n        setVariableValueToObject(mojo, \"session\", mavenSession);\n\n        // set createSourcesJar = true\n        setVariableValueToObject(mojo, \"createSourcesJar\", true);\n\n        RepositorySystem repositorySystem = mock(RepositorySystem.class);\n        setVariableValueToObject(mojo, \"repositorySystem\", repositorySystem);\n\n        ArtifactResult artifactResult = new ArtifactResult(\n                new ArtifactRequest(mock(org.eclipse.aether.artifact.Artifact.class), Collections.emptyList(), \"\"));\n        org.eclipse.aether.artifact.Artifact result = new org.eclipse.aether.artifact.DefaultArtifact(\n                        \"org.apache.myfaces.core:myfaces-impl:jar:sources:2.0.1-SNAPSHOT\")\n                .setFile(new File(\"myfaces-impl-2.0.1-SNAPSHOT-sources.jar\"));\n        artifactResult.setArtifact(result);\n        when(repositorySystem.resolveArtifact(eq(mavenSession.getRepositorySession()), any(ArtifactRequest.class)))\n                .thenReturn(artifactResult);\n\n        // create and configure the ArchiveFilter\n        ArchiveFilter archiveFilter = new ArchiveFilter();\n        Field archiveFilterArtifact = ArchiveFilter.class.getDeclaredField(\"artifact\");\n        archiveFilterArtifact.setAccessible(true);\n        archiveFilterArtifact.set(archiveFilter, \"org.apache.myfaces.core:myfaces-impl\");\n\n        // add ArchiveFilter to mojo\n        Field filtersField = ShadeMojo.class.getDeclaredField(\"filters\");\n        filtersField.setAccessible(true);\n        filtersField.set(mojo, new ArchiveFilter[] {archiveFilter});\n\n        // invoke getFilters()\n        Method getFilters = ShadeMojo.class.getDeclaredMethod(\"getFilters\", List.class);\n        getFilters.setAccessible(true);\n        List<Filter> filters = (List<Filter>) getFilters.invoke(mojo, Collections.emptyList());\n\n        // assertions - there must be one filter\n        assertEquals(1, filters.size());\n\n        // the filter must be able to filter the binary and the sources jar\n        Filter filter = filters.get(0);\n        assertTrue(filter.canFilter(new File(\"myfaces-impl-2.0.1-SNAPSHOT.jar\"))); // binary jar\n        assertTrue(filter.canFilter(new File(\"myfaces-impl-2.0.1-SNAPSHOT-sources.jar\"))); // sources jar\n    }\n\n    public void shaderWithPattern(String shadedPattern, File jar) throws Exception {\n        Shader s = lookup(Shader.class);\n\n        Set<File> set = new LinkedHashSet<>();\n\n        set.add(new File(getBasedir(), \"src/test/jars/test-project-1.0-SNAPSHOT.jar\"));\n\n        set.add(new File(getBasedir(), \"src/test/jars/plexus-utils-1.4.1.jar\"));\n\n        List<Relocator> relocators = new ArrayList<>();\n\n        relocators.add(new SimpleRelocator(\n                \"org/codehaus/plexus/util\",\n                shadedPattern,\n                null,\n                Arrays.asList(\"org/codehaus/plexus/util/xml/Xpp3Dom\", \"org/codehaus/plexus/util/xml/pull.*\")));\n\n        List<ResourceTransformer> resourceTransformers = new ArrayList<>();\n\n        resourceTransformers.add(new ComponentsXmlResourceTransformer());\n\n        List<Filter> filters = new ArrayList<>();\n\n        ShadeRequest shadeRequest = new ShadeRequest();\n        shadeRequest.setJars(set);\n        shadeRequest.setUberJar(jar);\n        shadeRequest.setFilters(filters);\n        shadeRequest.setRelocators(relocators);\n        shadeRequest.setResourceTransformers(resourceTransformers);\n\n        s.shade(shadeRequest);\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/relocation/SimpleRelocatorParameterTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.relocation;\n\nimport java.util.Collections;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.fail;\n\npublic class SimpleRelocatorParameterTest {\n\n    @Test\n    public void testThatNullShadedPatternInConstructorShouldNotThrowNullPointerException() {\n        constructThenFailOnNullPointerException(\"\", null);\n    }\n\n    private void constructThenFailOnNullPointerException(String pattern, String shadedPattern) {\n        try {\n            new SimpleRelocator(\n                    pattern, shadedPattern, Collections.<String>emptyList(), Collections.<String>emptyList());\n        } catch (NullPointerException e) {\n            fail(\"Constructor should not throw null pointer exceptions\");\n        }\n        // any other exception leads to test failure as well\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/relocation/SimpleRelocatorTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.relocation;\n\nimport java.util.Arrays;\nimport java.util.Collections;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * Test for {@link SimpleRelocator}.\n *\n * @author Benjamin Bentmann\n *\n */\npublic class SimpleRelocatorTest {\n\n    @Test\n    public void testNoNpeRelocateClass() {\n        new SimpleRelocator(\"foo\", \"bar\", null, null, true).relocateClass(\"foo\");\n    }\n\n    @Test\n    public void testCanRelocatePath() {\n        SimpleRelocator relocator;\n\n        relocator = new SimpleRelocator(\"org.foo\", null, null, null);\n        assertTrue(relocator.canRelocatePath(\"org/foo/Class\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/Class.class\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/bar/Class\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/bar/Class.class\"));\n        assertFalse(relocator.canRelocatePath(\"com/foo/bar/Class\"));\n        assertFalse(relocator.canRelocatePath(\"com/foo/bar/Class.class\"));\n        assertFalse(relocator.canRelocatePath(\"org/Foo/Class\"));\n        assertFalse(relocator.canRelocatePath(\"org/Foo/Class.class\"));\n\n        relocator = new SimpleRelocator(\n                \"org.foo\", null, null, Arrays.asList(\"org.foo.Excluded\", \"org.foo.public.*\", \"org.foo.Public*Stuff\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/Class\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/Class.class\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/excluded\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/Excluded\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/Excluded.class\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/public\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/public/Class\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/public/Class.class\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/publicRELOC/Class\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/PrivateStuff\"));\n        assertTrue(relocator.canRelocatePath(\"org/foo/PrivateStuff.class\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/PublicStuff\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/PublicStuff.class\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/PublicUtilStuff\"));\n        assertFalse(relocator.canRelocatePath(\"org/foo/PublicUtilStuff.class\"));\n    }\n\n    @Test\n    public void testCanRelocateClass() {\n        SimpleRelocator relocator;\n\n        relocator = new SimpleRelocator(\"org.foo\", null, null, null);\n        assertTrue(relocator.canRelocateClass(\"org.foo.Class\"));\n        assertTrue(relocator.canRelocateClass(\"org.foo.bar.Class\"));\n        assertFalse(relocator.canRelocateClass(\"com.foo.bar.Class\"));\n        assertFalse(relocator.canRelocateClass(\"org.Foo.Class\"));\n\n        relocator = new SimpleRelocator(\n                \"org.foo\", null, null, Arrays.asList(\"org.foo.Excluded\", \"org.foo.public.*\", \"org.foo.Public*Stuff\"));\n        assertTrue(relocator.canRelocateClass(\"org.foo.Class\"));\n        assertTrue(relocator.canRelocateClass(\"org.foo.excluded\"));\n        assertFalse(relocator.canRelocateClass(\"org.foo.Excluded\"));\n        assertFalse(relocator.canRelocateClass(\"org.foo.public\"));\n        assertFalse(relocator.canRelocateClass(\"org.foo.public.Class\"));\n        assertTrue(relocator.canRelocateClass(\"org.foo.publicRELOC.Class\"));\n        assertTrue(relocator.canRelocateClass(\"org.foo.PrivateStuff\"));\n        assertFalse(relocator.canRelocateClass(\"org.foo.PublicStuff\"));\n        assertFalse(relocator.canRelocateClass(\"org.foo.PublicUtilStuff\"));\n    }\n\n    @Test\n    public void testCanRelocateRawString() {\n        SimpleRelocator relocator;\n\n        relocator = new SimpleRelocator(\"org/foo\", null, null, null, true);\n        assertTrue(relocator.canRelocatePath(\"(I)org/foo/bar/Class;\"));\n\n        relocator = new SimpleRelocator(\"^META-INF/org.foo.xml$\", null, null, null, true);\n        assertTrue(relocator.canRelocatePath(\"META-INF/org.foo.xml\"));\n    }\n\n    // MSHADE-119, make sure that the easy part of this works.\n    @Test\n    public void testCanRelocateAbsClassPath() {\n        SimpleRelocator relocator = new SimpleRelocator(\"org.apache.velocity\", \"org.apache.momentum\", null, null);\n        assertEquals(\n                \"/org/apache/momentum/mass.properties\", relocator.relocatePath(\"/org/apache/velocity/mass.properties\"));\n    }\n\n    @Test\n    public void testCanRelocateAbsClassPathWithExcludes() {\n        SimpleRelocator relocator = new SimpleRelocator(\n                \"org/apache/velocity\", \"org/apache/momentum\", null, Arrays.asList(\"org/apache/velocity/excluded/*\"));\n        assertTrue(relocator.canRelocatePath(\"/org/apache/velocity/mass.properties\"));\n        assertTrue(relocator.canRelocatePath(\"org/apache/velocity/mass.properties\"));\n        assertFalse(relocator.canRelocatePath(\"/org/apache/velocity/excluded/mass.properties\"));\n        assertFalse(relocator.canRelocatePath(\"org/apache/velocity/excluded/mass.properties\"));\n    }\n\n    @Test\n    public void testCanRelocateAbsClassPathWithIncludes() {\n        SimpleRelocator relocator = new SimpleRelocator(\n                \"org/apache/velocity\", \"org/apache/momentum\", Arrays.asList(\"org/apache/velocity/included/*\"), null);\n        assertFalse(relocator.canRelocatePath(\"/org/apache/velocity/mass.properties\"));\n        assertFalse(relocator.canRelocatePath(\"org/apache/velocity/mass.properties\"));\n        assertTrue(relocator.canRelocatePath(\"/org/apache/velocity/included/mass.properties\"));\n        assertTrue(relocator.canRelocatePath(\"org/apache/velocity/included/mass.properties\"));\n    }\n\n    @Test\n    public void testRelocatePath() {\n        SimpleRelocator relocator;\n\n        relocator = new SimpleRelocator(\"org.foo\", null, null, null);\n        assertEquals(\"hidden/org/foo/bar/Class.class\", relocator.relocatePath(\"org/foo/bar/Class.class\"));\n\n        relocator = new SimpleRelocator(\"org.foo\", \"private.stuff\", null, null);\n        assertEquals(\"private/stuff/bar/Class.class\", relocator.relocatePath(\"org/foo/bar/Class.class\"));\n    }\n\n    @Test\n    public void testRelocateClass() {\n        SimpleRelocator relocator;\n\n        relocator = new SimpleRelocator(\"org.foo\", null, null, null);\n        assertEquals(\"hidden.org.foo.bar.Class\", relocator.relocateClass(\"org.foo.bar.Class\"));\n\n        relocator = new SimpleRelocator(\"org.foo\", \"private.stuff\", null, null);\n        assertEquals(\"private.stuff.bar.Class\", relocator.relocateClass(\"org.foo.bar.Class\"));\n        // make sure that \".\" does not match \"x\" in \"orgxfoo.bar.Class\"\n        assertEquals(\"orgxfoo.bar.Class\", relocator.relocateClass(\"orgxfoo.bar.Class\"));\n    }\n\n    @Test\n    public void testRelocateAllClasses() {\n        SimpleRelocator relocator;\n\n        relocator = new SimpleRelocator(\"org.foo\", null, null, null);\n        assertEquals(\n                \"hidden.org.foo.bar.Class, hidden.hidden.org.foo.bar.Class and hidden.org.foo.bar.Class\",\n                relocator.relocateAllClasses(\"org.foo.bar.Class, hidden.org.foo.bar.Class and org.foo.bar.Class\"));\n\n        relocator = new SimpleRelocator(\"org.foo\", \"private.stuff\", null, null);\n        assertEquals(\n                \"private.stuff.bar.Class, private.stuff.bar.Class and private.stuff.bar.Class\",\n                relocator.relocateAllClasses(\"org.foo.bar.Class, private.stuff.bar.Class and org.foo.bar.Class\"));\n        // make sure that \".\" does not match \"x\" in \"orgxfoo.bar.Class\"\n        assertEquals(\"orgxfoo.bar.Class\", relocator.relocateClass(\"orgxfoo.bar.Class\"));\n    }\n\n    @Test\n    public void testRelocateRawString() {\n        SimpleRelocator relocator;\n\n        relocator = new SimpleRelocator(\"Lorg/foo\", \"Lhidden/org/foo\", null, null, true);\n        assertEquals(\"(I)Lhidden/org/foo/bar/Class;\", relocator.relocatePath(\"(I)Lorg/foo/bar/Class;\"));\n\n        relocator = new SimpleRelocator(\"^META-INF/org.foo.xml$\", \"META-INF/hidden.org.foo.xml\", null, null, true);\n        assertEquals(\"META-INF/hidden.org.foo.xml\", relocator.relocatePath(\"META-INF/org.foo.xml\"));\n    }\n\n    @Test\n    public void testRelocateMavenFiles() {\n        SimpleRelocator relocator = new SimpleRelocator(\n                \"META-INF/maven\",\n                \"META-INF/shade/maven\",\n                null,\n                Collections.singletonList(\"META-INF/maven/com.foo.bar/artifactId/pom.*\"));\n        assertFalse(relocator.canRelocatePath(\"META-INF/maven/com.foo.bar/artifactId/pom.properties\"));\n        assertFalse(relocator.canRelocatePath(\"META-INF/maven/com.foo.bar/artifactId/pom.xml\"));\n        assertTrue(relocator.canRelocatePath(\"META-INF/maven/com/foo/bar/artifactId/pom.properties\"));\n        assertTrue(relocator.canRelocatePath(\"META-INF/maven/com/foo/bar/artifactId/pom.xml\"));\n        assertTrue(relocator.canRelocatePath(\"META-INF/maven/com-foo-bar/artifactId/pom.properties\"));\n        assertTrue(relocator.canRelocatePath(\"META-INF/maven/com-foo-bar/artifactId/pom.xml\"));\n    }\n\n    private static final String SOURCE_FILE = \"package org.apache.maven.hello;\\n\" + \"package org.objectweb.asm;\\n\"\n            + \"\\n\"\n            + \"import foo.bar.Bar;\\n\"\n            + \"import zot.baz.Baz;\\n\"\n            + \"import org.apache.maven.exclude1.Ex1;\\n\"\n            + \"import org.apache.maven.exclude1.a.b.Ex1AB;\\n\"\n            + \"import org.apache.maven.sub.exclude2.Ex2;\\n\"\n            + \"import org.apache.maven.sub.exclude2.c.d.Ex2CD;\\n\"\n            + \"import org.apache.maven.In;\\n\"\n            + \"import org.apache.maven.e.InE;\\n\"\n            + \"import org.apache.maven.f.g.InFG;\\n\"\n            + \"import java.io.IOException;\\n\"\n            + \"\\n\"\n            + \"/**\\n\"\n            + \" * Also check out {@link org.apache.maven.hello.OtherClass} and {@link\\n\"\n            + \" * org.apache.maven.hello.YetAnotherClass}\\n\"\n            + \" */\\n\"\n            + \"public class MyClass {\\n\"\n            + \"  private org.apache.maven.exclude1.x.X myX;\\n\"\n            + \"  private org.apache.maven.h.H h;\\n\"\n            + \"  private String ioInput;\\n\"\n            + \"\\n\"\n            + \"  /** Javadoc, followed by default visibility method with fully qualified return type */\\n\"\n            + \"  org.apache.maven.MyReturnType doSomething( org.apache.maven.Bar bar, org.objectweb.asm.sub.Something something) {\\n\"\n            + \"    org.apache.maven.Bar bar;\\n\"\n            + \"    org.objectweb.asm.sub.Something something;\\n\"\n            + \"    String io, val;\\n\"\n            + \"    String noRelocation = \\\"NoWordBoundaryXXXorg.apache.maven.In\\\";\\n\"\n            + \"    String relocationPackage = \\\"org.apache.maven.In\\\";\\n\"\n            + \"    String relocationPath = \\\"org/apache/maven/In\\\";\\n\"\n            + \"  }\\n\"\n            + \"}\\n\";\n\n    private static final String RELOCATED_FILE = \"package com.acme.maven.hello;\\n\" + \"package aj.org.objectweb.asm;\\n\"\n            + \"\\n\"\n            + \"import foo.bar.Bar;\\n\"\n            + \"import zot.baz.Baz;\\n\"\n            + \"import org.apache.maven.exclude1.Ex1;\\n\"\n            + \"import org.apache.maven.exclude1.a.b.Ex1AB;\\n\"\n            + \"import org.apache.maven.sub.exclude2.Ex2;\\n\"\n            + \"import org.apache.maven.sub.exclude2.c.d.Ex2CD;\\n\"\n            + \"import com.acme.maven.In;\\n\"\n            + \"import com.acme.maven.e.InE;\\n\"\n            + \"import com.acme.maven.f.g.InFG;\\n\"\n            + \"import java.io.IOException;\\n\"\n            + \"\\n\"\n            + \"/**\\n\"\n            + \" * Also check out {@link com.acme.maven.hello.OtherClass} and {@link\\n\"\n            + \" * com.acme.maven.hello.YetAnotherClass}\\n\"\n            + \" */\\n\"\n            + \"public class MyClass {\\n\"\n            + \"  private org.apache.maven.exclude1.x.X myX;\\n\"\n            + \"  private com.acme.maven.h.H h;\\n\"\n            + \"  private String ioInput;\\n\"\n            + \"\\n\"\n            + \"  /** Javadoc, followed by default visibility method with fully qualified return type */\\n\"\n            + \"  com.acme.maven.MyReturnType doSomething( com.acme.maven.Bar bar, aj.org.objectweb.asm.sub.Something something) {\\n\"\n            + \"    com.acme.maven.Bar bar;\\n\"\n            + \"    aj.org.objectweb.asm.sub.Something something;\\n\"\n            + \"    String io, val;\\n\"\n            + \"    String noRelocation = \\\"NoWordBoundaryXXXorg.apache.maven.In\\\";\\n\"\n            + \"    String relocationPackage = \\\"com.acme.maven.In\\\";\\n\"\n            + \"    String relocationPath = \\\"com/acme/maven/In\\\";\\n\"\n            + \"  }\\n\"\n            + \"}\\n\";\n\n    @Test\n    public void testRelocateSourceWithExcludesRaw() {\n        SimpleRelocator relocator = new SimpleRelocator(\n                \"org.apache.maven\",\n                \"com.acme.maven\",\n                Arrays.asList(\"foo.bar\", \"zot.baz\"),\n                Arrays.asList(\"irrelevant.exclude\", \"org.apache.maven.exclude1\", \"org.apache.maven.sub.exclude2\"),\n                true);\n        assertEquals(SOURCE_FILE, relocator.applyToSourceContent(SOURCE_FILE));\n    }\n\n    @Test\n    public void testRelocateSourceWithExcludes() {\n        // Main relocator with in-/excludes\n        SimpleRelocator relocator = new SimpleRelocator(\n                \"org.apache.maven\",\n                \"com.acme.maven\",\n                Arrays.asList(\"foo.bar\", \"zot.baz\"),\n                Arrays.asList(\"irrelevant.exclude\", \"org.apache.maven.exclude1\", \"org.apache.maven.sub.exclude2\"));\n        // Make sure not to replace variables 'io' and 'ioInput', package 'java.io'\n        SimpleRelocator ioRelocator = new SimpleRelocator(\"io\", \"shaded.io\", null, null);\n        // Check corner case which was not working in PR #100\n        SimpleRelocator asmRelocator = new SimpleRelocator(\"org.objectweb.asm\", \"aj.org.objectweb.asm\", null, null);\n        // Make sure not to replace 'foo' package by path-like 'shaded/foo'\n        SimpleRelocator fooRelocator = new SimpleRelocator(\"foo\", \"shaded.foo\", null, Arrays.asList(\"foo.bar\"));\n        assertEquals(\n                RELOCATED_FILE,\n                fooRelocator.applyToSourceContent(asmRelocator.applyToSourceContent(\n                        ioRelocator.applyToSourceContent(relocator.applyToSourceContent(SOURCE_FILE)))));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.util.Locale;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * Test for {@link ApacheLicenseResourceTransformer}.\n *\n * @author Benjamin Bentmann\n */\npublic class ApacheLicenseResourceTransformerTest {\n\n    private ApacheLicenseResourceTransformer transformer;\n\n    static {\n        /*\n         * NOTE: The Turkish locale has an usual case transformation for the letters \"I\" and \"i\", making it a prime\n         * choice to test for improper case-less string comparisions.\n         */\n        Locale.setDefault(new Locale(\"tr\"));\n    }\n\n    @Before\n    public void setUp() {\n        transformer = new ApacheLicenseResourceTransformer();\n    }\n\n    @Test\n    public void testCanTransformResource() {\n        assertTrue(transformer.canTransformResource(\"META-INF/LICENSE\"));\n        assertTrue(transformer.canTransformResource(\"META-INF/LICENSE.TXT\"));\n        assertTrue(transformer.canTransformResource(\"META-INF/LICENSE.md\"));\n        assertTrue(transformer.canTransformResource(\"META-INF/License.txt\"));\n        assertTrue(transformer.canTransformResource(\"META-INF/License.md\"));\n        assertFalse(transformer.canTransformResource(\"META-INF/MANIFEST.MF\"));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Locale;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\nimport static org.junit.Assert.fail;\n\n/**\n * Test for {@link ApacheNoticeResourceTransformer}.\n *\n * @author Benjamin Bentmann\n */\npublic class ApacheNoticeResourceTransformerTest {\n\n    private static final String NOTICE_RESOURCE = \"META-INF/NOTICE\";\n    private ApacheNoticeResourceTransformer transformer;\n\n    static {\n        /*\n         * NOTE: The Turkish locale has an usual case transformation for the letters \"I\" and \"i\", making it a prime\n         * choice to test for improper case-less string comparisions.\n         */\n        Locale.setDefault(new Locale(\"tr\"));\n    }\n\n    @Before\n    public void setUp() {\n        transformer = new ApacheNoticeResourceTransformer();\n    }\n\n    @Test\n    public void testCanTransformResource() {\n        assertTrue(transformer.canTransformResource(\"META-INF/NOTICE\"));\n        assertTrue(transformer.canTransformResource(\"META-INF/NOTICE.TXT\"));\n        assertTrue(transformer.canTransformResource(\"META-INF/NOTICE.md\"));\n        assertTrue(transformer.canTransformResource(\"META-INF/Notice.txt\"));\n        assertTrue(transformer.canTransformResource(\"META-INF/Notice.md\"));\n        assertFalse(transformer.canTransformResource(\"META-INF/MANIFEST.MF\"));\n    }\n\n    @Test\n    public void testNoParametersShouldNotThrowNullPointerWhenNoInput() throws IOException {\n        processAndFailOnNullPointer(\"\");\n    }\n\n    @Test\n    public void testNoParametersShouldNotThrowNullPointerWhenNoLinesOfInput() throws IOException {\n        processAndFailOnNullPointer(\"Some notice text\");\n    }\n\n    @Test\n    public void testNoParametersShouldNotThrowNullPointerWhenOneLineOfInput() throws IOException {\n        processAndFailOnNullPointer(\"Some notice text\\n\");\n    }\n\n    @Test\n    public void testNoParametersShouldNotThrowNullPointerWhenTwoLinesOfInput() throws IOException {\n        processAndFailOnNullPointer(\"Some notice text\\nSome notice text\\n\");\n    }\n\n    @Test\n    public void testNoParametersShouldNotThrowNullPointerWhenLineStartsWithSlashSlash() throws IOException {\n        processAndFailOnNullPointer(\"Some notice text\\n//Some notice text\\n\");\n    }\n\n    @Test\n    public void testNoParametersShouldNotThrowNullPointerWhenLineIsSlashSlash() throws IOException {\n        processAndFailOnNullPointer(\"//\\n\");\n    }\n\n    @Test\n    public void testNoParametersShouldNotThrowNullPointerWhenLineIsEmpty() throws IOException {\n        processAndFailOnNullPointer(\"\\n\");\n    }\n\n    private void processAndFailOnNullPointer(final String noticeText) throws IOException {\n        try {\n            final ByteArrayInputStream noticeInputStream = new ByteArrayInputStream(noticeText.getBytes());\n            final List<Relocator> emptyList = Collections.emptyList();\n            transformer.processResource(NOTICE_RESOURCE, noticeInputStream, emptyList, 0);\n            noticeInputStream.close();\n        } catch (NullPointerException e) {\n            fail(\"Null pointer should not be thrown when no parameters are set.\");\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/AppendingTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.util.Locale;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * Test for {@link AppendingTransformer}.\n *\n * @author Benjamin Bentmann\n */\npublic class AppendingTransformerTest {\n\n    private AppendingTransformer transformer;\n\n    static {\n        /*\n         * NOTE: The Turkish locale has an usual case transformation for the letters \"I\" and \"i\", making it a prime\n         * choice to test for improper case-less string comparisions.\n         */\n        Locale.setDefault(new Locale(\"tr\"));\n    }\n\n    @Before\n    public void setUp() {\n        transformer = new AppendingTransformer();\n    }\n\n    @Test\n    public void testCanTransformResource() {\n        transformer.resource = \"abcdefghijklmnopqrstuvwxyz\";\n\n        assertTrue(transformer.canTransformResource(\"abcdefghijklmnopqrstuvwxyz\"));\n        assertTrue(transformer.canTransformResource(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"));\n        assertFalse(transformer.canTransformResource(\"META-INF/MANIFEST.MF\"));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/ComponentsXmlResourceTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.InputStream;\nimport java.util.Collections;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.codehaus.plexus.util.IOUtil;\nimport org.custommonkey.xmlunit.Diff;\nimport org.custommonkey.xmlunit.XMLAssert;\nimport org.custommonkey.xmlunit.XMLUnit;\nimport org.junit.Before;\nimport org.junit.Test;\n\n/**\n * Test for {@link ComponentsXmlResourceTransformer}.\n *\n * @author Brett Porter\n *\n */\npublic class ComponentsXmlResourceTransformerTest {\n    private ComponentsXmlResourceTransformer transformer;\n\n    @Before\n    public void setUp() {\n        this.transformer = new ComponentsXmlResourceTransformer();\n    }\n\n    @Test\n    public void testConfigurationMerging() throws Exception {\n\n        XMLUnit.setNormalizeWhitespace(true);\n\n        InputStream resourceAsStream = getClass().getResourceAsStream(\"/components-1.xml\");\n        transformer.processResource(\"components-1.xml\", resourceAsStream, Collections.<Relocator>emptyList(), 0);\n        resourceAsStream.close();\n        InputStream resourceAsStream1 = getClass().getResourceAsStream(\"/components-2.xml\");\n        transformer.processResource(\"components-1.xml\", resourceAsStream1, Collections.<Relocator>emptyList(), 0);\n        resourceAsStream1.close();\n        final InputStream resourceAsStream2 = getClass().getResourceAsStream(\"/components-expected.xml\");\n        Diff diff = XMLUnit.compareXML(\n                IOUtil.toString(resourceAsStream2, \"UTF-8\"),\n                IOUtil.toString(transformer.getTransformedResource(), \"UTF-8\"));\n        // assertEquals( IOUtil.toString( getClass().getResourceAsStream( \"/components-expected.xml\" ), \"UTF-8\" ),\n        //              IOUtil.toString( transformer.getTransformedResource(), \"UTF-8\" ).replaceAll(\"\\r\\n\", \"\\n\") );\n        resourceAsStream2.close();\n        XMLAssert.assertXMLIdentical(diff, true);\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/GroovyResourceTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.InputStream;\nimport java.util.Collections;\nimport java.util.Properties;\nimport java.util.jar.JarFile;\nimport java.util.jar.JarOutputStream;\nimport java.util.zip.ZipEntry;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertNull;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * Test for {@link GroovyResourceTransformer}.\n *\n */\npublic class GroovyResourceTransformerTest {\n\n    private static InputStream stream(Properties props) throws Exception {\n        ByteArrayOutputStream baos = new ByteArrayOutputStream();\n        props.store(baos, null);\n        return new ByteArrayInputStream(baos.toByteArray());\n    }\n\n    private static InputStream module(\n            String name, String version, String extensionClasses, String staticExtensionClasses) throws Exception {\n        Properties desc = new Properties();\n        desc.setProperty(\"moduleName\", name);\n        desc.setProperty(\"moduleVersion\", version);\n        if (extensionClasses != null) {\n            desc.setProperty(\"extensionClasses\", extensionClasses);\n        }\n        if (staticExtensionClasses != null) {\n            desc.setProperty(\"staticExtensionClasses\", staticExtensionClasses);\n        }\n        return stream(desc);\n    }\n\n    private static Properties transform(GroovyResourceTransformer transformer) throws Exception {\n        File tempJar = File.createTempFile(\"shade.\", \".jar\");\n        tempJar.deleteOnExit();\n\n        try (FileOutputStream fos = new FileOutputStream(tempJar);\n                JarOutputStream jaos = new JarOutputStream(fos)) {\n            transformer.modifyOutputStream(jaos);\n        }\n\n        Properties desc = null;\n        try (JarFile jar = new JarFile(tempJar)) {\n            ZipEntry entry = jar.getEntry(GroovyResourceTransformer.EXT_MODULE_NAME);\n            if (entry != null) {\n                desc = new Properties();\n                desc.load(jar.getInputStream(entry));\n            }\n        }\n        return desc;\n    }\n\n    @Test\n    public void testFilter() {\n        GroovyResourceTransformer transformer = new GroovyResourceTransformer();\n        assertTrue(transformer.canTransformResource(GroovyResourceTransformer.EXT_MODULE_NAME));\n        assertTrue(transformer.canTransformResource(GroovyResourceTransformer.EXT_MODULE_NAME_LEGACY));\n        assertFalse(transformer.canTransformResource(\"somethingElse\"));\n        assertFalse(transformer.canTransformResource(JarFile.MANIFEST_NAME));\n    }\n\n    @Test\n    public void testEmpty() throws Exception {\n        GroovyResourceTransformer transformer = new GroovyResourceTransformer();\n        assertFalse(transformer.hasTransformedResource());\n        assertNull(transform(transformer));\n    }\n\n    @Test\n    public void testSpecifyModuleName() throws Exception {\n        GroovyResourceTransformer transformer = new GroovyResourceTransformer();\n        transformer.setExtModuleName(\"the-module-name\");\n        transformer.setExtModuleVersion(\"2.0\");\n        transformer.processResource(\n                GroovyResourceTransformer.EXT_MODULE_NAME,\n                module(\"mod1\", \"1.0\", \"some.ext\", \"some.staticExt\"),\n                Collections.<Relocator>emptyList(),\n                0);\n        Properties desc = transform(transformer);\n        assertEquals(\"the-module-name\", desc.getProperty(\"moduleName\"));\n        assertEquals(\"2.0\", desc.getProperty(\"moduleVersion\"));\n        assertEquals(\"some.ext\", desc.getProperty(\"extensionClasses\"));\n        assertEquals(\"some.staticExt\", desc.getProperty(\"staticExtensionClasses\"));\n    }\n\n    @Test\n    public void testConcatenation() throws Exception {\n        GroovyResourceTransformer transformer = new GroovyResourceTransformer();\n        transformer.processResource(\n                GroovyResourceTransformer.EXT_MODULE_NAME,\n                module(\"mod1\", \"1.0\", \"some.ext1\", null),\n                Collections.<Relocator>emptyList(),\n                0);\n        transformer.processResource(\n                GroovyResourceTransformer.EXT_MODULE_NAME,\n                module(\"mod2\", \"1.0\", null, \"some.staticExt1\"),\n                Collections.<Relocator>emptyList(),\n                0);\n        transformer.processResource(\n                GroovyResourceTransformer.EXT_MODULE_NAME,\n                module(\"mod3\", \"1.0\", \"\", \"\"),\n                Collections.<Relocator>emptyList(),\n                0);\n        transformer.processResource(\n                GroovyResourceTransformer.EXT_MODULE_NAME,\n                module(\"mod4\", \"1.0\", \"some.ext2\", \"some.staticExt2\"),\n                Collections.<Relocator>emptyList(),\n                0);\n        Properties desc = transform(transformer);\n        assertEquals(\"no-module-name\", desc.getProperty(\"moduleName\"));\n        assertEquals(\"1.0\", desc.getProperty(\"moduleVersion\"));\n        assertEquals(\"some.ext1,some.ext2\", desc.getProperty(\"extensionClasses\"));\n        assertEquals(\"some.staticExt1,some.staticExt2\", desc.getProperty(\"staticExtensionClasses\"));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/ManifestResourceTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.jar.Attributes;\nimport java.util.jar.JarFile;\nimport java.util.jar.JarInputStream;\nimport java.util.jar.JarOutputStream;\nimport java.util.jar.Manifest;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.relocation.SimpleRelocator;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\npublic class ManifestResourceTransformerTest {\n    private ManifestResourceTransformer transformer;\n\n    @Before\n    public void setUp() {\n        transformer = new ManifestResourceTransformer();\n    }\n\n    private Manifest createTestManifest() {\n        final Manifest manifest = new Manifest();\n        final Attributes attributes = manifest.getMainAttributes();\n        attributes.put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n        attributes.putValue(\n                \"Export-Package\",\n                \"javax.decorator;version=\\\"2.0\\\";uses:=\\\"javax.enterprise.inject\\\",\"\n                        + \"javax.enterprise.context;version=\\\"2.0\\\";uses:=\\\"javax.enterprise.util,javax.inject\\\"\");\n        attributes.putValue(\"Import-Package\", \"javax.el,javax.enterprise.context;version=\\\"[2.0,3)\\\"\");\n        attributes.putValue(\n                \"Provide-Capability\",\n                \"osgi.contract;osgi.contract=JavaCDI;uses:=\\\"\"\n                        + \"javax.enterprise.context,javax.enterprise.context.spi,javax.enterprise.context.control,\"\n                        + \"javax.enterprise.util,javax.enterprise.inject,javax.enterprise.inject.spi,\"\n                        + \"javax.enterprise.inject.spi.configurator,javax.enterprise.inject.literal,\"\n                        + \"javax.enterprise.inject.se,javax.enterprise.event,javax.decorator\\\";\"\n                        + \"version:List<Version>=\\\"2.0,1.2,1.1,1.0\\\"\");\n        attributes.putValue(\n                \"Require-Capability\",\n                \"osgi.serviceloader;\"\n                        + \"filter:=\\\"(osgi.serviceloader=javax.enterprise.inject.se.SeContainerInitializer)\\\";\"\n                        + \"cardinality:=multiple,\"\n                        + \"osgi.serviceloader;\"\n                        + \"filter:=\\\"(osgi.serviceloader=javax.enterprise.inject.spi.CDIProvider)\\\";\"\n                        + \"cardinality:=multiple,osgi.extender;\"\n                        + \"filter:=\\\"(osgi.extender=osgi.serviceloader.processor)\\\",\"\n                        + \"osgi.contract;osgi.contract=JavaEL;filter:=\\\"(&(osgi.contract=JavaEL)(version=2.2.0))\\\",\"\n                        + \"osgi.contract;osgi.contract=JavaInterceptor;\"\n                        + \"filter:=\\\"(&(osgi.contract=JavaInterceptor)(version=1.2.0))\\\",\"\n                        + \"osgi.contract;osgi.contract=JavaInject;\"\n                        + \"filter:=\\\"(&(osgi.contract=JavaInject)(version=1.0.0))\\\",\"\n                        + \"osgi.ee;filter:=\\\"(&(osgi.ee=JavaSE)(version=1.8))\\\"\");\n        return manifest;\n    }\n\n    @Test\n    public void rewriteDefaultAttributes() throws Exception {\n        final Manifest manifest = createTestManifest();\n\n        List<Relocator> relocators = Collections.<Relocator>singletonList(new SimpleRelocator(\n                \"javax\", \"jakarta\", Collections.<String>emptyList(), Collections.<String>emptyList()));\n\n        final ByteArrayOutputStream out = transform(manifest, relocators);\n\n        try (JarInputStream jis = new JarInputStream(new ByteArrayInputStream(out.toByteArray()))) {\n            Attributes attrs = jis.getManifest().getMainAttributes();\n            assertEquals(\n                    \"jakarta.decorator;version=\\\"2.0\\\";uses:=\\\"jakarta.enterprise.inject\\\",\"\n                            + \"jakarta.enterprise.context;version=\\\"2.0\\\";uses:=\\\"jakarta.enterprise.util,\"\n                            + \"jakarta.inject\\\"\",\n                    attrs.getValue(\"Export-Package\"));\n            assertEquals(\"jakarta.el,jakarta.enterprise.context;version=\\\"[2.0,3)\\\"\", attrs.getValue(\"Import-Package\"));\n            assertEquals(\n                    \"osgi.contract;osgi.contract=JavaCDI;\" + \"uses:=\\\"jakarta.enterprise.context,\"\n                            + \"jakarta.enterprise.context.spi,jakarta.enterprise.context.control,\"\n                            + \"jakarta.enterprise.util,jakarta.enterprise.inject,jakarta.enterprise.inject.spi,\"\n                            + \"jakarta.enterprise.inject.spi.configurator,jakarta.enterprise.inject.literal,\"\n                            + \"jakarta.enterprise.inject.se,jakarta.enterprise.event,\"\n                            + \"jakarta.decorator\\\";version:List<Version>=\\\"2.0,1.2,1.1,1.0\\\"\",\n                    attrs.getValue(\"Provide-Capability\"));\n            assertEquals(\n                    \"osgi.serviceloader;\"\n                            + \"filter:=\\\"(osgi.serviceloader=jakarta.enterprise.inject.se.SeContainerInitializer)\\\";\"\n                            + \"cardinality:=multiple,osgi.serviceloader;\"\n                            + \"filter:=\\\"(osgi.serviceloader=jakarta.enterprise.inject.spi.CDIProvider)\\\";\"\n                            + \"cardinality:=multiple,osgi.extender;\"\n                            + \"filter:=\\\"(osgi.extender=osgi.serviceloader.processor)\\\",\"\n                            + \"osgi.contract;osgi.contract=JavaEL;filter:=\\\"(&(osgi.contract=JavaEL)(version=2.2.0))\\\",\"\n                            + \"osgi.contract;osgi.contract=JavaInterceptor;\"\n                            + \"filter:=\\\"(&(osgi.contract=JavaInterceptor)(version=1.2.0))\\\",\"\n                            + \"osgi.contract;osgi.contract=JavaInject;\"\n                            + \"filter:=\\\"(&(osgi.contract=JavaInject)(version=1.0.0))\\\",\"\n                            + \"osgi.ee;filter:=\\\"(&(osgi.ee=JavaSE)(version=1.8))\\\"\",\n                    attrs.getValue(\"Require-Capability\"));\n        }\n    }\n\n    @Test()\n    public void rewriteDefaultAttributesWithSameSuffix() throws Exception {\n        final Manifest manifest = createTestManifest();\n\n        List<Relocator> relocators = Collections.<Relocator>singletonList(new SimpleRelocator(\n                \"javax\", \"shaded.javax\", Collections.<String>emptyList(), Collections.<String>emptyList()));\n\n        final ByteArrayOutputStream out = transform(manifest, relocators);\n\n        try (JarInputStream jis = new JarInputStream(new ByteArrayInputStream(out.toByteArray()))) {\n            Attributes attrs = jis.getManifest().getMainAttributes();\n            assertEquals(\n                    \"shaded.javax.decorator;version=\\\"2.0\\\";uses:=\\\"shaded.javax.enterprise.inject\\\",shaded.javax.enterprise.context;version=\\\"2.0\\\";uses:=\\\"shaded.javax.enterprise.util,shaded.javax.inject\\\"\",\n                    attrs.getValue(\"Export-Package\"));\n            assertEquals(\n                    \"shaded.javax.el,shaded.javax.enterprise.context;version=\\\"[2.0,3)\\\"\",\n                    attrs.getValue(\"Import-Package\"));\n            assertEquals(\n                    \"osgi.contract;osgi.contract=JavaCDI;uses:=\\\"shaded.javax.enterprise.context,shaded.javax.enterprise.context.spi,shaded.javax.enterprise.context.control,shaded.javax.enterprise.util,shaded.javax.enterprise.inject,shaded.javax.enterprise.inject.spi,shaded.javax.enterprise.inject.spi.configurator,shaded.javax.enterprise.inject.literal,shaded.javax.enterprise.inject.se,shaded.javax.enterprise.event,shaded.javax.decorator\\\";version:List<Version>=\\\"2.0,1.2,1.1,1.0\\\"\",\n                    attrs.getValue(\"Provide-Capability\"));\n            assertEquals(\n                    \"osgi.serviceloader;filter:=\\\"(osgi.serviceloader=shaded.javax.enterprise.inject.se.SeContainerInitializer)\\\";cardinality:=multiple,osgi.serviceloader;filter:=\\\"(osgi.serviceloader=shaded.javax.enterprise.inject.spi.CDIProvider)\\\";cardinality:=multiple,osgi.extender;filter:=\\\"(osgi.extender=osgi.serviceloader.processor)\\\",osgi.contract;osgi.contract=JavaEL;filter:=\\\"(&(osgi.contract=JavaEL)(version=2.2.0))\\\",osgi.contract;osgi.contract=JavaInterceptor;filter:=\\\"(&(osgi.contract=JavaInterceptor)(version=1.2.0))\\\",osgi.contract;osgi.contract=JavaInject;filter:=\\\"(&(osgi.contract=JavaInject)(version=1.0.0))\\\",osgi.ee;filter:=\\\"(&(osgi.ee=JavaSE)(version=1.8))\\\"\",\n                    attrs.getValue(\"Require-Capability\"));\n        }\n    }\n\n    @Test\n    public void rewriteAdditionalAttributes() throws Exception {\n        final Manifest manifest = new Manifest();\n        final Attributes attributes = manifest.getMainAttributes();\n        attributes.put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n        attributes.putValue(\"description-custom\", \"This jar uses javax packages\");\n\n        List<Relocator> relocators = Collections.<Relocator>singletonList(new SimpleRelocator(\n                \"javax\", \"jakarta\", Collections.<String>emptyList(), Collections.<String>emptyList()));\n\n        transformer.setAdditionalAttributes(Arrays.asList(\"description-custom\", \"attribute-unknown\"));\n        final ByteArrayOutputStream out = transform(manifest, relocators);\n\n        try (JarInputStream jis = new JarInputStream(new ByteArrayInputStream(out.toByteArray()))) {\n            Attributes attrs = jis.getManifest().getMainAttributes();\n            assertEquals(\"This jar uses jakarta packages\", attrs.getValue(\"description-custom\"));\n        }\n    }\n\n    private ByteArrayOutputStream transform(final Manifest manifest, List<Relocator> relocators) throws IOException {\n        final ByteArrayOutputStream mboas = new ByteArrayOutputStream();\n        try (OutputStream mos = mboas) {\n            manifest.write(mos);\n        }\n        transformer.processResource(\n                JarFile.MANIFEST_NAME, new ByteArrayInputStream(mboas.toByteArray()), relocators, 0);\n\n        final ByteArrayOutputStream out = new ByteArrayOutputStream();\n        try (JarOutputStream jarOutputStream = new JarOutputStream(out)) {\n            transformer.modifyOutputStream(jarOutputStream);\n        }\n        return out;\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/ReproducibleResourceTransformer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\n\n/**\n * Copy of original interface necessary to MSHADE-363_old-plugin IT:\n * CustomReproducibleResourceTransformer is built with ReproducibleResourceTransformer interface provided by\n * recent maven-shade-plugin, but older maven-shade-plugin 3.2.2 will be used at runtime in the\n * MSHADE-363_old-plugin IT, an older that does not provide the interface. Without the interface copy\n * in the custom resource transformer code, this would lead to ClassNotFoundException...\n *\n * @since 3.2.4\n * @see org.apache.maven.plugins.shade.custom.CustomReproducibleResourceTransformer\n */\npublic interface ReproducibleResourceTransformer extends ResourceTransformer {\n    void processResource(String resource, InputStream is, List<Relocator> relocators, long time) throws IOException;\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/ResourceBundleAppendingTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\npublic class ResourceBundleAppendingTransformerTest {\n    private ResourceBundleAppendingTransformer transformer;\n\n    @Before\n    public void setUp() {\n        transformer = new ResourceBundleAppendingTransformer();\n    }\n\n    @Test\n    public void testCanTransformResource() {\n        transformer.setBasename(\"a/b/c/ButtonLabel\");\n\n        assertTrue(transformer.canTransformResource(\"a/b/c/ButtonLabel.properties\"));\n        assertTrue(transformer.canTransformResource(\"a/b/c/ButtonLabel_en.properties\"));\n        assertTrue(transformer.canTransformResource(\"a/b/c/ButtonLabel_en_US.properties\"));\n        assertTrue(transformer.canTransformResource(\"a/b/c/ButtonLabel_fr.properties\"));\n        assertTrue(transformer.canTransformResource(\"a/b/c/ButtonLabel_fr_CA.properties\"));\n        assertTrue(transformer.canTransformResource(\"a/b/c/ButtonLabel_fr_CA_UNIX.properties\"));\n\n        assertFalse(transformer.canTransformResource(\"a/b/c/ButtonLabel.class\"));\n        assertFalse(transformer.canTransformResource(\"c/ButtonLabel.properties\"));\n        assertFalse(transformer.canTransformResource(\"ButtonLabel.properties\"));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/ServiceResourceTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.nio.charset.Charset;\nimport java.nio.charset.StandardCharsets;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarFile;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.relocation.SimpleRelocator;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertNotNull;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * Test for handling META-INF/service/...\n */\npublic class ServiceResourceTransformerTest {\n    private final String newline = \"\\n\";\n\n    private final List<Relocator> relocators = new ArrayList<>();\n\n    @Test\n    public void relocatedClasses() throws Exception {\n        SimpleRelocator relocator =\n                new SimpleRelocator(\"org.foo\", \"borg.foo\", null, Arrays.asList(\"org.foo.exclude.*\"));\n        relocators.add(relocator);\n\n        String content = \"org.foo.Service\\norg.foo.exclude.OtherService\\n\";\n        byte[] contentBytes = content.getBytes(StandardCharsets.UTF_8);\n        InputStream contentStream = new ByteArrayInputStream(contentBytes);\n        String contentResource = \"META-INF/services/org.foo.something.another\";\n        String contentResourceShaded = \"META-INF/services/borg.foo.something.another\";\n\n        ServicesResourceTransformer xformer = new ServicesResourceTransformer();\n        xformer.processResource(contentResource, contentStream, relocators, 0);\n        contentStream.close();\n\n        File tempJar = File.createTempFile(\"shade.\", \".jar\");\n        tempJar.deleteOnExit();\n        FileOutputStream fos = new FileOutputStream(tempJar);\n        try (JarOutputStream jos = new JarOutputStream(fos)) {\n            xformer.modifyOutputStream(jos);\n            jos.close();\n\n            JarFile jarFile = new JarFile(tempJar);\n            JarEntry jarEntry = jarFile.getJarEntry(contentResourceShaded);\n            assertNotNull(jarEntry);\n            try (InputStream entryStream = jarFile.getInputStream(jarEntry)) {\n                String xformedContent = toString(entryStream, StandardCharsets.UTF_8);\n                assertEquals(\"borg.foo.Service\" + newline + \"org.foo.exclude.OtherService\" + newline, xformedContent);\n            } finally {\n                jarFile.close();\n            }\n        } finally {\n            tempJar.delete();\n        }\n    }\n\n    @Test\n    public void mergeRelocatedFiles() throws Exception {\n        SimpleRelocator relocator =\n                new SimpleRelocator(\"org.foo\", \"borg.foo\", null, Collections.singletonList(\"org.foo.exclude.*\"));\n        relocators.add(relocator);\n\n        String content = \"org.foo.Service\" + newline + \"org.foo.exclude.OtherService\" + newline;\n        String contentShaded = \"borg.foo.Service\" + newline + \"org.foo.exclude.OtherService\" + newline;\n        byte[] contentBytes = content.getBytes(StandardCharsets.UTF_8);\n        String contentResource = \"META-INF/services/org.foo.something.another\";\n        String contentResourceShaded = \"META-INF/services/borg.foo.something.another\";\n\n        ServicesResourceTransformer xformer = new ServicesResourceTransformer();\n\n        try (InputStream contentStream = new ByteArrayInputStream(contentBytes)) {\n            xformer.processResource(contentResource, contentStream, relocators, 0);\n        }\n\n        try (InputStream contentStream = new ByteArrayInputStream(contentBytes)) {\n            xformer.processResource(contentResourceShaded, contentStream, relocators, 0);\n        }\n\n        File tempJar = File.createTempFile(\"shade.\", \".jar\");\n        tempJar.deleteOnExit();\n        FileOutputStream fos = new FileOutputStream(tempJar);\n        try (JarOutputStream jos = new JarOutputStream(fos)) {\n            xformer.modifyOutputStream(jos);\n            jos.close();\n\n            JarFile jarFile = new JarFile(tempJar);\n            JarEntry jarEntry = jarFile.getJarEntry(contentResourceShaded);\n            assertNotNull(jarEntry);\n            try (InputStream entryStream = jarFile.getInputStream(jarEntry)) {\n                String xformedContent = toString(entryStream, StandardCharsets.UTF_8);\n                assertEquals(contentShaded, xformedContent);\n            } finally {\n                jarFile.close();\n            }\n        } finally {\n            tempJar.delete();\n        }\n    }\n\n    @Test\n    public void concatanationAppliedMultipleTimes() throws Exception {\n        SimpleRelocator relocator = new SimpleRelocator(\"org.eclipse\", \"org.eclipse1234\", null, null);\n        relocators.add(relocator);\n\n        String content = \"org.eclipse.osgi.launch.EquinoxFactory\\n\";\n        byte[] contentBytes = content.getBytes(\"UTF-8\");\n        InputStream contentStream = new ByteArrayInputStream(contentBytes);\n        String contentResource = \"META-INF/services/org.osgi.framework.launch.FrameworkFactory\";\n\n        ServicesResourceTransformer xformer = new ServicesResourceTransformer();\n        xformer.processResource(contentResource, contentStream, relocators, 0);\n        contentStream.close();\n\n        File tempJar = File.createTempFile(\"shade.\", \".jar\");\n        tempJar.deleteOnExit();\n        FileOutputStream fos = new FileOutputStream(tempJar);\n        try (JarOutputStream jos = new JarOutputStream(fos)) {\n            xformer.modifyOutputStream(jos);\n            jos.close();\n\n            JarFile jarFile = new JarFile(tempJar);\n            JarEntry jarEntry = jarFile.getJarEntry(contentResource);\n            assertNotNull(jarEntry);\n            try (InputStream entryStream = jarFile.getInputStream(jarEntry)) {\n                String xformedContent = toString(entryStream, StandardCharsets.UTF_8);\n                assertEquals(\"org.eclipse1234.osgi.launch.EquinoxFactory\" + newline, xformedContent);\n            } finally {\n                jarFile.close();\n            }\n        } finally {\n            tempJar.delete();\n        }\n    }\n\n    @Test\n    public void concatenation() throws Exception {\n        SimpleRelocator relocator = new SimpleRelocator(\"org.foo\", \"borg.foo\", null, null);\n        relocators.add(relocator);\n\n        String content = \"org.foo.Service\\n\";\n        byte[] contentBytes = content.getBytes(StandardCharsets.UTF_8);\n        InputStream contentStream = new ByteArrayInputStream(contentBytes);\n        String contentResource = \"META-INF/services/org.something.another\";\n\n        ServicesResourceTransformer xformer = new ServicesResourceTransformer();\n        xformer.processResource(contentResource, contentStream, relocators, 0);\n        contentStream.close();\n\n        content = \"org.blah.Service\\n\";\n        contentBytes = content.getBytes(StandardCharsets.UTF_8);\n        contentStream = new ByteArrayInputStream(contentBytes);\n        contentResource = \"META-INF/services/org.something.another\";\n\n        xformer.processResource(contentResource, contentStream, relocators, 0);\n        contentStream.close();\n\n        File tempJar = File.createTempFile(\"shade.\", \".jar\");\n        tempJar.deleteOnExit();\n        FileOutputStream fos = new FileOutputStream(tempJar);\n        try (JarOutputStream jos = new JarOutputStream(fos)) {\n            xformer.modifyOutputStream(jos);\n            jos.close();\n\n            JarFile jarFile = new JarFile(tempJar);\n            JarEntry jarEntry = jarFile.getJarEntry(contentResource);\n            assertNotNull(jarEntry);\n            try (InputStream entryStream = jarFile.getInputStream(jarEntry)) {\n                String xformedContent = toString(entryStream, StandardCharsets.UTF_8);\n                // must be two lines, with our two classes.\n                String[] classes = xformedContent.split(\"\\r?\\n\");\n                boolean h1 = false;\n                boolean h2 = false;\n                for (String name : classes) {\n                    if (\"org.blah.Service\".equals(name)) {\n                        h1 = true;\n                    } else if (\"borg.foo.Service\".equals(name)) {\n                        h2 = true;\n                    }\n                }\n                assertTrue(h1 && h2);\n            } finally {\n                jarFile.close();\n            }\n        } finally {\n            tempJar.delete();\n        }\n    }\n\n    private static String toString(InputStream stream, Charset charset) throws IOException {\n        ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n        byte[] data = new byte[8192];\n        int read;\n        while ((read = stream.read(data, 0, data.length)) != -1) {\n            buffer.write(data, 0, read);\n        }\n        return new String(buffer.toByteArray(), charset);\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/XmlAppendingTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource;\n\nimport java.util.Locale;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\n/**\n * Test for {@link XmlAppendingTransformer}.\n *\n * @author Benjamin Bentmann\n *\n */\npublic class XmlAppendingTransformerTest {\n\n    private XmlAppendingTransformer transformer;\n\n    static {\n        /*\n         * NOTE: The Turkish locale has an usual case transformation for the letters \"I\" and \"i\", making it a prime\n         * choice to test for improper case-less string comparisions.\n         */\n        Locale.setDefault(new Locale(\"tr\"));\n    }\n\n    @Before\n    public void setUp() {\n        transformer = new XmlAppendingTransformer();\n    }\n\n    @Test\n    public void testCanTransformResource() {\n        transformer.resource = \"abcdefghijklmnopqrstuvwxyz\";\n\n        assertTrue(transformer.canTransformResource(\"abcdefghijklmnopqrstuvwxyz\"));\n        assertTrue(transformer.canTransformResource(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"));\n        assertFalse(transformer.canTransformResource(\"META-INF/MANIFEST.MF\"));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/properties/PropertiesTransformerTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource.properties;\n\nimport java.io.BufferedWriter;\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.io.OutputStreamWriter;\nimport java.nio.charset.StandardCharsets;\nimport java.util.Properties;\n\nimport org.apache.maven.plugins.shade.resource.properties.io.NoCloseOutputStream;\nimport org.apache.maven.plugins.shade.resource.properties.io.SkipPropertiesDateLineWriter;\nimport org.apache.maven.plugins.shade.resource.rule.TransformerTesterRule;\nimport org.apache.maven.plugins.shade.resource.rule.TransformerTesterRule.Property;\nimport org.apache.maven.plugins.shade.resource.rule.TransformerTesterRule.Resource;\nimport org.apache.maven.plugins.shade.resource.rule.TransformerTesterRule.TransformerTest;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TestRule;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\npublic class PropertiesTransformerTest {\n    @Rule\n    public final TestRule tester = new TransformerTesterRule();\n\n    @Test\n    public void propertiesRewritingIsStable() throws IOException {\n        final Properties properties = new SortedProperties();\n        properties.setProperty(\"a\", \"1\");\n        properties.setProperty(\"b\", \"2\");\n\n        final ByteArrayOutputStream os = new ByteArrayOutputStream();\n        final BufferedWriter writer = new SkipPropertiesDateLineWriter(\n                new OutputStreamWriter(new NoCloseOutputStream(os), StandardCharsets.ISO_8859_1));\n        properties.store(writer, \" Merged by maven-shade-plugin\");\n        writer.close();\n        os.close();\n\n        assertEquals(\n                \"# Merged by maven-shade-plugin\\n\" + \"a=1\\n\" + \"b=2\\n\",\n                os.toString(\"UTF-8\").replace(System.lineSeparator(), \"\\n\"));\n    }\n\n    @Test\n    public void canTransform() {\n        final PropertiesTransformer transformer = new PropertiesTransformer();\n        transformer.setResource(\"foo/bar/my.properties\");\n        assertTrue(transformer.canTransformResource(\"foo/bar/my.properties\"));\n        assertFalse(transformer.canTransformResource(\"whatever\"));\n    }\n\n    @Test\n    @TransformerTest(\n            transformer = PropertiesTransformer.class,\n            configuration = @Property(name = \"resource\", value = \"foo/bar/my.properties\"),\n            visited = {\n                @Resource(path = \"foo/bar/my.properties\", content = \"a=b\"),\n                @Resource(path = \"foo/bar/my.properties\", content = \"c=d\"),\n            },\n            expected = @Resource(path = \"foo/bar/my.properties\", content = \"#.*\\na=b\\nc=d\\n\"))\n    public void mergeWithoutOverlap() {}\n\n    @Test\n    @TransformerTest(\n            transformer = PropertiesTransformer.class,\n            configuration = {\n                @Property(name = \"resource\", value = \"foo/bar/my.properties\"),\n                @Property(name = \"ordinalKey\", value = \"priority\")\n            },\n            visited = {\n                @Resource(path = \"foo/bar/my.properties\", content = \"a=d\\npriority=3\"),\n                @Resource(path = \"foo/bar/my.properties\", content = \"a=b\\npriority=1\"),\n                @Resource(path = \"foo/bar/my.properties\", content = \"a=c\\npriority=2\"),\n            },\n            expected = @Resource(path = \"foo/bar/my.properties\", content = \"#.*\\na=d\\n\"))\n    public void mergeWithOverlap() {}\n\n    @Test\n    @TransformerTest(\n            transformer = PropertiesTransformer.class,\n            configuration = {\n                @Property(name = \"resource\", value = \"foo/bar/my.properties\"),\n                @Property(name = \"alreadyMergedKey\", value = \"complete\")\n            },\n            visited = {\n                @Resource(path = \"foo/bar/my.properties\", content = \"a=b\\ncomplete=true\"),\n                @Resource(path = \"foo/bar/my.properties\", content = \"a=c\\npriority=2\"),\n            },\n            expected = @Resource(path = \"foo/bar/my.properties\", content = \"#.*\\na=b\\n\"))\n    public void mergeWithAlreadyMerged() {}\n\n    @Test\n    @TransformerTest(\n            transformer = PropertiesTransformer.class,\n            configuration = {\n                @Property(name = \"resource\", value = \"foo/bar/my.properties\"),\n                @Property(name = \"alreadyMergedKey\", value = \"complete\")\n            },\n            visited = {\n                @Resource(path = \"foo/bar/my.properties\", content = \"a=b\\ncomplete=true\"),\n                @Resource(path = \"foo/bar/my.properties\", content = \"a=c\\ncomplete=true\"),\n            },\n            expected = {},\n            expectedException = IllegalStateException.class)\n    public void alreadyMergeConflict() {}\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugins/shade/resource/rule/TransformerTesterRule.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade.resource.rule;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.Target;\nimport java.nio.charset.StandardCharsets;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarInputStream;\nimport java.util.jar.JarOutputStream;\n\nimport org.apache.maven.plugins.shade.relocation.Relocator;\nimport org.apache.maven.plugins.shade.resource.ReproducibleResourceTransformer;\nimport org.codehaus.plexus.component.configurator.ComponentConfigurationException;\nimport org.codehaus.plexus.component.configurator.converters.ConfigurationConverter;\nimport org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup;\nimport org.codehaus.plexus.component.configurator.converters.lookup.DefaultConverterLookup;\nimport org.codehaus.plexus.component.configurator.expression.DefaultExpressionEvaluator;\nimport org.codehaus.plexus.configuration.DefaultPlexusConfiguration;\nimport org.codehaus.plexus.configuration.PlexusConfiguration;\nimport org.junit.rules.TestRule;\nimport org.junit.runner.Description;\nimport org.junit.runners.model.Statement;\n\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.RetentionPolicy.RUNTIME;\nimport static org.junit.Assert.assertNotNull;\nimport static org.junit.Assert.assertTrue;\nimport static org.junit.Assert.fail;\n\npublic class TransformerTesterRule implements TestRule {\n    @Override\n    public Statement apply(Statement base, Description description) {\n        return new Statement() {\n            @Override\n            public void evaluate() throws Throwable {\n                TransformerTest spec = description.getAnnotation(TransformerTest.class);\n                if (spec == null) {\n                    base.evaluate();\n                    return;\n                }\n\n                Map<String, String> jar;\n                try {\n                    ReproducibleResourceTransformer transformer = createTransformer(spec);\n                    visit(spec, transformer);\n                    jar = captureOutput(transformer);\n                } catch (Exception ex) {\n                    if (Exception.class.isAssignableFrom(spec.expectedException())) {\n                        assertTrue(\n                                ex.getClass().getName(),\n                                spec.expectedException().isAssignableFrom(ex.getClass()));\n                        return;\n                    } else {\n                        throw ex;\n                    }\n                }\n                asserts(spec, jar);\n            }\n        };\n    }\n\n    private void asserts(TransformerTest spec, Map<String, String> jar) {\n        if (spec.strictMatch() && jar.size() != spec.expected().length) {\n            fail(\"Strict match test failed: \" + jar);\n        }\n        for (final Resource expected : spec.expected()) {\n            final String content = jar.get(expected.path());\n            assertNotNull(expected.path(), content);\n            assertTrue(\n                    expected.path() + \", expected=\" + expected.content() + \", actual=\" + content,\n                    content.replace(System.lineSeparator(), \"\\n\").matches(expected.content()));\n        }\n    }\n\n    private Map<String, String> captureOutput(ReproducibleResourceTransformer transformer) throws IOException {\n        ByteArrayOutputStream out = new ByteArrayOutputStream();\n        try (JarOutputStream jar = new JarOutputStream(out)) {\n            transformer.modifyOutputStream(jar);\n        }\n\n        Map<String, String> created = new HashMap<>();\n        try (JarInputStream jar = new JarInputStream(new ByteArrayInputStream(out.toByteArray()))) {\n            JarEntry entry;\n            while ((entry = jar.getNextJarEntry()) != null) {\n                created.put(entry.getName(), read(jar));\n            }\n        }\n        return created;\n    }\n\n    private void visit(TransformerTest spec, ReproducibleResourceTransformer transformer) throws IOException {\n        for (Resource resource : spec.visited()) {\n            if (transformer.canTransformResource(resource.path())) {\n                transformer.processResource(\n                        resource.path(),\n                        new ByteArrayInputStream(resource.content().getBytes(StandardCharsets.UTF_8)),\n                        Collections.<Relocator>emptyList(),\n                        0);\n            }\n        }\n    }\n\n    private String read(JarInputStream jar) throws IOException {\n        StringBuilder builder = new StringBuilder();\n        byte[] buffer = new byte[512];\n        int read;\n        while ((read = jar.read(buffer)) >= 0) {\n            builder.append(new String(buffer, 0, read));\n        }\n        return builder.toString();\n    }\n\n    private ReproducibleResourceTransformer createTransformer(TransformerTest spec) {\n        ConverterLookup lookup = new DefaultConverterLookup();\n        try {\n            ConfigurationConverter converter = lookup.lookupConverterForType(spec.transformer());\n            PlexusConfiguration configuration = new DefaultPlexusConfiguration(\"configuration\");\n            for (Property property : spec.configuration()) {\n                configuration.addChild(property.name(), property.value());\n            }\n            return (ReproducibleResourceTransformer) converter.fromConfiguration(\n                    lookup,\n                    configuration,\n                    spec.transformer(),\n                    spec.transformer(),\n                    Thread.currentThread().getContextClassLoader(),\n                    new DefaultExpressionEvaluator());\n        } catch (ComponentConfigurationException e) {\n            throw new IllegalStateException(e);\n        }\n    }\n\n    /**\n     * Enables to describe a test without having to implement the logic itself.\n     */\n    @Target(METHOD)\n    @Retention(RUNTIME)\n    public @interface TransformerTest {\n        /**\n         * @return the list of resource the transformer will process.\n         */\n        Resource[] visited();\n\n        /**\n         * @return the expected output created by the transformer.\n         */\n        Resource[] expected();\n\n        /**\n         * @return true if only expected resources must be found.\n         */\n        boolean strictMatch() default true;\n\n        /**\n         * @return type of transformer to use.\n         */\n        Class<?> transformer();\n\n        /**\n         * @return transformer configuration.\n         */\n        Property[] configuration();\n\n        /**\n         * @return if set to an exception class it ensures it is thrown during the processing.\n         */\n        Class<?> expectedException() default Object.class;\n    }\n\n    @Target(METHOD)\n    @Retention(RUNTIME)\n    public @interface Property {\n        String name();\n\n        String value();\n    }\n\n    @Target(METHOD)\n    @Retention(RUNTIME)\n    public @interface Resource {\n        String path();\n\n        String content();\n    }\n}\n"
  },
  {
    "path": "src/test/projects/default-config-project/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n  \n  http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.shade</groupId>\n  <artifactId>default-config-project</artifactId>\n  <name>default-config-project</name>\n  <packaging>jar</packaging>\n  <version>1.0-SNAPSHOT</version>\n  <url>http://maven.apache.org</url>\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.shade</groupId>\n      <artifactId>test-project</artifactId>\n      <version>${pom.version}</version>\n    </dependency>\n  </dependencies>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/projects/no-relocation-project/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n  \n  http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.shade</groupId>\n  <artifactId>no-relocation-project</artifactId>\n  <name>no-relocation-project</name>\n  <packaging>jar</packaging>\n  <version>1.0-SNAPSHOT</version>\n  <url>http://maven.apache.org</url>\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.shade</groupId>\n      <artifactId>test-project</artifactId>\n      <version>${pom.version}</version>\n    </dependency>\n  </dependencies>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <artifactSet>\n                <excludes>\n                  <exclude>classworlds:classworlds</exclude>\n                  <exclude>junit:junit</exclude>\n                  <exclude>jmock:jmock</exclude>\n                  <exclude>xml-apis:xml-apis</exclude>\n                </excludes>\n              </artifactSet>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer\"/>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/projects/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n  \n  http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n--><project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.shade</groupId>\n  <artifactId>projects-parent</artifactId>\n  <name>projects-parent</name>\n  <packaging>pom</packaging>\n  <version>1.0-SNAPSHOT</version>\n  <url>http://maven.apache.org</url>\n  <modules>\n    <module>test-project</module>\n    <module>no-relocation-project</module>\n    <module>shaded-project</module>\n    <module>shaded-renamed-project</module>\n    <module>shaded-attached-project</module>\n    <module>test-artifact</module>\n  </modules>\n</project>"
  },
  {
    "path": "src/test/projects/shaded-attached-project/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n  \n  http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.shade</groupId>\n  <artifactId>shaded-attached-project</artifactId>\n  <name>shaded-attached-project</name>\n  <packaging>jar</packaging>\n  <version>1.0-SNAPSHOT</version>\n   <url>http://maven.apache.org</url>\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.shade</groupId>\n      <artifactId>test-project</artifactId>\n      <version>${pom.version}</version>\n    </dependency>\n  </dependencies>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactId>shaded-artifact</shadedArtifactId>\n              <shadedArtifactAttached>true</shadedArtifactAttached>\n              <shadedClassifierName>jackofall</shadedClassifierName> <!-- Any name that makes sense -->\n              <artifactSet>\n                <excludes>\n                  <exclude>classworlds:classworlds</exclude>\n                  <exclude>junit:junit</exclude>\n                  <exclude>jmock:jmock</exclude>\n                  <exclude>xml-apis:xml-apis</exclude>\n                </excludes>\n              </artifactSet>\n              <relocations>\n                <relocation>\n                  <pattern>org.codehaus.plexus.util</pattern>\n                  <excludes>\n                    <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>\n                    <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>\n                  </excludes>\n                </relocation>\n              </relocations>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer\"/>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/projects/shaded-project/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n  \n  http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.shade</groupId>\n  <artifactId>shaded-project</artifactId>\n  <name>shaded-project</name>\n  <packaging>jar</packaging>\n  <version>1.0-SNAPSHOT</version>\n  <url>http://maven.apache.org</url>\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.shade</groupId>\n      <artifactId>test-project</artifactId>\n      <version>${pom.version}</version>\n    </dependency>\n  </dependencies>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <artifactSet>\n                <excludes>\n                  <exclude>classworlds:classworlds</exclude>\n                  <exclude>junit:junit</exclude>\n                  <exclude>jmock:jmock</exclude>\n                  <exclude>xml-apis:xml-apis</exclude>\n                </excludes>\n              </artifactSet>\n              <relocations>\n                <relocation>\n                  <pattern>org.codehaus.plexus.util</pattern>\n                  <shadedPattern>org.shaded.plexus.util</shadedPattern>\n                  <excludes>\n                    <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>\n                    <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>\n                  </excludes>\n                </relocation>\n              </relocations>\n              <transformers>\n                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer\"/>\n              </transformers>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/projects/shaded-renamed-project/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n  \n  http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.shade</groupId>\n  <artifactId>shaded-renamed-project</artifactId>\n  <name>shaded-renamed-project</name>\n  <packaging>jar</packaging>\n  <version>1.0-SNAPSHOT</version>\n   <url>http://maven.apache.org</url>\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.shade</groupId>\n      <artifactId>test-project</artifactId>\n      <version>${pom.version}</version>\n    </dependency>\n  </dependencies>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-shade-plugin</artifactId>\n        <executions>\n          <execution>\n            <phase>package</phase>\n            <goals>\n              <goal>shade</goal>\n            </goals>\n            <configuration>\n              <shadedArtifactId>renamed-artifact</shadedArtifactId>\n              <artifactSet>\n                <excludes>\n                  <exclude>classworlds:classworlds</exclude>\n                  <exclude>junit:junit</exclude>\n                  <exclude>jmock:jmock</exclude>\n                  <exclude>xml-apis:xml-apis</exclude>\n                </excludes>\n              </artifactSet>\n              <relocations>\n                <relocation>\n                  <pattern>org.codehaus.plexus.util</pattern>\n                  <excludes>\n                    <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>\n                    <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>\n                  </excludes>\n                </relocation>\n              </relocations>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/projects/test-artifact/pom.xml",
    "content": "<?xml version=\"1.0\"?><project>\n\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n  <parent>\n    <artifactId>projects-parent</artifactId>\n    <groupId>org.apache.maven.plugins.shade</groupId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <modelVersion>4.0.0</modelVersion>\n    <artifactId>test-artifact</artifactId>\n  <name>test-artifact</name>\n  <version>1.0-SNAPSHOT</version>\n  <url>http://maven.apache.org</url>\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>3.8.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/test/projects/test-artifact/src/main/java/org/apache/maven/plugins/shade/Lib.java",
    "content": "package org.apache.maven.plugins.shade;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n * \n *   http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n\n/**\n * Hello world!\n *\n */\npublic class Lib\n{\n    // simulate the type of call for static loggers that currently fails\n    private static final String name = new String( Lib.class.getName() );\n\n    public static final String CONSTANT = \"foo.bar/baz\";\n\n    // constant shouldn't be changed if \"org.codehaus.plexus.util.xml.pull.*\" is excluded from relocation.\n    public static final String CLASS_REALM_PACKAGE_IMPORT = \"org.codehaus.plexus.util.xml.pull\";\n\n    public static String getClassRealmPackageImport()\n    {\n        // argument shouldn't be changed if \"org.codehaus.plexus.util.xml.pull.*\" is excluded from relocation.\n        return importFrom( \"org.codehaus.plexus.util.xml.pull\" );\n    }\n\n    private static String importFrom( String packageName )\n    {\n        return packageName;\n    }\n}\n"
  },
  {
    "path": "src/test/projects/test-project/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n  \n  http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.shade</groupId>\n  <artifactId>test-project</artifactId>\n  <name>test-project</name>\n  <packaging>jar</packaging>\n  <version>1.0-SNAPSHOT</version>\n  <url>http://maven.apache.org</url>\n  <dependencies>\n    <dependency>\n      <groupId>${project.groupId}</groupId>\n      <artifactId>test-artifact</artifactId>\n      <version>${project.version}</version>\n    </dependency>  \n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-utils</artifactId>\n      <version>3.3.0</version>\n    </dependency>\n      <dependency>\n          <groupId>org.junit.jupiter</groupId>\n          <artifactId>junit-jupiter-api</artifactId>\n          <version>5.14.0</version>\n          <scope>test</scope>\n      </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/test/projects/test-project/src/main/java/org/apache/maven/plugins/shade/App.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade;\n\nimport org.codehaus.plexus.util.*;\n\n/**\n * Hello world!\n *\n */\npublic class App \n{\n    public static void main( String[] args )\n    {\n        System.out.println( \"Hello World!\" );\n\n        StringUtils.isEmpty( \"foo\" );\n    }\n}\n"
  },
  {
    "path": "src/test/projects/test-project/src/main/resources/META-INF/plexus/components.xml",
    "content": "<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<component-set>\n  <components>\n    <component>\n      <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>\n      <role-hint>default</role-hint>\n      <implementation>org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout</implementation>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>\n      <role-hint>legacy</role-hint>\n      <implementation>org.apache.maven.artifact.repository.layout.LegacyRepositoryLayout</implementation>\n    </component>\n\n    <!--\n     |\n     | ArtifactHandlerManager\n     |\n     -->\n    <component>\n      <role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>\n      <implementation>org.apache.maven.artifact.handler.manager.DefaultArtifactHandlerManager</implementation>\n      <requirements>\n        <requirement>\n          <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n          <field-name>artifactHandlers</field-name>\n        </requirement>\n      </requirements>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>ejb</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>ejb</type>\n        <extension>jar</extension>\n        <language>java</language>\n        <addedToClasspath>true</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>jar</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>jar</type>\n        <language>java</language>\n        <addedToClasspath>true</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>test-jar</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <classifier>tests</classifier>\n        <extension>jar</extension>\n        <type>test-jar</type>\n        <packaging>jar</packaging>\n        <language>java</language>\n        <addedToClasspath>true</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>maven-plugin</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>maven-plugin</type>\n        <extension>jar</extension>\n        <language>java</language>\n        <addedToClasspath>true</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>pom</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>pom</type>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>java-source</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <classifier>sources</classifier>\n        <type>java-source</type>\n        <extension>jar</extension>\n        <language>java</language>\n        <addedToClasspath>false</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>javadoc</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <classifier>javadoc</classifier>\n        <type>javadoc</type>\n        <extension>jar</extension>\n        <language>java</language>\n        <addedToClasspath>true</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>war</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>war</type>\n        <includesDependencies>true</includesDependencies>\n        <language>java</language>\n        <addedToClasspath>false</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>ear</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>ear</type>\n        <includesDependencies>true</includesDependencies>\n        <language>java</language>\n        <addedToClasspath>false</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>ejb-client</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>ejb-client</type>\n        <extension>jar</extension>\n        <packaging>ejb</packaging>\n        <classifier>client</classifier>\n        <language>java</language>\n        <addedToClasspath>true</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>par</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>par</type>\n        <language>java</language>\n        <addedToClasspath>true</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n      <role-hint>ejb3</role-hint>\n      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n      <configuration>\n        <type>ejb3</type>\n        <language>java</language>\n        <addedToClasspath>true</addedToClasspath>\n      </configuration>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.factory.ArtifactFactory</role>\n      <implementation>org.apache.maven.artifact.factory.DefaultArtifactFactory</implementation>\n      <requirements>\n        <requirement>\n          <role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>\n        </requirement>\n      </requirements>\n    </component>\n\n    <component>\n      <role>org.apache.maven.artifact.resolver.ArtifactCollector</role>\n      <implementation>org.apache.maven.artifact.resolver.DefaultArtifactCollector</implementation>\n    </component>\n  </components>\n</component-set>\n"
  },
  {
    "path": "src/test/projects/test-project/src/test/java/org/apache/maven/plugins/shade/AppTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.maven.plugins.shade;\n\nimport org.junit.jupiter.api.Test;\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n/**\n * Unit test for simple App.\n */\npublic class AppTest {\n    /**\n     * Create the test case\n     *\n     * @param testName name of the test case\n     */\n\n    /**\n     * Rigourous Test :-)\n     */\n    @Test\n    public void testApp() {\n        assertTrue(true);\n    }\n}\n\n"
  },
  {
    "path": "src/test/resources/components-1.xml",
    "content": "<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<component-set>\n  <components>\n    <component>\n      <role>org.apache.maven.wagon.Wagon</role>\n      <role-hint>http</role-hint>\n      <implementation>org.apache.maven.wagon.providers.http.LightweightHttpWagon</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n      <description>LightweightHttpWagon</description>\n      <isolated-realm>false</isolated-realm>\n    </component>\n    <component>\n      <role>org.apache.maven.wagon.Wagon</role>\n      <role-hint>https</role-hint>\n      <implementation>org.apache.maven.wagon.providers.http.LightweightHttpsWagon</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n      <description>LIghtweightHttpsWagon</description>\n      <isolated-realm>false</isolated-realm>\n      <configuration>\n        <httpHeaders>\n          <property>\n            <name>User-Agent</name>\n            <value>Apache Maven/${project.version}</value>\n          </property>\n        </httpHeaders>\n      </configuration>\n    </component>\n  </components>\n</component-set>\n    "
  },
  {
    "path": "src/test/resources/components-2.xml",
    "content": "<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<component-set>\n  <components>\n    <component>\n      <role>org.apache.maven.wagon.Wagon</role>\n      <role-hint>http</role-hint>\n      <implementation>org.apache.maven.wagon.providers.http.LightweightHttpWagon</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n      <description>LightweightHttpWagon</description>\n      <isolated-realm>false</isolated-realm>\n      <configuration>\n        <httpHeaders>\n          <property>\n            <name>User-Agent</name>\n            <value>Apache Maven/${project.version}</value>\n          </property>\n        </httpHeaders>\n      </configuration>\n    </component>\n    <component>\n      <role>org.apache.maven.wagon.Wagon</role>\n      <role-hint>https</role-hint>\n      <implementation>org.apache.maven.wagon.providers.http.LightweightHttpsWagon</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n      <description>LIghtweightHttpsWagon</description>\n      <isolated-realm>false</isolated-realm>\n    </component>\n  </components>\n</component-set>\n    "
  },
  {
    "path": "src/test/resources/components-expected.xml",
    "content": "<?xml version='1.0'?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<component-set>\n  <components>\n    <component>\n      <role>org.apache.maven.wagon.Wagon</role>\n      <role-hint>http</role-hint>\n      <implementation>org.apache.maven.wagon.providers.http.LightweightHttpWagon</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n      <description>LightweightHttpWagon</description>\n      <isolated-realm>false</isolated-realm>\n      <configuration>\n        <httpHeaders>\n          <property>\n            <name>User-Agent</name>\n            <value>Apache Maven/${project.version}</value>\n          </property>\n        </httpHeaders>\n      </configuration>\n    </component>\n    <component>\n      <role>org.apache.maven.wagon.Wagon</role>\n      <role-hint>https</role-hint>\n      <implementation>org.apache.maven.wagon.providers.http.LightweightHttpsWagon</implementation>\n      <instantiation-strategy>per-lookup</instantiation-strategy>\n      <description>LIghtweightHttpsWagon</description>\n      <isolated-realm>false</isolated-realm>\n      <configuration>\n        <httpHeaders>\n          <property>\n            <name>User-Agent</name>\n            <value>Apache Maven/${project.version}</value>\n          </property>\n        </httpHeaders>\n      </configuration>\n    </component>\n  </components>\n</component-set>\n"
  }
]